summaryrefslogtreecommitdiff
path: root/.config/sway
diff options
context:
space:
mode:
authorMehdi Sadeghi <mehdi@mehdix.org>2024-10-28 06:44:29 +0100
committerMehdi Sadeghi <mehdi@mehdix.org>2024-10-28 12:13:35 +0100
commit0292495bc60b725a9e790ff2fbef2d0cdb0c8671 (patch)
tree9ae0556153048a3e1a8f82584746ac37279d6ed3 /.config/sway
parentfff7d4005078e26c93d64bf1cf1f63440a21fd0e (diff)
Add new i3 placeholders; cleanupHEADmaster
Diffstat (limited to '.config/sway')
-rw-r--r--.config/sway/blue0321
-rw-r--r--.config/sway/config23
2 files changed, 19 insertions, 5 deletions
diff --git a/.config/sway/blue032 b/.config/sway/blue032
deleted file mode 100644
index 812b029..0000000
--- a/.config/sway/blue032
+++ /dev/null
@@ -1 +0,0 @@
-output eDP-1 pos 0 0
diff --git a/.config/sway/config b/.config/sway/config
index 1e25051..8f0caa3 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -29,7 +29,15 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
-
+# Note: use idlehack to prevent idle when Firefox/Chromium is playing video. See
+# https://wiki.archlinux.org/title/Sway and
+# https://github.com/loops/idlehack
+exec swayidle -w \
+ idlehint 30 \
+ timeout 300 'swaylock -f -c 000000 -i ~/Pictures/wave.jpg' \
+ timeout 600 'swaymsg "output * power off"' \
+ before-sleep 'playerctl pause; swaylock -f -i ~/Pictures/wave.jpg' \
+ after-resume 'swaymsg "output * power on"'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
@@ -48,9 +56,10 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
+# See man 7 xkeyboard-config for available options
input * {
- xkb_layout "de(nodeadkeys),ir"
- xkb_options "lv3:caps_switch,grp:lctrl_lwin_toggle,shift:both_shiftlock"
+ xkb_layout "eu,ir,de(nodeadkeys)"
+ xkb_options "lv3:caps_switch,grp:lctrl_lwin_toggle,shift:both_shiftlock,grp_led:scroll"
}
input "9456:320:Metadot_-_Das_Keyboard_Das_Keyboard" {
@@ -71,8 +80,12 @@ bindsym --to-code --no-warn {
$mod+Shift+q kill
$mod+Shift+c reload
$mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
+ $mod+Pause exec systemctl suspend -i
}
+# Launchers
+bindsym $mod+x exec fuzzel
+
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
@@ -236,7 +249,7 @@ bar {
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
- status_command while echo $USER@$(hostname) $(date +'%A W%V %Y-%m-%d %l:%M:%S %p'); do sleep 1; done
+ status_command while echo $(get-layout.sh) $USER@$(hostname) $(date +'%A W%V %Y-%m-%d %l:%M:%S %p'); do sleep 1; done
colors {
statusline #ffffff
@@ -258,3 +271,5 @@ include ~/.config/sway/`hostname`
# Prepare for xdg-desktop-portal-wlr
exec ~/.config/sway/xdpw
+# Everything else
+include /etc/sway/config.d/*