#+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
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
-#
-# Example configuration:
-#
-#exec swayidle \
-# timeout 300 'swaylock -c 000000' \
-# timeout 600 'swaymsg "output * dpms off"' \
-# resume 'swaymsg "output * dpms on"' \
-# before-sleep 'swaylock -c 000000'
-#
-# This will lock your screen after 300 seconds of inactivity, then turn off
-# your displays after another 600 seconds, and turn your screens back on when
-# resumed. It will also lock your screen before your computer goes to sleep.
+
+exec swayidle \
+ timeout 120 swaylock \
+ timeout 180 'swaymsg "output * dpms off"' \
+ resume 'swaymsg "output * dpms on"' \
+ before-sleep swaylock
### Input configuration
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,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
}
}
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:
#
status_command i3status
}
+# font pango: benis uushi 9
+font pango: Ubuntu Mono 11
+
include /etc/sway/config.d/*
#+end_src
+** swaylock
+:PROPERTIES:
+:header-args+: :tangle ~/.config/swaylock/config
+:END:
+
+#+begin_src conf
+image=/home/amin/usr/pics/wp/wp2445784-blurred-wallpapers.jpg
+scaling=fill
+#+end_src
+
** TLP
*** langa
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 <MENU> { [ Alt_R ] };
+};
+#+end_src
+
** XDG
:PROPERTIES:
:header-args+: :tangle ~/.config/user-dirs.dirs