From 7fb5926800781ec4b8008c16adc97c56863d7e63 Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Thu, 3 Jul 2025 06:20:51 +0300 Subject: [PATCH] feat: add the openSUSE sway conf --- .../sway/config.d/50-openSUSE.conf | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 private_dot_config/sway/config.d/50-openSUSE.conf diff --git a/private_dot_config/sway/config.d/50-openSUSE.conf b/private_dot_config/sway/config.d/50-openSUSE.conf new file mode 100644 index 0000000..ae5118d --- /dev/null +++ b/private_dot_config/sway/config.d/50-openSUSE.conf @@ -0,0 +1,101 @@ +#### Default openSUSE config for sway +# Copy this to ~/.config/sway/config.d/ +# or leave `include /etc/sway/config.d/*` +# in your local config file + +# wofi as application launcher +set $menu wofi + +# openSUSE wallpaper +# output * bg /usr/share/wallpapers/default-1920x1080.jpg fill + +# Enable common options for generic touchpads +input "type:touchpad" { + tap enabled + natural_scroll disabled + middle_emulation enabled +} + +# Cycle through workspaces +bindsym $mod+tab workspace next_on_output +bindsym $mod+Shift+tab workspace prev_on_output + +# Lockscreen configuration +set $screenlock 'swaylock -f -c 000000' +# Idle configuration +exec swayidle -w \ + timeout 300 $screenlock \ + timeout 600 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep $screenlock + +bindsym --to-code { + $mod+b splith + $mod+v splitv +} + +# Media keys +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle + +bindsym XF86MonBrightnessDown exec brightnessctl -q set 5%- && ( echo $((`brightnessctl get` * 100 / `brightnessctl m`)) > $SWAYSOCK.wob ) +bindsym XF86MonBrightnessUp exec brightnessctl -q set +5% && ( echo $((`brightnessctl get` * 100 / `brightnessctl m`)) > $SWAYSOCK.wob ) + +bindsym XF86AudioRaiseVolume exec pamixer --allow-boost -ui 2 && dc -e "[`pamixer --get-volume`]sM 100d `pamixer --get-volume` $SWAYSOCK.wob +bindsym XF86AudioLowerVolume exec pamixer --allow-boost -ud 2 && dc -e "[`pamixer --get-volume`]sM 100d `pamixer --get-volume` $SWAYSOCK.wob +bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) + +# Media player controls +bindsym --no-warn XF86AudioPlay exec playerctl play-pause +bindsym --no-warn XF86AudioNext exec playerctl next +bindsym --no-warn XF86AudioPrev exec playerctl previous + +# +# Status Bar: +# +bar { + swaybar_command waybar +} + +# System mode menu +set $mode_system "What to do? (l) lock, (e) logout, (r) reboot, (s) suspend, (Shift+s) shutdown" +mode $mode_system { + bindsym l exec $screenlock; mode "default" + bindsym e exec swaymsg exit; mode "default" + bindsym r exec systemctl reboot; mode "default" + bindsym s exec systemctl suspend; mode "default" + bindsym Shift+s exec systemctl poweroff; mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} +unbindsym $mod+Shift+e +bindsym $mod+Shift+e mode $mode_system + +# Toggle notification bar +# set $toggle_notification "swaync-client -t -sw" +# bindsym $mod+Shift+n exec $toggle_notification + +# openSUSE theme +default_border pixel +#gaps inner 10 +#client.focused #6da741 #173f4f #73ba25 +#client.unfocused #00a489 #173f4f #35b9ab +#client.focused_inactive #6da741 #00a489 #173f4f + +set $wob wob --config ~/sway/wob/wob.ini + +exec_always { + systemctl --user import-environment + # gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3' + # gsettings set org.gnome.desktop.interface icon-theme 'Adwaita' + # gsettings set org.gnome.desktop.interface cursor-theme 'Adwaita' + test -e $SWAYSOCK.wob || mkfifo $SWAYSOCK.wob + tail -f $SWAYSOCK.wob | $wob + # swaync +} + +exec { + /usr/libexec/polkit-gnome-authentication-agent-1 + nextcloud --background -platform xcb +}