From 0292495bc60b725a9e790ff2fbef2d0cdb0c8671 Mon Sep 17 00:00:00 2001 From: Mehdi Sadeghi Date: Mon, 28 Oct 2024 06:44:29 +0100 Subject: Add new i3 placeholders; cleanup --- .config/sway/blue032 | 1 - .config/sway/config | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) delete mode 100644 .config/sway/blue032 (limited to '.config/sway') 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/* -- cgit v1.2.3