diff --git a/sway/config b/sway/config index c3926d0..d17fc71 100644 --- a/sway/config +++ b/sway/config @@ -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: diff --git a/sway/scripts/menu b/sway/scripts/menu new file mode 100755 index 0000000..aa6f65f --- /dev/null +++ b/sway/scripts/menu @@ -0,0 +1,5 @@ +#! /bin/sh +rofi \ + -show drun \ + -p run \ + -run-command 'swaymsg exec -- {cmd}' diff --git a/sway/scripts/menu_clipman b/sway/scripts/menu_clipman new file mode 100755 index 0000000..2448948 --- /dev/null +++ b/sway/scripts/menu_clipman @@ -0,0 +1,2 @@ +#! /bin/sh +clipman --selector="rofi" --select diff --git a/sway/scripts/menu_gopass b/sway/scripts/menu_gopass new file mode 100755 index 0000000..8abea02 --- /dev/null +++ b/sway/scripts/menu_gopass @@ -0,0 +1,4 @@ +#! /bin/sh +gopass ls --flat \ + | rofi -dmenu -p pass -i \ + | xargs --no-run-if-empty gopass show -c \ No newline at end of file diff --git a/sway/scripts/printscreen b/sway/scripts/printscreen new file mode 100755 index 0000000..e75fec1 --- /dev/null +++ b/sway/scripts/printscreen @@ -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" \ No newline at end of file