From 340de2ccbe2ba4a620f53a290a02a7caa7491849 Mon Sep 17 00:00:00 2001 From: Grisha Shipunov Date: Mon, 24 Feb 2025 13:38:44 +0100 Subject: [PATCH] sway config updates --- sway/.config/i3status-rust/config.toml | 6 +- sway/.config/kanshi/config | 2 +- sway/.config/sway/config | 8 +- sway/.config/sway/config.d/window_overrides | 2 +- sway/.config/sway/locknow.sh | 9 ++ sway/.config/swayimg/config | 105 ++++++++++++++++++++ 6 files changed, 124 insertions(+), 8 deletions(-) create mode 100755 sway/.config/sway/locknow.sh create mode 100644 sway/.config/swayimg/config diff --git a/sway/.config/i3status-rust/config.toml b/sway/.config/i3status-rust/config.toml index 347bcf2..b56486d 100644 --- a/sway/.config/i3status-rust/config.toml +++ b/sway/.config/i3status-rust/config.toml @@ -4,6 +4,9 @@ theme = "foot" [icons] icons = "material-nf" +[[block]] +block = "scratchpad" + [[block]] block = "time" format = " $icon $timestamp.datetime(f:'%a %F %R', l:nl_NL) " @@ -57,7 +60,8 @@ format = " $icon{ | $ip $ipv6 }" [[block]] block = "memory" -format = " $icon $mem_used_percents " +warning_swap = 100.0 +critical_swap = 100.0 [[block]] block = "load" diff --git a/sway/.config/kanshi/config b/sway/.config/kanshi/config index 0f3df43..2e46355 100644 --- a/sway/.config/kanshi/config +++ b/sway/.config/kanshi/config @@ -10,5 +10,5 @@ profile { # Work profile { output eDP-1 enable position 0,1200 adaptive_sync on - output "Samsung Electric Company LF24T450G HNMTA01726" enable mode 1920x1200@60Hz position 0,0 adaptive_sync on + output "Samsung Electric Company LF24T450G HNMTA01726" enable mode 1920x1200@74.939Hz position 0,0 adaptive_sync on } diff --git a/sway/.config/sway/config b/sway/.config/sway/config index e18f383..ef5f24c 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -17,6 +17,7 @@ set $right l set $term foot set $floatterm foot -a floating-foot set $lock $HOME/.config/sway/lock.sh +set $locknow $HOME/.config/sway/locknow.sh # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened @@ -100,8 +101,7 @@ seat * hide_cursor 5000 bindsym --to-code $mod+Print exec 'grim -g "$(slurp)" ~/Pictures/$(date +"%Y-%m-%d-%H-%M-%S").png' bindsym --to-code $mod+Mod1+p exec 'grim -g "$(slurp)" ~/Pictures/$(date +"%Y-%m-%d-%H-%M-%S").png' # Notifications - bindsym --to-code $mod+m exec 'makoctl dismiss -a' - bindsym --to-code $mod+Shift+m exec 'makoctl restore' + bindsym --to-code $mod+m exec 'swaync-client -t' # Check mail bindsym --to-code $mod+n exec 'systemctl --user start mbsync.service' @@ -309,10 +309,8 @@ font pango:Hack 9 # Startup applications exec iwgtk -i exec blueman-applet -# exec wlsunset -l 52 -L 5 -# exec gammastep-indicator exec_always pkill kanshi; exec kanshi -# exec udiskie --tray --no-automount +exec swaync include ./config.d/* include /etc/sway/config.d/* diff --git a/sway/.config/sway/config.d/window_overrides b/sway/.config/sway/config.d/window_overrides index 2b5ea79..640c88a 100644 --- a/sway/.config/sway/config.d/window_overrides +++ b/sway/.config/sway/config.d/window_overrides @@ -18,5 +18,5 @@ for_window [app_id="zoom" title="Zoom Meeting(.*)?"] workspace next_on_output -- # kill firefox sharing indicator for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill # fix picture-in-picture behaviour -for_window [app_id="firefox" title="Picture-in-Picture"] floating enable, sticky enable, border none +for_window [app_id="firefox" title="Picture-in-Picture"] floating enable, sticky enable diff --git a/sway/.config/sway/locknow.sh b/sway/.config/sway/locknow.sh new file mode 100755 index 0000000..e45f248 --- /dev/null +++ b/sway/.config/sway/locknow.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +swayidle -w \ + timeout 1 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep '$HOME/.config/sway/lock.sh' + +pid=$! +kill pid diff --git a/sway/.config/swayimg/config b/sway/.config/swayimg/config new file mode 100644 index 0000000..a7b6e1a --- /dev/null +++ b/sway/.config/swayimg/config @@ -0,0 +1,105 @@ +# https://git.deuill.org/deuill/dotfiles +################################################################################ +# Viewer mode configuration +################################################################################ +[viewer] +# Window background color (RGBA) +window = #00000000 +# Background for transparent images (grid/RGBA) +transparency = grid +# Default image scale (optimal/fit/width/height/fill/real) +scale = optimal +# Fix position of the image on the window surface (yes/no) +fixed = yes +# Anti-aliasing (yes/no) +antialiasing = no +# Run slideshow at startup (yes/no) +slideshow = no +# Slideshow image display time (seconds) +slideshow_time = 3 +# Number of previously viewed images to store in cache +history = 1 +# Number of preloaded images (read ahead) +preload = 1 + +################################################################################ +# Gallery mode configuration +################################################################################ +[gallery] +# Max size of the thumbnail (pixels) +size = 300 +# Max number of thumbnails in cache, 0 to unlimit +cache = 100 +# Fill the entire tile with thumbnail (yes/no) +fill = yes +# Use anti-aliasing for thumbnails (yes/no) +antialiasing = no +# Background color of the window (RGBA) +window = #00000000 +# Background color of the tile (RGBA) +background = #202020ff +# Background color of the selected tile (RGBA) +select = #333333ff +# Border color of the selected tile (RGBA) +border = #ab4642ff +# Shadow color of the selected tile (RGBA) +shadow = #00000000 + +################################################################################ +# Font configuration +################################################################################ +[font] +# Font name +name = Iosevka +# Font size (pt) +size = 18 +# Font color (RGBA) +color = #fefefeff +# Shadow color (RGBA) +shadow = #333333ff + +################################################################################ +# Image meta info scheme (format, size, EXIF, etc) +################################################################################ + +# Display scheme for viewer mode (position = content) +[info.viewer] +top_left = +name,+format,+filesize,+imagesize,+exif +top_right = index +bottom_left = scale,frame +bottom_right = status + +# Display scheme for gallery mode (position = content) +[info.gallery] +top_left = none +top_right = none +bottom_left = none +bottom_right = name,status + +################################################################################ +# Viewer mode key binding configuration. +################################################################################ +[keys.viewer] +h = prev_file +j = zoom -10 +k = zoom +10 +l = next_file + +Shift+h = prev_dir +Shift+j = rotate_left +Shift+k = rotate_right +Shift+l = next_dir + +Alt+h = step_left 10 +Alt+j = step_down 10 +Alt+k = step_up 10 +Alt+l = step_right 10 + +################################################################################ +# Gallery mode key binding configuration. +################################################################################ +[keys.gallery] +h = step_left +j = step_down +k = step_up +l = step_right