From db6706d3211ba2841140ec0a7101d9b740b86363 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 10 Sep 2020 09:48:36 +0300 Subject: swayresize: resize amount * Resize by a custom amount of pixels; Default is 2 pixels. * Added shortcut to sway config to resize by 10 pixels. --- dotfiles/.local/bin/swayresize | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dotfiles/.local/bin') 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' || \ -- cgit v1.2.3 From d48fc92bcb7c0dbf49883aab54ff495d95386785 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 10 Sep 2020 09:50:02 +0300 Subject: shortcut to lock screen without screen timeout --- dotfiles/.local/bin/lock-color | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dotfiles/.local/bin') 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 -- cgit v1.2.3