|
| 1 | +#### Default openSUSE config for sway |
| 2 | +# Copy this to ~/.config/sway/config.d/ |
| 3 | +# or leave `include /etc/sway/config.d/*` |
| 4 | +# in your local config file |
| 5 | + |
| 6 | +# wofi as application launcher |
| 7 | +set $menu wofi --conf=/etc/wofi/config --style=/etc/wofi/style.css |
| 8 | + |
| 9 | +# openSUSE wallpaper |
| 10 | +output * bg /usr/share/wallpapers/default-1920x1080.jpg fill |
| 11 | + |
| 12 | +# Idle configuration |
| 13 | +exec swayidle -w \ |
| 14 | + timeout 300 'swaylock -f -c 000000' \ |
| 15 | + timeout 600 'swaymsg "output * dpms off"' \ |
| 16 | + resume 'swaymsg "output * dpms on"' \ |
| 17 | + before-sleep 'swaylock -f -c 000000' |
| 18 | + |
| 19 | +bindsym --to-code { |
| 20 | + $mod+b splith |
| 21 | + $mod+v splitv |
| 22 | +} |
| 23 | + |
| 24 | +# Media keys |
| 25 | +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle |
| 26 | + |
| 27 | +bindsym XF86MonBrightnessDown exec brightnessctl -q set 5%- && ( echo $((`brightnessctl get` * 100 / `brightnessctl m`)) > $SWAYSOCK.wob ) |
| 28 | +bindsym XF86MonBrightnessUp exec brightnessctl -q set +5% && ( echo $((`brightnessctl get` * 100 / `brightnessctl m`)) > $SWAYSOCK.wob ) |
| 29 | + |
| 30 | +bindsym XF86AudioRaiseVolume exec pamixer --allow-boost -ui 2 && dc -e "[`pamixer --get-volume`]sM 100d `pamixer --get-volume`<Mp" > $SWAYSOCK.wob |
| 31 | +bindsym XF86AudioLowerVolume exec pamixer --allow-boost -ud 2 && dc -e "[`pamixer --get-volume`]sM 100d `pamixer --get-volume`<Mp" > $SWAYSOCK.wob |
| 32 | +bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) |
| 33 | + |
| 34 | +# Media player controls |
| 35 | +bindsym XF86AudioPlay exec playerctl play-pause |
| 36 | +bindsym XF86AudioNext exec playerctl next |
| 37 | +bindsym XF86AudioPrev exec playerctl previous |
| 38 | + |
| 39 | +# |
| 40 | +# Status Bar: |
| 41 | +# |
| 42 | +bar { |
| 43 | + swaybar_command waybar |
| 44 | +} |
| 45 | + |
| 46 | +# openSUSE theme |
| 47 | +default_border pixel 2 |
| 48 | +gaps inner 5 |
| 49 | +client.focused #6da741 #173f4f #73ba25 |
| 50 | +client.unfocused #00a489 #173f4f #35b9ab |
| 51 | +client.focused_inactive #6da741 #00a489 #173f4f |
| 52 | + |
| 53 | +exec_always { |
| 54 | + systemctl --user import-environment |
| 55 | + gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark' |
| 56 | + gsettings set org.gnome.desktop.interface icon-theme 'Adwaita' |
| 57 | + gsettings set org.gnome.desktop.interface cursor-theme 'Adwaita' |
| 58 | + test -e $SWAYSOCK.wob || mkfifo $SWAYSOCK.wob |
| 59 | + tail -f $SWAYSOCK.wob | wob |
| 60 | +} |
| 61 | + |
| 62 | +exec /usr/libexec/polkit-gnome-authentication-agent-1 |
0 commit comments