aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/.config/sway/config58
1 files changed, 33 insertions, 25 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index 1e576c6..7a4bcae 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -8,6 +8,7 @@
8# Mod4 = Logo key. Mod1 = Alt. 8# Mod4 = Logo key. Mod1 = Alt.
9set $mod Mod4 9set $mod Mod4
10set $alt Mod1 10set $alt Mod1
11set $ctrl Ctrl
11 12
12# Home row direction keys, like vim 13# Home row direction keys, like vim
13set $left h 14set $left h
@@ -25,7 +26,7 @@ set $laptop_screen eDP-1
25set $cmd_sleep loginctl suspend 26set $cmd_sleep loginctl suspend
26set $cmd_laptop_screen_disable swaymsg output $laptop_screen power off disable 27set $cmd_laptop_screen_disable swaymsg output $laptop_screen power off disable
27set $cmd_laptop_screen_enable swaymsg output $laptop_screen power on enable 28set $cmd_laptop_screen_enable swaymsg output $laptop_screen power on enable
28 29set $cmd_resume_clamshell [ "$(cat /proc/acpi/button/lid/LID0/state | awk \'{ print $2 }\')" == "closed" ] && ($cmd_laptop_screen_disable) || ($cmd_laptop_screen_enable)
29### Application Launcher 30### Application Launcher
30# Note: pass the final command to swaymsg so resulting window can open on 31# Note: pass the final command to swaymsg so resulting window can open on
31# workspace command was run on. 32# workspace command was run on.
@@ -34,16 +35,21 @@ set $cmd_laptop_screen_enable swaymsg output $laptop_screen power on enable
34#set $menu dmenu_path | wmenu | xargs swaymsg exec -- 35#set $menu dmenu_path | wmenu | xargs swaymsg exec --
35#set $menu dmenu_path | wofi -S dmenu | xargs swaymsg exec -- 36#set $menu dmenu_path | wofi -S dmenu | xargs swaymsg exec --
36 37
37##### Terminal popup 38##### Terminal Launchers (specific to foot. alacritty works too with different options)
39set $launcher_alpha 0.9
40# App Launcher
38set $menu exec foot \ 41set $menu exec foot \
39 --app-id=launcher \ 42 --app-id=launcher \
43 -o colors.alpha=$launcher_alpha \
40 bash -c 'compgen -c | grep -v fzf | sort -u \ 44 bash -c 'compgen -c | grep -v fzf | sort -u \
41 | fzf --layout=reverse | xargs -r swaymsg -t command exec' 45 | fzf --layout=reverse | xargs -r swaymsg -t command exec'
42bindsym Ctrl+$alt+v exec foot \ 46
47# Clipboard History
48bindsym $ctrl+$alt+v exec foot \
43 --app-id=launcher \ 49 --app-id=launcher \
44 bash -c 'cliphist list | cliphist-fzf-sixel | cliphist decode \ 50 -o colors.alpha=$launcher_alpha \
45 | wl-copy --primary' 51 cliphist-fzf-sixel
46for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8 52for_window [app_id="^launcher$"] floating enable, border none #, opacity $launcher_alpha
47 53
48############################################################################### 54###############################################################################
49# Output configuration 55# Output configuration
@@ -58,12 +64,13 @@ output * bg ~/Sync/Files/wallpaper/PagedOut_002_wallpaper_30.png fill
58 64
59############################################################################### 65###############################################################################
60# Idle configuration 66# Idle configuration
67# swaymsg -t get_outputs --raw | jq '.[] | .name + " " + (.power | tostring) + " " + (.active | tostring) + " " + .model + " " + (.current_mode.width | tostring) + "x" + (.current_mode.height | tostring)'
61exec swayidle -w \ 68exec swayidle -w \
62 timeout 300 'swaylock -f -c 000000' \ 69 timeout 300 'swaylock -f -c 000000' \
63 timeout 600 'swaymsg "output * power off"' \ 70 timeout 305 'swaymsg "output * power off"' resume 'swaymsg "output * power on enable" && multimonitor.sh wosleep' \
64 timeout 900 'loginctl suspend' \ 71 timeout 900 'loginctl suspend' resume 'swaymsg "output * power on enable" && multimonitor.sh wosleep' \
65 resume 'swaymsg "output * power on"' \ 72 before-sleep 'swaylock -f -c 000000' \
66 before-sleep 'swaylock -f -c 000000' 73 after-resume 'swaymsg "output * power on enable" && multimonitor.sh wosleep'
67 74
68# Inhibit idle if a window is full screen (e.g. videos) 75# Inhibit idle if a window is full screen (e.g. videos)
69for_window [class="^.*"] inhibit_idle fullscreen \ 76for_window [class="^.*"] inhibit_idle fullscreen \
@@ -76,9 +83,9 @@ for_window [class="^.*"] inhibit_idle fullscreen \
76# Read `man 5 sway-input` for more information about this section. 83# Read `man 5 sway-input` for more information about this section.
77 84
78input "2362:628:PIXA3854:00_093A:0274_Touchpad" { 85input "2362:628:PIXA3854:00_093A:0274_Touchpad" {
86 # Framework 16"
79 tap enabled 87 tap enabled
80 # disable while typing 88 # dwt enabled # disable while typing
81 # dwt enabled
82} 89}
83 90
84input type:keyboard { 91input type:keyboard {
@@ -87,12 +94,14 @@ input type:keyboard {
87 94
88# Enable clam shell mode with external displays, or sleep without on lid close 95# Enable clam shell mode with external displays, or sleep without on lid close
89# /etc/elogin/logind.conf needs to have ignore set on HandleLidSwitch* 96# /etc/elogin/logind.conf needs to have ignore set on HandleLidSwitch*
90bindswitch --reload --locked lid:on \ 97bindswitch --reload --locked lid:on exec multimonitor.sh
91 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)' 98 # exec bash -c '[[ $(swaymsg -r -t get_outputs | jq ". | length") == 1 ]] && ($cmd_sleep) || ($cmd_laptop_screen_disable)'
92bindswitch --reload --locked lid:off \ 99bindswitch --reload --locked lid:off exec multimonitor.sh
93 exec ($cmd_laptop_screen_enable) 100 # exec ($cmd_laptop_screen_enable)
94# Ensure reloading in clamshell keeps the correct state 101# Ensure reloading config while in clamshell keeps the correct state
95exec_always '[ "$(cat /proc/acpi/button/lid/LID0/state | awk \'{ print $2 }\')" == "closed" ] && ($cmd_laptop_screen_disable) || ($cmd_laptop_screen_enable)' 102# exec_always '[ "$(cat /proc/acpi/button/lid/LID0/state | awk \'{ print $2 }\')" == "closed" ] && ($cmd_laptop_screen_disable) || ($cmd_laptop_screen_enable)'
103# v2 exec_always '$cmd_resume_clamshell'
104exec_always multimonitor.sh
96 105
97############################################################################### 106###############################################################################
98# Key bindings 107# Key bindings
@@ -272,19 +281,18 @@ for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0
272# fixed in Firefox. 281# fixed in Firefox.
273# for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable 282# for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable
274 283
275# Fix slow loading GTK+ apps, waybar, and GPG pinentry 284# Fix for "No Gcr prompter" with pinentry-gnome3
276# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK 285exec dbus-update-activation-environment DISPLAY XAUTHORITY
277# exec hash dbus-update-activation-environment 2>/dev/null && \
278# dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XAUTHORITY
279 286
280############################################################################### 287###############################################################################
281# Startup Apps 288# Startup Apps
282exec [ ! "$(pidof pipewire)" ] && pipewire 289exec [ ! "$(pidof pipewire)" ] && pipewire
283exec [ ! "$(pidof syncthing)" ] && syncthing serve 290exec [ ! "$(pidof syncthing)" ] && syncthing serve
284exec [ ! "$(ps x | grep wl-paste.*cliphist | wc -l)" -ge 4 ] && wl-paste --watch cliphist store
285 291
286# Fix for "No Gcr prompter" with pinentry-gnome3 292# firefox copies an image multiple ways so accept both types of media. the script for
287exec dbus-update-activation-environment DISPLAY XAUTHORITY 293# history selection filters out firefox's text copy.
294exec [ ! "$(ps x | grep wl-paste.*image.*cliphist | wc -l)" -ge 4 ] && wl-paste --type image --watch cliphist store
295exec [ ! "$(ps x | grep wl-paste.*text.*cliphist | wc -l)" -ge 4 ] && wl-paste --type text --watch cliphist store
288 296
289#exec mako # notifications 297#exec mako # notifications
290#exec kanshi # autorandr 298#exec kanshi # autorandr