aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--sway/.config/sway/config30
-rwxr-xr-xsway/.local/bin/import-gsettings (renamed from sway/.local/lib/sway/import-gsettings)0
-rwxr-xr-xsway/.local/bin/sway-vrr24
3 files changed, 32 insertions, 22 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index 1446fc5..8746211 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -5,9 +5,6 @@ set $down j
set $up k
set $right l
-set $out1 -
-set $out2 -
-
set $ws01 1
set $ws02 2
set $ws03 3
@@ -36,8 +33,6 @@ set $base0D #83a598
set $base0E #d3869b
set $base0F #d65d0e
-include ~/.config/sway/config.d/*
-
set $menu $HOME/.local/bin/wmenu
set $j4_sock $XDG_RUNTIME_DIR/j4-dmenu-desktop.sock
@@ -57,17 +52,6 @@ force_display_urgency_hint 1000 ms
default_border pixel
hide_edge_borders --i3 smart
-workspace $ws01 output $out1 $out2
-workspace $ws02 output $out1 $out2
-workspace $ws03 output $out1 $out2
-workspace $ws04 output $out1 $out2
-workspace $ws05 output $out1 $out2
-workspace $ws06 output $out2 $out1
-workspace $ws07 output $out2 $out1
-workspace $ws08 output $out2 $out1
-workspace $ws09 output $out2 $out1
-workspace $ws10 output $out2 $out1
-
output * bg ~/.local/share/gruvbox/sway.png fill
for_window [shell=".*"] inhibit_idle fullscreen
@@ -266,12 +250,14 @@ bar {
}
}
+include ~/.config/sway/config.d/*
include /etc/sway/config.d/*
-exec_always pgrep -x j4-dmenu-deskto || j4-dmenu-desktop --dmenu="$menu" --term-mode=$TERMINAL -I --wait-on=$j4_sock
+exec j4-dmenu-desktop --dmenu="$menu" --term-mode=$TERMINAL -I --wait-on=$j4_sock
-exec {
- import-gsettings
- systemctl --user start sway-session.target
- swaymsg "workspace $ws06; workspace $ws01"
-}
+exec import-gsettings
+
+exec systemctl --user import-environment
+exec systemctl --user start sway-session.target
+
+exec swaymsg "workspace $ws06; workspace $ws01"
diff --git a/sway/.local/lib/sway/import-gsettings b/sway/.local/bin/import-gsettings
index 93cd75b..93cd75b 100755
--- a/sway/.local/lib/sway/import-gsettings
+++ b/sway/.local/bin/import-gsettings
diff --git a/sway/.local/bin/sway-vrr b/sway/.local/bin/sway-vrr
new file mode 100755
index 0000000..e989ce9
--- /dev/null
+++ b/sway/.local/bin/sway-vrr
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+swaymsg -t subscribe -m '[ "window" ]' |
+ jq -c --unbuffered 'select(.change == "focus" or .change == "fullscreen_mode") | .container |
+ if .fullscreen_mode == 1 then
+ { "id": .id, "sync": "enabled", "rt": 1 }
+ else
+ { "id": .id, "sync": "disabled", "rt": 0 }
+ end' |
+ while read -r vals; do
+ swaymsg -t get_tree | jq -r --argjson vals "$vals" --arg regex "$1" '.nodes[] |
+ select((.. | .nodes?[]?.nodes?[]?.id == $vals.id) and (.name | test($regex))) |
+ if .adaptive_sync_status != $vals.sync then
+ [ .name, "adaptive_sync", $vals.sync ] | @sh
+ else
+ empty
+ end,
+ if .max_render_time != $vals.rt then
+ [ .name, "max_render_time", ($vals.rt | if . == 0 then "off" else . end) ] | @sh
+ else
+ empty
+ end'
+ done |
+ xargs -l1 swaymsg output