feat: add the openSUSE sway conf
This commit is contained in:
101
private_dot_config/sway/config.d/50-openSUSE.conf
Normal file
101
private_dot_config/sway/config.d/50-openSUSE.conf
Normal file
@@ -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`<Mp" > $SWAYSOCK.wob
|
||||
bindsym XF86AudioLowerVolume exec pamixer --allow-boost -ud 2 && dc -e "[`pamixer --get-volume`]sM 100d `pamixer --get-volume`<Mp" > $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
|
||||
}
|
||||
Reference in New Issue
Block a user