1
0
Files
dotfiles/.config/sway/config
T
2024-12-18 20:56:18 +01:00

193 lines
5.9 KiB
Plaintext

# Set variables
include "$HOME/.cache/wal/colors-sway"
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term kitty
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
set $ws9 9
set $ws10 10
# Input/output configuration
input "*" {
xkb_layout "us"
xkb_variant "intl"
xkb_options caps:escape
xkb_numlock enable
}
output * bg $color0 solid_color
output * bg $wallpaper fill
#exec wal -c
#exec wal -i $wallpaper
exec_always autotiling
include workspaces
include display
include input
set $launcher bemenu-run
floating_modifier Mod4
tiling_drag enable
# Window settings and layout
for_window [class=".*"] border pixel 3
for_window [app_id=".*"] border pixel 3
for_window [app_id="$term"] opacity 0.9
for_window [app_id="dev.zed.Zed"] opacity 0.9
gaps inner 6
gaps outer 0
mouse_warping none
focus_follows_mouse no
# Idle
exec swayidle -w timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
# Status Bar
bar {
swaybar_command waybar
}
# Notification daemon
exec_always ~/.config/mako/launch.sh
# Window border colors. Transparent borders on unfocused windows
client.focused $color1 $color1 $color0
client.focused_inactive $color1 $color1 $color6
client.unfocused $color0 $color0 $color2
# General bindings
bindsym $mod+Return exec $term
bindsym $mod+q kill
bindsym $mod+d exec $launcher
bindsym $mod+Ctrl+d exec $launcher
bindsym $mod+Shift+c reload
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f layout toggle tabbed splith
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+minus scratchpad show
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+dead_grave scratchpad show
bindsym $mod+Shift+dead_grave move scratchpad
bindsym $mod+s gaps inner current plus 5
bindsym $mod+Shift+s gaps inner current minus 5
bindsym $mod+Ctrl+s gaps outer current plus 5
bindsym $mod+Ctrl+Shift+s gaps outer current minus 5
bindsym $mod+backspace exec swaylock -f -C ~/.cache/wal/swaylock
bindsym $mod+Shift+backspace exec wlogout
bindsym $mod+v layout toggle split
bindsym XF86MonBrightnessUp exec brightnessctl s +50
bindsym XF86MonBrightnessDown exec brightnessctl s 50-
# Application bindings
bindsym $mod+Shift+w exec firefox
bindsym $mod+Shift+Ctrl+w exec firefox -P Shinobi
bindsym $mod+Shift+e exec steam
bindsym $mod+e exec thunar
bindsym $mod+a exec $term -e cava
bindsym $mod+Shift+a exec $term -e pulsemixer
bindsym $mod+i exec $term -e htop --user mark
bindsym $mod+Shift+i exec $term -e btop
#bindsym $mod+Shift+d exec discord --enable-features=UseOzonePlatform --ozone-platform=wayland
#bindsym $mod+Shift+d exec vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland
bindsym $mod+Shift+d exec equibop --enable-features=UseOzonePlatform --ozone-platform=wayland
bindsym $mod+Shift+m exec $term -e ncmpcpp
bindsym $mod+Ctrl+m exec catia
bindsym $mod+m exec spotify
bindsym $mod+n exec mozillavpn activate
bindsym $mod+o exec ~/.scripts/wallpaper
bindsym $mod+Shift+o exec ~/.scripts/wallpaper-upload
bindsym $mod+p exec pass clip -r
bindsym $mod+Shift+Return exec $term -e python
bindsym $mod+Shift+t exec teams
# Screenshotting
bindsym Print exec grim -g "$(slurp)" - | wl-copy
bindsym Ctrl+Print exec grim -g "$(slurp)" ~/screenshot.png && notify-send -i ~/screenshot.png "Screenshot saved"
bindsym Shift+Ctrl+Print exec grim ~/screenshot.png
bindsym Shift+Print exec grim -g "$(slurp)" - | swappy -f -
bindsym $mod+T exec grim -g "$(slurp)" ~/screenshot.png && tesseract ~/screenshot.png stdout | wl-copy
# Moving around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+g focus output left
bindsym $mod+semicolon focus output right
bindsym $mod+Shift+g move workspace to output left
bindsym $mod+Shift+semicolon move workspace to output right
bindsym $mod+$ws1 workspace $ws1
bindsym $mod+$ws2 workspace $ws2
bindsym $mod+$ws3 workspace $ws3
bindsym $mod+$ws4 workspace $ws4
bindsym $mod+$ws5 workspace $ws5
bindsym $mod+$ws6 workspace $ws6
bindsym $mod+$ws7 workspace $ws7
bindsym $mod+$ws8 workspace $ws8
bindsym $mod+$ws9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Shift+$ws1 move workspace $ws1
bindsym $mod+Shift+$ws2 move workspace $ws2
bindsym $mod+Shift+$ws3 move workspace $ws3
bindsym $mod+Shift+$ws4 move workspace $ws4
bindsym $mod+Shift+$ws5 move workspace $ws5
bindsym $mod+Shift+$ws6 move workspace $ws6
bindsym $mod+Shift+$ws7 move workspace $ws7
bindsym $mod+Shift+$ws8 move workspace $ws8
bindsym $mod+Shift+$ws9 move workspace $ws9
bindsym $mod+Shift+0 move workspace $ws10
set $scr_smol DP-3
set $scr_bige DP-2
#output $scr_bige resolution 3840x2160 position 0 0
#output $scr_bige scale 1.5
output $scr_bige resolution 2560x1440 position 0 0
output $scr_smol mode --custom 1920x1080 position 2560 0
output $scr_smol adaptive_sync off
# Bind workspaces to output
workspace $ws3 output $scr_smol
workspace $ws2 output $scr_bige
workspace $ws1 output $scr_bige
workspace $ws4 output $scr_bige
workspace $ws9 output $scr_bige
workspace $ws10 output $scr_smol
# App fixes
assign [class="discord"] $ws3
assign [app_id="discord"] $ws3
assign [app_id="vesktop"] $ws3
assign [app_id="equibop"] $ws3
for_window [class="discord"] move workspace $ws3
for_window [app_id="discord"] move workspace $ws3
for_window [app_id="vesktop"] move workspace $ws3
for_window [app_id="equibop"] move workspace $ws3
assign [class="steam"] $ws4
assign [app_id="steam"] $ws4
for_window [class="steam"] move workspace $ws4
for_window [app_id="steam"] move workspace $ws4
for_window [title="Firefox — Sharing Indicator"] floating enable
for_window [title="Firefox — Sharing Indicator"] nofocus
include /etc/sway/config.d/*