mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
264 lines
8.6 KiB
Cheetah
264 lines
8.6 KiB
Cheetah
# sway config file (v4)
|
|
# TODO: add scratchpads (terminal, password manager, discord, task)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- VARIABLES
|
|
#-------------------------------------------------------------------------------
|
|
|
|
set $HOME /home/{{ .user }}
|
|
|
|
set $DISP_SEC DP-2
|
|
set $DISP_PRI HDMI-A-1
|
|
|
|
set $BOR_WIDTH 3
|
|
set $GAP_INNER 3
|
|
|
|
set $mod Mod4
|
|
|
|
set $tag1 "1:game"
|
|
set $tag2 "2:dev"
|
|
set $tag3 "3:web"
|
|
set $tag4 "4:dev"
|
|
set $tag5 "5:web"
|
|
set $tag6 "6:web"
|
|
set $tag7 "7:note"
|
|
set $tag8 "8:comm"
|
|
|
|
set $e exec swaymsg mode default
|
|
|
|
set $mode_power "[r]eboot | [s]hutdown"
|
|
|
|
set $TERM alacritty
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- COLORS
|
|
#-------------------------------------------------------------------------------
|
|
|
|
set $background #282A36
|
|
set $foreground #F8F8F2
|
|
set $focused #bd93f9
|
|
set $inactive #44475A
|
|
set $urgent #FF5555
|
|
set $workspace #50FA7B
|
|
|
|
# class border bground text indicator child_border
|
|
client.focused $focused $focused $foreground $focused $focused
|
|
client.focused_inactive $inactive $inactive $foreground $inactive $inactive
|
|
client.unfocused $background $background $foreground $background $background
|
|
client.urgent $inactive $urgent $foreground $urgent $urgent
|
|
client.placeholder $background $background $foreground $background $background
|
|
|
|
client.background $foreground
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- MISC. CONFIGURATION
|
|
#-------------------------------------------------------------------------------
|
|
|
|
font pango:JetBrains Mono Nerd Font 10
|
|
default_border pixel 3
|
|
default_floating_border pixel 3
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- BINDING WORKSPACE TO DISPLAY
|
|
#-------------------------------------------------------------------------------
|
|
|
|
workspace $tag1 output $DISP_PRI
|
|
workspace $tag2 output $DISP_PRI
|
|
workspace $tag3 output $DISP_PRI
|
|
workspace $tag4 output $DISP_PRI
|
|
workspace $tag5 output $DISP_SEC
|
|
workspace $tag6 output $DISP_SEC
|
|
workspace $tag7 output $DISP_SEC
|
|
workspace $tag8 output $DISP_SEC
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- CONTAINER GAPS
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# CREATING GAPS BETWEEN THE WINDOWS AND EDGES
|
|
gaps inner $GAP_INNER
|
|
gaps outer 0
|
|
gaps horizontal 0
|
|
gaps vertical 0
|
|
gaps top 0
|
|
gaps bottom 0
|
|
gaps right 0
|
|
gaps left 0
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- FORCE FLOATING
|
|
#-------------------------------------------------------------------------------
|
|
|
|
for_window [title="Steam - News"] floating enable
|
|
for_window [title="Friends List"] floating enable
|
|
for_window [title=".*mpv$"] sticky toggle
|
|
for_window [title=".*mpv$"] floating enable
|
|
|
|
for_window [app_id="file"] floating enable, \
|
|
border pixel 5, \
|
|
resize set 70 ppt 60 ppt, \
|
|
move position center, \
|
|
move to scratchpad, \
|
|
scratchpad show
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- BINDING APPLICATIONS TO WORKSPACE
|
|
#-------------------------------------------------------------------------------
|
|
|
|
for_window [class="Steam"] move container to workspace "1:game"
|
|
for_window [class="discord"] move container to workspace $tag8
|
|
for_window [title="launcher"] floating enable
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- KEY BINDINGS
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Power commands
|
|
bindsym $mod+p mode $mode_power
|
|
mode $mode_power {
|
|
bindsym s exec shutdown now
|
|
bindsym r exec reboot
|
|
bindsym Escape mode default
|
|
}
|
|
|
|
# Utility commands
|
|
bindsym $mod+x mode utility
|
|
mode utility {
|
|
bindsym q exit
|
|
bindsym r reload
|
|
bindsym g exec "~/.config/sway/scripts/gamemode.sh", $e
|
|
bindsym Escape mode default
|
|
}
|
|
|
|
# Layout commands
|
|
bindsym $mod+Ctrl+t splitv; layout tabbed
|
|
bindsym $mod+Ctrl+v layout splitv
|
|
bindsym $mod+Ctrl+s layout splith
|
|
bindsym $mod+Ctrl+h resize shrink width 50
|
|
bindsym $mod+Ctrl+j resize shrink height 50
|
|
bindsym $mod+Ctrl+k resize grow height 50
|
|
bindsym $mod+Ctrl+l resize grow width 50
|
|
bindsym $mod+Ctrl+c move position center
|
|
|
|
# Program management
|
|
bindsym $mod+d kill
|
|
bindsym $mod+f fullscreen toggle
|
|
bindsym $mod+t floating toggle
|
|
bindsym $mod+s sticky toggle
|
|
bindsym $mod+Tab focus mode_toggle
|
|
floating_modifier $mod
|
|
|
|
# Spatial container management
|
|
bindsym $mod+h exec ~/.config/sway/scripts/tabfocus.sh "h"
|
|
bindsym $mod+j exec ~/.config/sway/scripts/tabfocus.sh "j"
|
|
bindsym $mod+k exec ~/.config/sway/scripts/tabfocus.sh "k"
|
|
bindsym $mod+l exec ~/.config/sway/scripts/tabfocus.sh "l"
|
|
bindsym $mod+Shift+h move left
|
|
bindsym $mod+Shift+j move down
|
|
bindsym $mod+Shift+k move up
|
|
bindsym $mod+Shift+l move right
|
|
bindsym $mod+minus split v
|
|
bindsym $mod+backslash split h
|
|
bindsym $mod+z splith; layout tabbed; focus parent
|
|
bindsym $mod+Shift+z layout default
|
|
|
|
# Workspace management
|
|
bindsym $mod+1 workspace $tag1
|
|
bindsym $mod+2 workspace $tag2
|
|
bindsym $mod+3 workspace $tag3
|
|
bindsym $mod+4 workspace $tag4
|
|
bindsym $mod+q workspace $tag5
|
|
bindsym $mod+w workspace $tag6
|
|
bindsym $mod+e workspace $tag7
|
|
bindsym $mod+r workspace $tag8
|
|
bindsym $mod+Shift+1 move container to workspace $tag1
|
|
bindsym $mod+Shift+2 move container to workspace $tag2
|
|
bindsym $mod+Shift+3 move container to workspace $tag3
|
|
bindsym $mod+Shift+4 move container to workspace $tag4
|
|
bindsym $mod+Shift+q move container to workspace $tag5
|
|
bindsym $mod+Shift+w move container to workspace $tag6
|
|
bindsym $mod+Shift+e move container to workspace $tag7
|
|
bindsym $mod+Shift+r move container to workspace $tag8
|
|
|
|
# Audio
|
|
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
|
|
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
|
|
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
|
|
# Open applications
|
|
bindsym $mod+Return exec alacritty
|
|
bindsym $mod+a mode launcher
|
|
mode launcher {
|
|
bindsym r exec alacritty --title launcher -e /home/{{ .user }}/bin/linux-app-launcher, $e
|
|
bindsym Escape mode default
|
|
}
|
|
bindsym $mod+o mode open
|
|
mode open {
|
|
bindsym b exec chromium, $e
|
|
bindsym s exec steam || flatpak run com.valvesoftware.Steam, $e
|
|
bindsym d exec discord || flatpak run com.discordapp.Discord, $e
|
|
bindsym m exec mpv $(wl-paste), $e
|
|
bindsym Escape mode default
|
|
}
|
|
|
|
for_window [con_mark="SCRATCHPAD_jop"] border pixel 1
|
|
|
|
# Scratchpads commands
|
|
bindsym $mod+c mode scratch
|
|
mode scratch {
|
|
bindsym Return exec sway-scratchpad \
|
|
--command "alacritty" \
|
|
--mark term \
|
|
--width 40 \
|
|
--height 71, $e
|
|
bindsym b exec sway-scratchpad \
|
|
--command "blueman-manager" \
|
|
--mark blue \
|
|
--width 40 \
|
|
--height 71, $e
|
|
bindsym f exec sway-scratchpad \
|
|
--command "alacritty -e tmuxp load /home/{{ .user }}/.config/tmuxp/files.yml" \
|
|
--mark files \
|
|
--width 71 \
|
|
--height 71, $e
|
|
bindsym d exec sway-scratchpad \
|
|
--command "alacritty -e tmuxp load /home/{{ .user }}/.config/tmuxp/dot.yml" \
|
|
--mark dot \
|
|
--width 90 \
|
|
--height 90, $e
|
|
bindsym Shift+c move scratchpad, $e
|
|
bindsym c scratchpad show, $e
|
|
bindsym Escape mode default
|
|
}
|
|
|
|
output $DISP_PRI {
|
|
resolution 2560x1440@143.973Hz
|
|
position 2560,0
|
|
}
|
|
|
|
output $DISP_SEC {
|
|
resolution 2560x1440@143.912Hz
|
|
position 0,0
|
|
}
|
|
|
|
bar {
|
|
position top
|
|
tray_output none
|
|
pango_markup enabled
|
|
status_command while ~/.config/sway/scripts/status.sh; do sleep 1; done
|
|
colors {
|
|
background #000000
|
|
focused_workspace $workspace $workspace $background
|
|
}
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#----- AUTOSTART WITH I3
|
|
#-------------------------------------------------------------------------------
|
|
|
|
#exec_always --no-startup-id "configure-gtk"
|
|
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
|
|
exec_always --no-startup-id "swaybg -i ~/media/pictures/wallpapers/solar_system_wallpapers/mars.png"
|
|
exec --no-startup-id "~/.config/sway/scripts/idle.sh"
|
|
exec --no-startup-id "udiskie"
|