X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/e32b3547cfac32db38c463aac72b1442c75dfead..99c1fd2361284f147a5a45544074b3e62531942a:/rc.org diff --git a/rc.org b/rc.org index dd9ca0a..c8c71bc 100644 --- a/rc.org +++ b/rc.org @@ -3771,6 +3771,10 @@ insert_pass="Alt+n" #+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 @@ -3823,8 +3827,8 @@ input "2:7:SynPS/2_Synaptics_TouchPad" { 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 + xkb_layout us_ab,ir + xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle } @@ -3990,6 +3994,27 @@ mode "resize" { } 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" + + # back to normal: Enter, Escape, or q + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym q mode "default" +} +bindsym XF86PowerOff mode "$mode_system" + # # Status Bar: # @@ -4005,7 +4030,7 @@ bar { } # font pango: benis uushi 9 -font pango: Ubuntu Mono 9 +font pango: Ubuntu Mono 11 include /etc/sway/config.d/* #+end_src @@ -5022,6 +5047,18 @@ URxvt.color7: #D3D7CF URxvt.color15: #EEEEEC #+end_src +*** xkb us_ab keyboard layout + +#+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none +default partial alphanumeric_keys +xkb_symbols "us_ab" { + include "us(basic)" + name[Group1]= "English (US)(aminb)"; + + key { [ Alt_R ] }; +}; +#+end_src + ** XDG :PROPERTIES: :header-args+: :tangle ~/.config/user-dirs.dirs