X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/05675ca412a71780a088dc93c07cf0b2cd80c23e..405e14e90746a8cc694865ef1e29e78f4c690883:/rc.org diff --git a/rc.org b/rc.org index bdc4947..51a9c97 100644 --- a/rc.org +++ b/rc.org @@ -3761,17 +3761,13 @@ insert_pass="Alt+n" #+end_src ** sway + +*** main :PROPERTIES: :header-args+: :tangle ~/.config/sway/config :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 @@ -3798,36 +3794,10 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill ### Idle configuration exec swayidle \ - timeout 120 swaylock \ - timeout 180 '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 -### Input configuration - -input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" { - dwt enabled - tap enabled - natural_scroll enabled - middle_emulation enabled - click_method clickfinger -} - -input "2:7:SynPS/2_Synaptics_TouchPad" { - events disabled - dwt enabled - tap enabled - natural_scroll enabled - click_method clickfinger -} - -input "1:1:AT_Translated_Set_2_keyboard" { - repeat_delay 200 - repeat_rate 45 - xkb_layout us_ab,ir - xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle -} - ### Key bindings # @@ -3994,16 +3964,15 @@ bindsym $mod+Shift+r mode "resize" # # Power button # -set $locker swaylock && sleep 1 set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown mode "$mode_system" { - bindsym l exec $locker, mode "default" - bindsym e exec swaymsg exit, mode "default" - bindsym s exec $locker && systemctl suspend, mode "default" - bindsym h exec $locker && systemctl hibernate, mode "default" - bindsym r exec systemctl reboot, mode "default" - bindsym Shift+s exec systemctl poweroff -i, mode "default" + bindsym l exec swaylock, mode "default" + bindsym e exec swaymsg exit, mode "default" + bindsym s exec systemctl suspend, mode "default" + bindsym h exec systemctl hibernate, mode "default" + bindsym r exec systemctl reboot, mode "default" + bindsym Shift+s exec systemctl poweroff -i, mode "default" # back to normal: Enter, Escape, or q bindsym Return mode "default" @@ -4012,6 +3981,39 @@ mode "$mode_system" { } 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: # @@ -4032,9 +4034,63 @@ 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 +:PROPERTIES: +:header-args+: :tangle ~/.config/sway/langa +:END: + +#+begin_src conf +input "2:7:SynPS/2_Synaptics_TouchPad" { + events disabled + dwt enabled + tap enabled + natural_scroll enabled + click_method clickfinger +} + +input "1:1:AT_Translated_Set_2_keyboard" { + repeat_delay 200 + repeat_rate 45 + xkb_layout us_ab,ir + xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle +} #+end_src +*** shemshak +:PROPERTIES: +:header-args+: :tangle ~/.config/sway/shemshak +:END: + +#+begin_src conf +input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" { + dwt enabled + tap enabled + natural_scroll enabled + middle_emulation enabled + click_method clickfinger +} + +input "1:1:AT_Translated_Set_2_keyboard" { + repeat_delay 200 + repeat_rate 45 + xkb_layout us,ir + xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle +} +#+end_src ** swaylock :PROPERTIES: :header-args+: :tangle ~/.config/swaylock/config @@ -4360,9 +4416,9 @@ DEVICES_TO_DISABLE_ON_STARTUP="bluetooth" #DEVICES_TO_DISABLE_ON_UNDOCK="" #+end_src -*** pary +*** shemshak -#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "pary")) "/sudo::/etc/default/tlp") +#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp") # ------------------------------------------------------------------------------ # tlp - Parameters for power saving # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html @@ -5328,7 +5384,7 @@ alias mv="mv -iv" alias cp="cp -iv" alias scl=systemctl alias jcl=journalctl -alias m="mbsync -Va; getmail; notmuch new" +alias m="mbsync -a; getmail; notmuch new" alias best="youtube-dl -f best" alias nixx="ssh amin@nix.aminb.org" alias fence="ssh aminb@fencepost.gnu.org" @@ -5400,7 +5456,7 @@ light -S $val #+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