: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
### Idle configuration
exec swayidle \
- timeout 120 'swaymsg "output * dpms off"' \
- resume 'swaymsg "output * dpms on"' \
+ timeout 120 '[ -f ~/.nosleep ] || swaymsg "output * dpms off"' \
+ resume '[ -f ~/.nosleep ] || swaymsg "output * dpms on"' \
before-sleep swaylock
}
bindsym XF86PowerOff mode "$mode_system"
+#
+# Presentation mode
+#
+
+bindsym $mod+$mod2+p exec [ ! -e ~/.nosleep ] && touch ~/.nosleep || rm ~/.nosleep
+
+#
+# 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:
#
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
#+begin_src bash
export _JAVA_AWT_WM_NONREPARENTING=1
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
-light -Scrs "intel_backlight" 2
+light -Nr 2
source $HOME/.zprofile
sway
#+end_src