diff options
author | Amin Bandali <bandali@gnu.org> | 2018-10-20 16:12:36 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2018-10-20 16:12:36 -0400 |
commit | ff3efe943f4ef305d125f2419ec0fe3ca1823274 (patch) | |
tree | 2a05f5f40af78d1ac0af65457db31c1136191cce | |
parent | c19f32f3a42be928e9758e4fb8925ecadaba838e (diff) | |
download | configs-ff3efe943f4ef305d125f2419ec0fe3ca1823274.tar.gz configs-ff3efe943f4ef305d125f2419ec0fe3ca1823274.tar.xz configs-ff3efe943f4ef305d125f2419ec0fe3ca1823274.zip |
[rc/sway] add notifications and screenshotting
deps: mako, grim, and slurp (all by emersion)
-rw-r--r-- | rc.org | 42 |
1 files changed, 36 insertions, 6 deletions
@@ -3768,12 +3768,6 @@ insert_pass="Alt+n" :END: #+begin_src conf -exec xrdb .Xresources -exec dunst -exec pgrep -x "systemd-inhibit" || \ - systemd-inhibit --what=handle-power-key --who=aminb \ - --why="Handle power button in sway" sleep infinity - ### Variables # super set $mod Mod4 @@ -3988,6 +3982,33 @@ mode "$mode_system" { bindsym XF86PowerOff mode "$mode_system" # +# Notifications +# + +bindsym $mod+Shift+n mode notifications +mode notifications { + bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default + bindsym d exec makoctl dismiss; mode default + bindsym Shift+d exec makoctl dismiss -a; mode default + + bindsym Escape mode default + bindsym q mode default +} + +# +# Screenshotting +# + +bindsym $mod+Shift+s mode screenshot +mode screenshot { + bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default + bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default + + bindsym Escape mode default + bindsym q mode default +} + +# # Status Bar: # # Read `man 5 sway-bar` for more information about this section. @@ -4007,9 +4028,18 @@ bar { font pango: DejaVu Sans Mono 9 # font pango: Liberation Mono 9 +exec xrdb .Xresources +exec pgrep -x "systemd-inhibit" || \ + systemd-inhibit --what=handle-power-key --who=aminb \ + --why="Handle power button in sway" sleep infinity +exec mako 2>&1 >/tmp/mako.log +exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + include /etc/sway/config.d/* include ~/.config/sway/`hostname` +exec systemd-notify --ready || true + #+end_src *** langa |