Moved sway script into separate directory

This commit is contained in:
James Patrick 2019-06-16 18:47:19 -04:00
parent c61227779e
commit 8f0eccefde
5 changed files with 22 additions and 11 deletions

View File

@ -13,13 +13,10 @@ set $term kitty
################################################################################
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
set $menu rofi -m $(expr $(swaymsg -t get_tree | jq '.nodes | map([recurse(.nodes[]?, .floating_nodes[]?) | .focused] | any) | index(true)') - 1) -show drun -p run -run-command 'swaymsg exec -- {cmd}'
set $gopass_menu gopass ls --flat \
| rofi -dmenu -p pass -i \
| xargs --no-run-if-empty gopass show -c
set $clipman_menu clipman --selector="rofi" --select
set $menu bash ~/.config/sway/scripts/menu
set $gopass_menu bash ~/.config/sway/scripts/menu_gopass
set $clipman_menu bash ~/.config/sway/scripts/menu_clipman
set $printscreen bash ~/.config/sway/scripts/printscreen
### Idle configuration
@ -113,15 +110,12 @@ bindsym $mod+Shift+0 move container to workspace 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
bindsym print exec file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S').png \
&& grim -g "$(slurp)" $file \
&& wl-copy $file \
&& notify-send -i $file "File copied to clipboard"
#bindsym $mod+print exec file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S').mp4 \
## && wf-recorder -g "$(slurp)" $file \
## && wl-copy $file \
## && notify-send -i $file "File copied to clipboard"
bindsym print exec $printscreen
################################################################################
# Layout stuff:

5
sway/scripts/menu Executable file
View File

@ -0,0 +1,5 @@
#! /bin/sh
rofi \
-show drun \
-p run \
-run-command 'swaymsg exec -- {cmd}'

2
sway/scripts/menu_clipman Executable file
View File

@ -0,0 +1,2 @@
#! /bin/sh
clipman --selector="rofi" --select

4
sway/scripts/menu_gopass Executable file
View File

@ -0,0 +1,4 @@
#! /bin/sh
gopass ls --flat \
| rofi -dmenu -p pass -i \
| xargs --no-run-if-empty gopass show -c

6
sway/scripts/printscreen Executable file
View File

@ -0,0 +1,6 @@
#! /bin/sh
file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S').png
grim -g "$(slurp)" $file \
&& wl-copy $file \
&& notify-send -i $file "File copied to clipboard"