diff options
-rw-r--r-- | dotfiles/.config/sway/config | 7 | ||||
-rw-r--r-- | dotfiles/.config/zsh/shortcuts | 2 | ||||
-rwxr-xr-x | dotfiles/.local/bin/lock-color | 5 | ||||
-rwxr-xr-x | dotfiles/.local/bin/swayresize | 5 |
4 files changed, 17 insertions, 2 deletions
diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index ba88469..1019d0a 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -4,6 +4,7 @@ # Set mod key (Mod1=<Alt>, Mod4=<Super>) set $mod Mod4 +set $alt Mod1 set $term termite set $browser "qutebrowser" @@ -326,13 +327,19 @@ bindsym --to-code { # Shut down, restart and locking features $mod+Shift+e exec menusession + # Resize $mod+Shift+y exec --no-startup-id swayresize left $mod+Shift+u exec --no-startup-id swayresize down $mod+Shift+i exec --no-startup-id swayresize up $mod+Shift+o exec --no-startup-id swayresize right + $mod+Ctrl+y exec --no-startup-id swayresize left 10 + $mod+Ctrl+u exec --no-startup-id swayresize down 10 + $mod+Ctrl+i exec --no-startup-id swayresize up 10 + $mod+Ctrl+o exec --no-startup-id swayresize right 10 # Lock screen $mod+x exec --no-startup-id lock-color + $mod+Shift+x exec --no-startup-id lock-color screenon # Gaps $mod+semicolon gaps inner current set 15; gaps outer current set 0 diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index 990d485..6081b30 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -25,7 +25,7 @@ alias spw="setsid $TERMINAL >/dev/null 2>&1 &" # Fuzzy finder alias fzd='cd "$(find * -type d | fzf || echo ".")"' -alias fzv='nvim $(fzf)' +alias fzv='nvim $(find * -type f | fzf)' # Mounting drive shortcuts alias mnt="udisksctl mount -b" diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color index 0026842..2d30e0b 100755 --- a/dotfiles/.local/bin/lock-color +++ b/dotfiles/.local/bin/lock-color @@ -4,7 +4,10 @@ swaymsg input type:keyboard xkb_switch_layout 0 gpg-connect-agent --no-autostart reloadagent /bye -swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' & +if [ "$1" != "screenon" ]; then + swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' & +fi + swaylock pkill -n swayidle diff --git a/dotfiles/.local/bin/swayresize b/dotfiles/.local/bin/swayresize index 9ae94c0..89368e9 100755 --- a/dotfiles/.local/bin/swayresize +++ b/dotfiles/.local/bin/swayresize @@ -1,9 +1,14 @@ #!/bin/sh # This script was made by `goferito` on Github. # Some cleanup by Luke. +# Some improvements by Yaroslav. [ -z "$1" ] && echo "No direction provided" && exit 1 + distanceStr="2 px or 2 ppt" +if [ -n "$2" ]; then + distanceStr="$(printf "%s px or %s ppt" "$2" "$2")" +fi moveChoice() { swaymsg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ |