sway: write a bad one-liner
This commit is contained in:
parent
6c6ea5f157
commit
3309392b6d
|
@ -83,6 +83,9 @@ in
|
||||||
"${mod}+k" = "move workspace to right";
|
"${mod}+k" = "move workspace to right";
|
||||||
"${mod}+l" = "exec swaylock";
|
"${mod}+l" = "exec swaylock";
|
||||||
"${mod}+Mod1+e" = "exec wofi-emoji";
|
"${mod}+Mod1+e" = "exec wofi-emoji";
|
||||||
|
|
||||||
|
"${mod}+Mod1+q" = "kill";
|
||||||
|
|
||||||
# Sink 0 means the default AIUI
|
# Sink 0 means the default AIUI
|
||||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%";
|
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%";
|
||||||
"Shift+XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +1%";
|
"Shift+XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +1%";
|
||||||
|
@ -93,8 +96,13 @@ in
|
||||||
"Shift+XF86MonBrightnessUp" = "exec light -A 1";
|
"Shift+XF86MonBrightnessUp" = "exec light -A 1";
|
||||||
"XF86MonBrightnessDown" = "exec light -U 5";
|
"XF86MonBrightnessDown" = "exec light -U 5";
|
||||||
"Shift+XF86MonBrightnessDown" = "exec light -U 1";
|
"Shift+XF86MonBrightnessDown" = "exec light -U 1";
|
||||||
"Print" = ''exec grim "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"'';
|
|
||||||
"Shift+Print" = ''exec grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"'';
|
# sorry
|
||||||
|
"Print" = ''exec ${pkgs.writeScript "bad-screenshot" ''
|
||||||
|
grim -g "$(swaymsg -t get_tree | jq -r '.. | .nodes? | .[]? | . as $parent | .nodes[] | select(.pid? and .visible?) | "\($parent.rect.x + .deco_rect.x),\($parent.rect.y + .deco_rect.y) \(.rect.width)x\(.rect.height + .deco_rect.height)"' | slurp -r -o)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"
|
||||||
|
''}'';
|
||||||
|
"Shift+Print" = ''exec grim -g "$(slurp -d)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"'';
|
||||||
|
"Mod1+Print" = ''exec grim "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"'';
|
||||||
}
|
}
|
||||||
// extraGotoBindings
|
// extraGotoBindings
|
||||||
// extraMoveBindings
|
// extraMoveBindings
|
||||||
|
|
Loading…
Reference in a new issue