aboutsummaryrefslogtreecommitdiffstats
path: root/sway/conf.d
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-02-13 00:35:29 +0000
committerLeonardo Bishop <me@leonardobishop.com>2025-02-13 00:35:29 +0000
commit0351672b509d3db2074474641bf23b2a1a5894f1 (patch)
tree80f303738e42aacfb23100ccb5e74c21e214c893 /sway/conf.d
parent0e05994530deb53982ee8559c9fbf99845e15ee7 (diff)
Change screenlocker and update screenshot program
Diffstat (limited to 'sway/conf.d')
-rw-r--r--sway/conf.d/01-system-vars.conf11
-rw-r--r--sway/conf.d/10-environment.conf4
-rw-r--r--sway/conf.d/20-binds.conf8
-rw-r--r--sway/conf.d/21-rules.conf97
4 files changed, 113 insertions, 7 deletions
diff --git a/sway/conf.d/01-system-vars.conf b/sway/conf.d/01-system-vars.conf
index f93a6ac..c02e223 100644
--- a/sway/conf.d/01-system-vars.conf
+++ b/sway/conf.d/01-system-vars.conf
@@ -1,7 +1,10 @@
-set $screenshot_area /usr/bin/grimshot --notify save area - | swappy -f -
-set $screenshot_area_clipboard /usr/bin/grimshot --notify copy area
-set $screenshot_screen /usr/bin/grimshot --notify save screen - | swappy -f -
-set $screenshot_screen_clipboard /usr/bin/grimshot --notify copy screen
+#set $screenshot_area env XDG_CURRENT_DESKTOP=Sway /usr/bin/flameshot gui
+set $screenshot_area /usr/bin/grim -t ppm - | /usr/bin/satty --fullscreen --early-exit --copy-command "wl-copy" -f -
+#set $screenshot_area /usr/bin/shotman -C -a top-right --capture region
+#set $screenshot_window /usr/bin/shotman -C -a top-right ---capture window
+#set $screenshot_screen /usr/bin/shotman -C -a top-right ---capture output
+
+set $clipboard_hist cliphist list | wofi -S dmenu | cliphist decode | wl-copy
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
set $sink_volume_mute pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p"
diff --git a/sway/conf.d/10-environment.conf b/sway/conf.d/10-environment.conf
index 3c97e57..758d3a8 100644
--- a/sway/conf.d/10-environment.conf
+++ b/sway/conf.d/10-environment.conf
@@ -1,5 +1,9 @@
exec "systemctl --user import-environment {,WAYLAND_}DISPLAY SWAYSOCK; systemctl --user start sway-session.target"
exec swaymsg -t subscribe '["shutdown"]' && systemctl --user stop sway-session.target
+exec wl-paste --type text --watch cliphist store
+exec wl-paste --type image --watch cliphist store
+
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
#exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1
+
diff --git a/sway/conf.d/20-binds.conf b/sway/conf.d/20-binds.conf
index 02f032e..f4a4246 100644
--- a/sway/conf.d/20-binds.conf
+++ b/sway/conf.d/20-binds.conf
@@ -92,11 +92,15 @@ bindsym $mod+a focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
+bindsym $mod+c exec $clipboard_hist
+# Clipboard history
+
# Screenshot
bindsym Print exec $screenshot_area
-bindsym Print+Alt exec $screenshot_area_clipboard
+#bindsym Print+Alt exec $screenshot_area_clipboard
bindsym Print+Shift exec $screenshot_screen
-bindsym Print+Shift+Alt exec $screenshot_screen_clipboard
+bindsym Print+Alt exec $screenshot_window
+#bindsym Print+Shift+Alt exec $screenshot_screen_clipboard
# Audio
# bindsym $mod+bracketleft exec pactl set-sink-volume @DEFAULT_SINK@ -5%
diff --git a/sway/conf.d/21-rules.conf b/sway/conf.d/21-rules.conf
index 93feec7..8397f09 100644
--- a/sway/conf.d/21-rules.conf
+++ b/sway/conf.d/21-rules.conf
@@ -21,5 +21,100 @@ for_window [app_id="(?i)Thunderbird" title=".*Reminder"] floating enable
for_window [app_id="Zoom Workplace" title="^zoom$"] border none, floating enable
for_window [app_id="Zoom Workplace" title="^(Zoom|About)$"] border pixel, floating enable
-for_window [app_id=".*"] border normal
for_window [app_id="^chrome-.*-.*$"] shortcuts_inhibitor disable
+
+for_window [shell="xwayland"] title_format "[XWayland] %title"
+
+# stolen from https://gitlab.com/that1communist/dotfiles/-/blob/master/.config/sway/modules/win-rules ...
+#set the variables
+set {
+ $ii inhibit_idle focus
+ $popup floating enable; sticky enable
+ $float floating enable;
+ $video inhibit_idle fullscreen; max_render_time off
+ $important inhibit_idle open; floating enable;
+ $max inhibit_idle visible; floating enable; sticky enable;
+}
+for_window {
+#ii - inhibit_idle focus
+ [class="Cemu"] $ii
+ [instance="cemu"] $ii
+ [app_id="cemu"] $ii
+ [app_id="rpcs3"] $ii
+ [app_id="yuzu"] $ii
+ [class="yuzu"] $ii
+ [app_id="snes9x-gtk"] $ii
+
+#popup - floating enable; sticky enable
+ [app_id="firefox" title="^Picture-in-Picture$"] $popup
+ [app_id="stoken-gui"] $popup
+ [app_id="org.twosheds.iwgtk"] $popup
+ [app_id="iwgtk"] $popup
+ [app_id="ksysguard"] $popup
+ [app_id="net.nokyan.Resources"] $popup
+ [app_id="galculator"] $popup
+ [title="(?:Open|Save) (?:File|Folder|As)" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
+ [title="^(File|Folder)\s*Already Exists\s*—\s*" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
+ [title="Confirm to replace files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
+ [app_id="pavucontrol"] $popup
+ [app_id="qtalarm"] $popup
+ [app_id="deluge" title="Add Torrents*"] $popup
+
+#float - floating enable; border pixel 1
+ [app_id="org.telegram.desktop"] $float; blur off; inhibit_idle open
+ [app_id="com.github.weclaw1.ImageRoll"] $float
+ [app_id="teams-for-linux"] $float
+ [class="teams-for-linux"] $float
+ [instance="teams-for-linux"] $float
+ [app_id="org.gnome.Loupe"] $float
+ [instance="yakyak"] $float
+ [class="Microsoft Teams - Preview"] $float
+ [class="teams-for-linux"] $float
+ [class="Microsoft Teams - Insiders"] $float
+ [app_id="Alacritty_floating"] $float
+ [title="^Information\s*—\s*Dolphin" app_id="dolphin"] $float
+ [title="^Loading archive" app_id="org.kde.ark"] $float
+ [instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] $float
+ [title="Preferences" app_id="pcmanfm-qt"] $float
+ [title="File Properties" app_id="pcmanfm-qt"] $float
+ [title="^Extension: .* Firefox Developer Edition$"] $float
+ [app_id="anki"] $float
+ [window_role="pop-up,task_dialog,About,bubble"] $float
+ [window_type="dialog"] $float
+ [window_type="utility"] $float
+ [window_type="toolbar"] $float
+ [window_type="splash"] $float
+ [window_type="menu"] $float
+ [window_type="dropdown_menu"] $float
+ [window_type="popup_menu"] $float
+ [window_type="tooltip"] $float
+ [window_type="notification"] $float
+
+#video - inhibit_idle fullscreen; border none; max_render_time off
+ [instance="chromium"] $video
+ [app_id="mpv"] $video
+ [app_id="vlc"] $video
+ [class="firefox"] $video
+ [app_id="firefox"] $video
+ [class="Nightly"] $video
+
+#important - inhibit_idle open; floating enable; border pixel 1
+ [title="Move files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
+ [title="^(Copying|Moving)\s*—\s*Dolphin" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
+ [title="^Extracting\s" app_id="(dolphin|org.kde.ark)"] $important
+ [title="Copy Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
+ [title="Delete Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
+ [title="Removable medium is inserted" app_id="pcmanfm|pcmanfm-qt"] $important
+ [title="Compressing (.*) — Ark" app_id="org.kde.ark"] $important; resize set width 18 ppt
+
+#misc
+ [class="steam"] floating enable; max_render_time off
+ [instance="steamwebhelper"] floating enable; max_render_time off
+ [app_id="org.telegram.desktop" title="Telegram"] floating disable; inhibit_idle none
+ [urgent=latest] focus
+ [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable; kill
+ [title="Wine System Tray"] floating enable; kill
+}
+no_focus [app_id="at.yrlf.wl_mirror"]
+
+for_window [app_id=".*"] border normal