aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/.config/sway/config17
1 files changed, 11 insertions, 6 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index 826a870..8ab6f9a 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -23,13 +23,16 @@ set $laptop_screen eDP-1
23 23
24# Define the command to sleep 24# Define the command to sleep
25set $cmd_sleep loginctl suspend 25set $cmd_sleep loginctl suspend
26set $cmd_laptop_screen_disable swaymsg output $laptop_screen power off disable
27set $cmd_laptop_screen_enable swaymsg output $laptop_screen power on enable
26 28
27### Application Launcher 29### Application Launcher
28# Note: pass the final command to swaymsg so resulting window can open on 30# Note: pass the final command to swaymsg so resulting window can open on
29# workspace command was run on. 31# workspace command was run on.
30 32
31##### Default: wmenu 33##### Default: wmenu
32set $menu dmenu_path | wmenu | xargs swaymsg exec -- 34#set $menu dmenu_path | wmenu | xargs swaymsg exec --
35set $menu dmenu_path | wofi -S dmenu | xargs swaymsg exec --
33 36
34##### Alacritty popup 37##### Alacritty popup
35# Note: i haven't tested with the new lines + escapes 38# Note: i haven't tested with the new lines + escapes
@@ -49,13 +52,14 @@ output $laptop_screen scale 1.25
49 52
50### Wallpaper 53### Wallpaper
51output * bg ~/Sync/Files/wallpaper/PagedOut_002_wallpaper_30.png fill 54output * bg ~/Sync/Files/wallpaper/PagedOut_002_wallpaper_30.png fill
52# output * bg ~/Sync/Files/wallpaper/Photo\ by\ Pramod\ Tiwari\ \(uvld3ZQxK1g\).jpg fill 55#output * bg ~/Sync/Files/wallpaper/Photo\ by\ Pramod\ Tiwari\ \(uvld3ZQxK1g\).jpg fill
53 56
54############################################################################### 57###############################################################################
55# Idle configuration 58# Idle configuration
56exec swayidle -w \ 59exec swayidle -w \
57 timeout 300 'swaylock -f -c 000000' \ 60 timeout 300 'swaylock -f -c 000000' \
58 timeout 600 'swaymsg "output * power off"' \ 61 timeout 600 'swaymsg "output * power off"' \
62 timeout 900 'loginctl suspend' \
59 resume 'swaymsg "output * power on"' \ 63 resume 'swaymsg "output * power on"' \
60 before-sleep 'swaylock -f -c 000000' 64 before-sleep 'swaylock -f -c 000000'
61 65
@@ -82,10 +86,11 @@ input type:keyboard {
82# Enable clam shell mode with external displays, or sleep without on lid close 86# Enable clam shell mode with external displays, or sleep without on lid close
83# /etc/elogin/logind.conf needs to have ignore set on HandleLidSwitch* 87# /etc/elogin/logind.conf needs to have ignore set on HandleLidSwitch*
84bindswitch --reload --locked lid:on \ 88bindswitch --reload --locked lid:on \
85 exec bash -c '[[ $(swaymsg -r -t get_outputs | jq ". | length") == 1 ]] && ($cmd_sleep) || (swaynag -t warning -m "Laptop screen disabling..." -s "ok" && swaymsg output $laptop_screen disable)' 89 exec bash -c '[[ $(swaymsg -r -t get_outputs | jq ". | length") == 1 ]] && ($cmd_sleep) || (swaynag -t warning -m "Laptop screen disabling..." -s "ok" && $cmd_laptop_screen_disable)'
86bindswitch --reload --locked lid:off output $laptop_screen enable 90bindswitch --reload --locked lid:off \
91 exec ($cmd_laptop_screen_enable)
87# Ensure reloading in clamshell keeps the correct state 92# Ensure reloading in clamshell keeps the correct state
88exec_always '[ "$(cat /proc/acpi/button/lid/LID0/state | awk \'{print $2}\')" == "closed" ] && swaymsg output $laptop_screen disable || swaymsg output $laptop_screen enable' 93exec_always '[ "$(cat /proc/acpi/button/lid/LID0/state | awk \'{ print $2 }\')" == "closed" ] && ($cmd_laptop_screen_disable) || ($cmd_laptop_screen_enable)'
89 94
90############################################################################### 95###############################################################################
91# Key bindings 96# Key bindings
@@ -275,7 +280,7 @@ for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0
275exec [ ! "$(pidof pipewire)" ] && pipewire 280exec [ ! "$(pidof pipewire)" ] && pipewire
276exec [ ! "$(pidof syncthing)" ] && syncthing serve 281exec [ ! "$(pidof syncthing)" ] && syncthing serve
277# Fix for "No Gcr prompter" with pinentry-gnome3 282# Fix for "No Gcr prompter" with pinentry-gnome3
278exec dbus-update-activation-environment 283exec dbus-update-activation-environment DISPLAY XAUTHORITY
279 284
280#exec mako # notifications 285#exec mako # notifications
281#exec kanshi # autorandr 286#exec kanshi # autorandr