From f30d026a9dda97f89ce7c09e7428b478045f1076 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 8 Aug 2022 23:35:16 +0300 Subject: [PATCH] config: improve bootstrapping of doom & co --- .config/doom/.gitignore | 1 + .../{user.el##default => user.template.el} | 0 .config/sway/config.d/resize.conf | 10 +++++++ .config/sway/definitions.d/modifiers.conf | 6 +++++ .config/yadm/bootstrap | 27 ++++++++++++------- .config/yadm/unignore | 1 + 6 files changed, 35 insertions(+), 10 deletions(-) rename .config/doom/{user.el##default => user.template.el} (100%) create mode 100644 .config/sway/config.d/resize.conf create mode 100644 .config/sway/definitions.d/modifiers.conf diff --git a/.config/doom/.gitignore b/.config/doom/.gitignore index e273441..d0755d7 100644 --- a/.config/doom/.gitignore +++ b/.config/doom/.gitignore @@ -1,3 +1,4 @@ local.el +user.el custom.el user.el diff --git a/.config/doom/user.el##default b/.config/doom/user.template.el similarity index 100% rename from .config/doom/user.el##default rename to .config/doom/user.template.el diff --git a/.config/sway/config.d/resize.conf b/.config/sway/config.d/resize.conf new file mode 100644 index 0000000..20dd99a --- /dev/null +++ b/.config/sway/config.d/resize.conf @@ -0,0 +1,10 @@ +## Resize in normal mode with vim keys +$bindsym $mod+Ctrl+Shift+$left resize shrink width 20px +$bindsym $mod+Ctrl+Shift+$down resize grow height 20px +$bindsym $mod+Ctrl+Shift+$up resize shrink height 20px +$bindsym $mod+Ctrl+Shift+$right resize grow width 20px +# Or with arrow keys +$bindsym $mod+Ctrl+Shift+Left resize shrink width 20px +$bindsym $mod+Ctrl+Shift+Down resize grow height 20px +$bindsym $mod+Ctrl+Shift+Up resize shrink height 20px +$bindsym $mod+Ctrl+Shift+Right resize grow width 20px diff --git a/.config/sway/definitions.d/modifiers.conf b/.config/sway/definitions.d/modifiers.conf new file mode 100644 index 0000000..bbede12 --- /dev/null +++ b/.config/sway/definitions.d/modifiers.conf @@ -0,0 +1,6 @@ +set $term kitty + +set $left h +set $down j +set $up k +set $right l diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index 094c55a..d1ea77d 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -31,6 +31,11 @@ test -d "/etc/yadm" || sy clone SECTION "Software" +doomuser="$XDG_CONFIG_HOME/doom/user.el" +test -d "$(dirname "$doomuser")" && + ! test -f "$doomuser" && + cp -v "$(dirname "$doomuser")/user.template.el" "$doomuser" + link() { test -e "$2" -o -h "$2" || $($HOME/.local/bin/scripts/checkaccess -w "$2" || echo sudo) ln -sv "$@" } @@ -46,7 +51,7 @@ link batcat /usr/bin/bat highlight "SSH Permissions" chmod og= $HOME/.ssh -R -chmod a+r $HOME/.ssh/keys/*.pub +test -d "$HOME/.ssh/keys" && chmod a+r $HOME/.ssh/keys/*.pub _ovpn="$XDG_DATA_HOME/openvpn" test -d "$_ovpn" && sudo rm -vdf /etc/openvpn/client && @@ -85,15 +90,17 @@ if test -f /etc/pacman.conf; then subhighlight "Pacman" sudo sed -i 's/#Color/Color/' /etc/pacman.conf sudo sed -i "$(grep -n "\[multilib\]" /etc/pacman.conf | cut -d':' -f1),+1 s/# *//" /etc/pacman.conf - subhighlight "Reflector" + if which reflector 2>/dev/null + then subhighlight "Reflector" echo "--save /etc/pacman.d/mirrorlist - --protocol https - --country Germany - --latest 50 - --score 10 - --sort rate" | sudo tee /etc/xdg/reflector/reflector.conf - sudo systemctl start reflector & - sudo systemctl enable reflector.timer + --protocol https + --country Germany + --latest 50 + --score 10 + --sort rate" | sudo tee /etc/xdg/reflector/reflector.conf + sudo systemctl start reflector & + sudo systemctl enable reflector.timer + fi fi test "$DISPLAY" || exit 0 @@ -111,7 +118,7 @@ if ! test -d "$mx" then mkdir "$mx" && ln -sv -t "$mx" ${XDG_DATA_HOME:-$HOME/.local/share}/mixxx/* ${XDG_CONFIG_HOME:-$HOME/.config}/mixxx/* fi -subhighlight "Block internet at night & on weekdays in the morning to force focus" +#subhighlight "Block internet at night & on weekdays in the morning to force focus" #walli 22 --save # TODO netkeeper diff --git a/.config/yadm/unignore b/.config/yadm/unignore index f47da36..ae713b3 100644 --- a/.config/yadm/unignore +++ b/.config/yadm/unignore @@ -4,5 +4,6 @@ $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/nvim $XDG_CONFIG_HOME/espanso $XDG_CONFIG_HOME/zsh/completion +$XDG_CONFIG_HOME/sway/*.d/*.conf $CONFIG_SHELLS $HOME/.local/bin/*/