feat: major updates to sway config
* locking now happens using `swaylock-wrapper` * default terminal emulator is now `kitty` second default is `alacritty` * updated favourite background * added second monitor handling (shows up as DP-{2,3}, HDMI-A-1 depending on connector used) * assing specific workspaces to a specific monitor * use `swws.py` - "sway workspace switcher script" * run `waybar` directly and kill it directly when reloading * run [`docker-tray`](https://git.dotya.ml/wanderer/docker-tray) * use several keybinds when locked (`--locked`)
This commit is contained in:
parent
2d8d5892f5
commit
687c4a4af4
@ -5,18 +5,24 @@ set
|
||||
$down j
|
||||
$up k
|
||||
$right l
|
||||
$lock exec ~/utils/bin/sway-locker -f
|
||||
$lock exec ~/utils/bin/swaylock-wrapper
|
||||
$lockt exec ~/utils/bin/sway-locker -t
|
||||
$term qterminal #alacritty
|
||||
$term kitty #qterminal alacritty
|
||||
$menu rofi -show drun
|
||||
$bg "~/.cache/apod/2020-April-29-The-Ion-Tail-of-New-Comet-SWAN.jpg fit #000000"
|
||||
# $bg "~/Pictures/apod/2019-October-20-Pluto-at-Night.jpg fill #000000"
|
||||
# $bg "~/Pictures/apod/2019-January-2-The-Orion-Nebula-in-Infrared-from-WISE.jpg fit #000000"
|
||||
$bg "~/Pictures/apod/2020-April-29-The-Ion-Tail-of-New-Comet-SWAN.jpg fit #000000"
|
||||
$gtk_theme "Mint-Y-Dark-Blue"
|
||||
$icon_theme "Flat-Remix-Blue-Dark"
|
||||
$pri eDP-1
|
||||
#$sec HDMI-A-1
|
||||
$sec DP-2
|
||||
}
|
||||
|
||||
default_border pixel 2
|
||||
default_floating_border pixel 2
|
||||
|
||||
smart_gaps on
|
||||
gaps outer 8
|
||||
gaps inner 5
|
||||
|
||||
@ -25,15 +31,18 @@ font pango:Cantarell 14px
|
||||
exec_always --no-startup-id
|
||||
{
|
||||
pkill fusuma
|
||||
pkill waybar
|
||||
pkill swayidle
|
||||
pkill "docker-tray"
|
||||
waybar
|
||||
swaymsg output "*" bg $bg
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY
|
||||
eval $(/usr/bin/gnome-keyring-daemon --start --components=ssh)
|
||||
~/.config/waybar/waybar.sh
|
||||
mako
|
||||
fusuma -d -c ~/.config/fusuma/config-wl.yml
|
||||
swaymsg output eDP-1 bg $bg
|
||||
gsettings set org.gnome.desktop.interface gtk-theme '$gtk_theme'
|
||||
gsettings set org.gnome.desktop.interface icon-theme '$icon_theme'
|
||||
~/utils/docker-tray/docker-tray
|
||||
swayidle -w timeout 3600 "$lock" \
|
||||
timeout 3610 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
@ -42,6 +51,7 @@ exec_always --no-startup-id
|
||||
bindsym ctrl+alt+l exec --no-startup-id $lock
|
||||
bindsym $mod+grave exec --no-startup-id $lock
|
||||
bindswitch lid:on exec --no-startup-id $lock
|
||||
output $sec pos 1920 0 res 1920x1200
|
||||
|
||||
#--- Window Decorations
|
||||
set
|
||||
@ -69,6 +79,8 @@ bindsym
|
||||
{
|
||||
$mod+Shift+e exec swaynag -t error -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
$mod+Return exec $term
|
||||
$mod+t exec $term
|
||||
$mod+Shift+t exec alacritty
|
||||
$mod+Shift+q kill
|
||||
alt+F1 exec $menu
|
||||
}
|
||||
@ -76,7 +88,7 @@ bindsym
|
||||
input *
|
||||
{
|
||||
xkb_layout gb,sk
|
||||
xkb_options grp:win_space_toggle,compose:menu
|
||||
xkb_options grp:win_space_toggle,compose:ralt
|
||||
xkb_variant ",qwerty"
|
||||
repeat_delay 280
|
||||
repeat_rate 30
|
||||
@ -149,17 +161,18 @@ bindsym
|
||||
$mod+n exec nemo
|
||||
$mod+m exec QT_QPA_PLATFORMTHEME=wayland vlc
|
||||
$mod+Shift+b exec brave-browser-beta --incognito
|
||||
$mod+Shift+w exec ~/Downloads/firefox-dev/firefox --private-window
|
||||
$mod+Shift+g exec firefox --private-window
|
||||
$mod+Shift+w exec MOZ_USE_XINPUT2=1 MOZ_ENABLE_WAYLAND=1 ~/Downloads/firefox-dev/firefox --private-window
|
||||
$mod+Shift+g exec MOZ_USE_XINPUT2=1 MOZ_ENABLE_WAYLAND=1 firefox --private-window
|
||||
$mod+Shift+v exec ferdi
|
||||
$mod+Shift+a exec chromium-freeworld --incognito
|
||||
$mod+Escape exec systemctl suspend -i
|
||||
$mod+Shift+o exec xterm -e "bash -c 'sudo cpupower frequency-set -g powersave;figlet powersave;sleep 2'"
|
||||
$mod+Shift+p exec xterm -e "bash -c 'sudo cpupower frequency-set -g performance;figlet performance;sleep 2'"
|
||||
$mod+ctrl+Shift+s exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 0'"
|
||||
$mod+ctrl+Shift+d exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 1'"
|
||||
$mod+ctrl+Shift+f exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 2'"
|
||||
$mod+ctrl+Shift+b exec xterm -e "bash -c 'sudo dell-bios-fan-control 1'"
|
||||
--locked $mod+Escape exec systemctl suspend -i
|
||||
$mod+Shift+o exec alacritty -e bash -c 'sudo cpupower frequency-set -g powersave;figlet powersave;sleep 2'
|
||||
$mod+Shift+p exec alacritty -e bash -c 'sudo cpupower frequency-set -g performance;figlet performance;sleep 2'
|
||||
--locked $mod+ctrl+Shift+s exec alacritty -e bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 0'
|
||||
--locked $mod+ctrl+Shift+d exec alacritty -e bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 1'
|
||||
--locked $mod+ctrl+Shift+f exec alacritty -e bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 2'
|
||||
--locked $mod+ctrl+Shift+b exec alacritty -e bash -c 'sudo dell-bios-fan-control 1'
|
||||
$mod+ctrl+Shift+a exec ~/.local/bin/keepmenu
|
||||
}
|
||||
|
||||
# Notifications
|
||||
@ -205,37 +218,91 @@ bindsym --to-code
|
||||
$mod+Shift+comma workspace prev_on_output
|
||||
$mod+Shift+period workspace next_on_output
|
||||
$mod+Shift+tab workspace back_and_forth
|
||||
$mod+1 workspace 1
|
||||
$mod+2 workspace 2
|
||||
$mod+3 workspace 3
|
||||
$mod+4 workspace 4
|
||||
$mod+5 workspace 5
|
||||
$mod+6 workspace 6
|
||||
$mod+7 workspace 7
|
||||
$mod+8 workspace 8
|
||||
$mod+9 workspace 9
|
||||
$mod+0 workspace 10
|
||||
$mod+comma focus output right
|
||||
$mod+period focus output left
|
||||
$mod+0 exec ~/.local/bin/swws.py 0
|
||||
$mod+1 exec ~/.local/bin/swws.py 1
|
||||
$mod+2 exec ~/.local/bin/swws.py 2
|
||||
$mod+3 exec ~/.local/bin/swws.py 3
|
||||
$mod+4 exec ~/.local/bin/swws.py 4
|
||||
$mod+5 exec ~/.local/bin/swws.py 5
|
||||
$mod+6 exec ~/.local/bin/swws.py 6
|
||||
$mod+7 exec ~/.local/bin/swws.py 7
|
||||
$mod+8 exec ~/.local/bin/swws.py 8
|
||||
$mod+9 exec ~/.local/bin/swws.py 9
|
||||
$mod+F2 workspace C
|
||||
$mod+F3 workspace M
|
||||
}
|
||||
# Switch directly to workspace of another monitor
|
||||
bindsym --to-code
|
||||
{
|
||||
$mod+ctrl+0 exec "~/.local/bin/swws.py 0 -c"
|
||||
$mod+ctrl+1 exec "~/.local/bin/swws.py 1 -c"
|
||||
$mod+ctrl+2 exec "~/.local/bin/swws.py 2 -c"
|
||||
$mod+ctrl+3 exec "~/.local/bin/swws.py 3 -c"
|
||||
$mod+ctrl+4 exec "~/.local/bin/swws.py 4 -c"
|
||||
$mod+ctrl+5 exec "~/.local/bin/swws.py 5 -c"
|
||||
$mod+ctrl+6 exec "~/.local/bin/swws.py 6 -c"
|
||||
$mod+ctrl+7 exec "~/.local/bin/swws.py 7 -c"
|
||||
$mod+ctrl+8 exec "~/.local/bin/swws.py 8 -c"
|
||||
$mod+ctrl+9 exec "~/.local/bin/swws.py 9 -c"
|
||||
}
|
||||
# Move focused container to workspace
|
||||
bindsym --to-code
|
||||
{
|
||||
$mod+Shift+1 move container to workspace 1
|
||||
$mod+Shift+2 move container to workspace 2
|
||||
$mod+Shift+3 move container to workspace 3
|
||||
$mod+Shift+4 move container to workspace 4
|
||||
$mod+Shift+5 move container to workspace 5
|
||||
$mod+Shift+6 move container to workspace 6
|
||||
$mod+Shift+7 move container to workspace 7
|
||||
$mod+Shift+8 move container to workspace 8
|
||||
$mod+Shift+9 move container to workspace 9
|
||||
$mod+Shift+0 move container to workspace 10
|
||||
$mod+Shift+0 exec "~/.local/bin/swws.py 0 -s"
|
||||
$mod+Shift+1 exec "~/.local/bin/swws.py 1 -s"
|
||||
$mod+Shift+2 exec "~/.local/bin/swws.py 2 -s"
|
||||
$mod+Shift+3 exec "~/.local/bin/swws.py 3 -s"
|
||||
$mod+Shift+4 exec "~/.local/bin/swws.py 4 -s"
|
||||
$mod+Shift+5 exec "~/.local/bin/swws.py 5 -s"
|
||||
$mod+Shift+6 exec "~/.local/bin/swws.py 6 -s"
|
||||
$mod+Shift+7 exec "~/.local/bin/swws.py 7 -s"
|
||||
$mod+Shift+8 exec "~/.local/bin/swws.py 8 -s"
|
||||
$mod+Shift+9 exec "~/.local/bin/swws.py 9 -s"
|
||||
$mod+Shift+F2 move container to workspace C
|
||||
$mod+Shift+F3 move container to workspace M
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
}
|
||||
# Move focused container to workspace of another monitor
|
||||
bindsym --to-code
|
||||
{
|
||||
ctrl+$mod+Shift+0 exec "~/.local/bin/swws.py 0 -t"
|
||||
ctrl+$mod+Shift+1 exec "~/.local/bin/swws.py 1 -t"
|
||||
ctrl+$mod+Shift+2 exec "~/.local/bin/swws.py 2 -t"
|
||||
ctrl+$mod+Shift+3 exec "~/.local/bin/swws.py 3 -t"
|
||||
ctrl+$mod+Shift+4 exec "~/.local/bin/swws.py 4 -t"
|
||||
ctrl+$mod+Shift+5 exec "~/.local/bin/swws.py 5 -t"
|
||||
ctrl+$mod+Shift+6 exec "~/.local/bin/swws.py 6 -t"
|
||||
ctrl+$mod+Shift+7 exec "~/.local/bin/swws.py 7 -t"
|
||||
ctrl+$mod+Shift+8 exec "~/.local/bin/swws.py 8 -t"
|
||||
ctrl+$mod+Shift+9 exec "~/.local/bin/swws.py 9 -t"
|
||||
}
|
||||
|
||||
#
|
||||
# Workspace-monitor assignments
|
||||
#
|
||||
workspace 0 output $pri
|
||||
workspace 1 output $pri
|
||||
workspace 2 output $pri
|
||||
workspace 3 output $pri
|
||||
workspace 4 output $pri
|
||||
workspace 5 output $pri
|
||||
workspace 6 output $pri
|
||||
workspace 7 output $pri
|
||||
workspace 8 output $pri
|
||||
workspace 9 output $pri
|
||||
workspace C output $pri
|
||||
workspace M output $pri
|
||||
workspace 10 output $sec
|
||||
workspace 11 output $sec
|
||||
workspace 12 output $sec
|
||||
workspace 13 output $sec
|
||||
workspace 14 output $sec
|
||||
workspace 15 output $sec
|
||||
workspace 16 output $sec
|
||||
workspace 17 output $sec
|
||||
workspace 18 output $sec
|
||||
workspace 19 output $sec
|
||||
|
||||
#
|
||||
# Layout stuff:
|
||||
@ -320,12 +387,12 @@ bindsym $mod+Shift+r reload
|
||||
#
|
||||
bindsym
|
||||
{
|
||||
XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
XF86MonBrightnessUp exec light -A 5
|
||||
XF86MonBrightnessDown exec light -U 5
|
||||
--locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
--locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
--locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
--locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
--locked XF86MonBrightnessUp exec light -A 5
|
||||
--locked XF86MonBrightnessDown exec light -U 5
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
Loading…
Reference in New Issue
Block a user