-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
318 additions
and
1,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,219 @@ | ||
.PHONY: install | ||
##@ General | ||
|
||
check: fmt lint | ||
help: ## Display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
fmt: ## format code | ||
shfmt -w -s . | ||
auto-install: ## Run automated installation. | ||
@./install.sh | ||
|
||
lint: ## run lint check | ||
shfmt -d -s . | ||
shellcheck $$(shfmt -f .) | ||
##@ Operating systems | ||
|
||
install: ## install the setup | ||
@install/main.sh | ||
OS_NAME = $(shell make os-name) | ||
OS_ID = $(shell make os-id) | ||
|
||
fingerprint: ## generate SHA-256 fingerprint of the dotfiles | ||
@git ls-files | xargs -I {} sha256sum "{}" | cut -d " " -f 1 | sha256sum | cut -d " " -f 1 | ||
fedora-workstation: configuration gnome dnf-packages tpm ## Install Fedora Workstation setup. | ||
|
||
help: | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort | ||
ubuntu-desktop: configuration gnome apt-packages tpm ## Install Ubuntu Desktop setup. | ||
sudo ubuntu-drivers autoinstall | ||
|
||
sudo sed -E -i '/(en_US.UTF-8|en_GB.UTF-8)/s/^# //g' /etc/locale.gen | ||
sudo locale-gen | ||
sudo update-locale \ | ||
LANG='en_US.UTF-8' \ | ||
LC_ADDRESS='en_US.UTF-8' \ | ||
LC_NAME='en_US.UTF-8' \ | ||
LC_MONETARY='en_US.UTF-8' \ | ||
LC_PAPER='en_GB.UTF-8' \ | ||
LC_IDENTIFICATION='en_US.UTF-8' \ | ||
LC_TELEPHONE='en_US.UTF-8' \ | ||
LC_MEASUREMENT='en_GB.UTF-8' \ | ||
LC_TIME='en_GB.UTF-8' \ | ||
LC_NUMERIC='en_GB.UTF-8' | ||
|
||
macos: configuration homebrew homebrew-packages tpm ## Install macOS setup. | ||
|
||
github-codespaces: configuration apt-packages tpm ## Install GitHub Codespaces setup. | ||
|
||
os-name: ## Display the name of the OS. | ||
@grep -oP '^NAME="?\K[a-zA-Z0-9_ ]+' /etc/os-release || uname | ||
|
||
os-id: ## Display the ID of the OS. | ||
@grep -oP '^ID="?\K[a-zA-Z0-9_ ]+' /etc/os-release || uname | ||
|
||
##@ Desktop environments | ||
|
||
gnome: ## Apply GNOME settings. | ||
# Keybindings. | ||
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-group "[]" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-group-backward "[]" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-windows "[]" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "[]" | ||
gsettings set org.gnome.shell.keybindings toggle-application-view "[]" | ||
gsettings set org.gnome.settings-daemon.plugins.media-keys logout "['<Control><Super>End']" | ||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Control><Super><Shift>Right']" | ||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Control><Super><Shift>Left']" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Super>Above_Tab', '<Control><Super>Right']" | ||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Shift><Super>Above_Tab', '<Control><Super>Left']" | ||
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']" | ||
gsettings set org.gnome.desktop.wm.keybindings cycle-windows "['<Super>Tab']" | ||
gsettings set org.gnome.desktop.wm.keybindings cycle-windows-backward "['<Shift><Super>Tab']" | ||
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Alt>F11']" | ||
gsettings set org.gnome.desktop.wm.keybindings close "['<Shift><Super>q']" | ||
|
||
# Keyboard. | ||
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'bg+phonetic')]" | ||
gsettings set org.gnome.desktop.input-sources per-window true | ||
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable true | ||
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-max-speed 1100 | ||
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-init-delay 60 | ||
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-accel-time 600 | ||
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-accel-time 600 | ||
|
||
# Night light. | ||
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true | ||
gsettings set org.gnome.settings-daemon.plugins.color night-light-schedule-automatic false | ||
gsettings set org.gnome.settings-daemon.plugins.color night-light-schedule-from 5 | ||
gsettings set org.gnome.settings-daemon.plugins.color night-light-schedule-to 5 | ||
gsettings set org.gnome.settings-daemon.plugins.color night-light-temperature 2700 | ||
|
||
# Power. | ||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' | ||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 5400 | ||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' | ||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 3600 | ||
|
||
# Appearance. | ||
gsettings set org.gnome.desktop.interface clock-show-date true | ||
gsettings set org.gnome.desktop.interface clock-show-weekday true | ||
gsettings set org.gnome.desktop.interface clock-format '24h' | ||
gsettings set org.gnome.desktop.interface show-battery-percentage true | ||
|
||
# Miscellaneous. | ||
gsettings set org.gnome.system.locale region 'en_GB.UTF-8' | ||
gsettings set org.gnome.desktop.media-handling autorun-never true | ||
gsettings set org.gnome.desktop.privacy send-software-usage-stats false | ||
gsettings set org.gnome.desktop.privacy report-technical-problems false | ||
gsettings set org.gnome.mutter center-new-windows true | ||
gsettings set org.gtk.Settings.FileChooser show-hidden true | ||
gsettings set org.gtk.Settings.FileChooser sort-directories-first true | ||
gsettings set org.gnome.nautilus.preferences show-delete-permanently true | ||
gsettings set org.gnome.nautilus.preferences show-hidden-files true | ||
|
||
##@ Software | ||
|
||
dnf-packages: ## Install DNF packages. | ||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc && \ | ||
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' && \ | ||
dnf check-update && \ | ||
sudo dnf install -y code | ||
|
||
sudo dnf install -y \ | ||
lshw \ | ||
nmap \ | ||
powerline \ | ||
powerline-fonts \ | ||
tmux \ | ||
tmux-powerline \ | ||
htop \ | ||
iftop \ | ||
bat \ | ||
alacritty | ||
|
||
apt-packages: ## Install APT packages. | ||
sudo apt-get update && sudo apt-get upgrade -y | ||
|
||
sudo apt-get install -y \ | ||
curl \ | ||
whois \ | ||
net-tools \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
gnupg \ | ||
software-properties-common \ | ||
nmap \ | ||
htop \ | ||
iftop \ | ||
tmux \ | ||
tree \ | ||
xclip \ | ||
powerline \ | ||
fonts-powerline \ | ||
bat \ | ||
git \ | ||
cmake \ | ||
ruby-dev \ | ||
shc \ | ||
python3-pip \ | ||
pipenv \ | ||
python3-tk \ | ||
libseccomp-dev \ | ||
protobuf-compiler \ | ||
imagemagick \ | ||
gimp | ||
|
||
homebrew-packages: ## Install Homebrew packages. | ||
brew install go | ||
brew install node | ||
brew install helm | ||
brew install kubectl | ||
brew install minikube | ||
brew install k9s | ||
brew install lazygit | ||
brew install shellcheck | ||
brew install shfmt | ||
brew install hugo | ||
|
||
homebrew: ## Install Homebrew. | ||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
brew analytics off | ||
|
||
tpm: ## Install Tmux Plugin Manager. | ||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | ||
|
||
##@ Common | ||
|
||
configuration: ## Apply configurations of packages and dotfiles. | ||
cp -r .profile.d ~/.profile.d | ||
cp -r .bashrc.d ~/.bashrc.d | ||
cp -r .config/alacritty ~/.config/alacritty | ||
cp -r .config/powerline ~/.config/powerline | ||
cp -r .config/lazygit ~/.config/lazygit | ||
cp -r .config/htop ~/.config/htop | ||
cp .bash_profile ~/ | ||
cp .bashrc ~/ | ||
cp .gitconfig ~/ | ||
cp .inputrc ~/ | ||
cp .npmrc ~/ | ||
cp .tmux.conf ~/ | ||
|
||
-test "$(OS_ID)" = "fedora" && printf '%s\n\n%s\n%s\n' \ | ||
'# Code generated by dotfiles.' \ | ||
"export POWERLINE_BASH_CONFIG='/usr/share/powerline/bash/powerline.sh'" \ | ||
"export POWERLINE_TMUX_CONFIG='/usr/share/tmux/powerline.conf'" > ~/.profile.d/exports.df.sh | ||
|
||
-test "$(OS_ID)" = "ubuntu" && printf '%s\n\n%s\n%s\n' \ | ||
'# Code generated by dotfiles.' \ | ||
"export POWERLINE_BASH_CONFIG='/usr/share/powerline/bindings/bash/powerline.sh'" \ | ||
"export POWERLINE_TMUX_CONFIG='/usr/share/powerline/bindings/tmux/powerline.conf'" > ~/.profile.d/exports.df.sh | ||
|
||
gpg-key: ## Generate GPG key. | ||
@gpg --full-generate-key | ||
|
||
ssh-keys: ## Generate SSH keys. | ||
@echo "$(USER) - $(OS_NAME)" > /tmp/identity | ||
ssh-keygen -q -t rsa -b 4096 -C "$$(cat /tmp/identity)" -f ~/.ssh/id_rsa | ||
ssh-keygen -q -t ed25519 -C "$$(cat /tmp/identity)" -f ~/.ssh/id_ed25519 | ||
|
||
default-apps: ## Set default applications. | ||
xdg-mime default code.desktop text/plain | ||
|
||
##@ Development | ||
|
||
fmt: ## Format code. | ||
@shfmt -w -s . | ||
|
||
lint: ## Lint code. | ||
@shfmt -d -s . | ||
@shellcheck $$(shfmt -f .) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.