ktns-dotfiles-2025/sway/sway.d/config

204 lines
8.3 KiB
Plaintext

##############################################################################
######### ^^^^^ '^ ^ ^' ^ ^. .^ #############
##### ^' '^ ^. ^ .^ ^^^ ^^ ^^ ##########
########## ^^ '^ ^ ^ ^' ^' '^ ^ ^ ######
#### '^^^^. ^.^ ^.^ .^ ^: ^.^ ##############
############# . '^ '^^ ^^' .^^^^^^^. '^' ########
######## ^. ^' ^' '^ ^' '^ ^ ############
########### ^^^^^' ^ ^ ^' '^ ^ #########
###############################################################################
# Read `man 5 sway` for a complete reference.
set $SUPER Mod4
set $ALT Mod1
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $browser dex ~/.local/share/applications/librewolf.desktop
# You can get the names of your outputs by running: swaymsg -t get_outputs
output LVDS-1 resolution 1440x900 position 0,0
output HDMI-A-1 resolution 1920x1080 position 1440,150
# output eDP1 resolution 1920x1080 position 0,0
# output LVDS-1 bg #11111b solid_color
# output HDMI-A-1 bg #11111b solid_color
exec sworkstyle &> /tmp/sworkstyle.log
exec pipewire
exec dunst
exec autotiling
exec swww-daemon --no-cache
exec kanshi
# exec dex ~/.local/share/applications/librewolf-calendar.desktop
exec swayidle -w \
timeout 6000 'notify-send LOCKING && glitchlock-wl' \
timeout 10800 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on" && sun-init'
#
### Keybindings:
#
floating_modifier $ALT normal
bindsym $SUPER+n output HDMI-A-1 transform 90 clockwise
bindsym $SUPER+Shift+n output HDMI-A-1 transform 90 anticlockwise
bindsym $SUPER+Shift+p exec grimshot --notify --wait 1 copy window
bindsym $SUPER+$ALT+w exec kanshictl reload
bindsym $SUPER+Return exec $term
bindsym $SUPER+Shift+Return exec $term --class minialacritty
bindsym $SUPER+x kill
bindsym $SUPER+b exec $browser
bindsym $SUPER+$ALT+b exec LibreWolf.x86_64.AppImage --profile\
~/.librewolf/8u4uo9kh.Calendar/
bindsym $SUPER+r exec /usr/sbin/tofi-drun | xargs swaymsg exec --
bindsym $SUPER+p exec ~/.local/bin/waybarestart.sh
bindsym $SUPER+Home exec pcmanfm
bindsym $SUPER+Shift+x exec swaylock -le
bindsym $SUPER+Shift+t exec strawberry
bindsym $SUPER+Shift+c exec dex ~/.local/share/applications/rink.desktop
bindsym $SUPER+Shift+a exec dex ~/.local/share/applications/fu.desktop
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindswitch --locked --no-warn lid:off exec kanshictl reload
bindswitch --locked --no-warn lid:on exec kanshictl reload
# bindswitch --locked --no-warn lid:off exec ~/.local/bin/waybarestart.sh
# bindswitch --locked --no-warn lid:on exec pkill waybar
bindsym $SUPER+Shift+r exec swaymsg reload && \
notify-send reloaded -t 500
bindsym $SUPER+Shift+q exec swaynag -t warning -m \
'Exit sway?' -B 'Yes' 'swww kill && swaymsg exit'
bindsym $SUPER+s exec bat -p ~/.config/tofi/sunsetter-tofi |\
/usr/sbin/tofi --height 40% --width 45% | bash
#
### Moving around:
#
bindsym $ALT+Left focus left
bindsym $ALT+Down focus down
bindsym $ALT+Up focus up
bindsym $ALT+Right focus right
bindsym $ALT+Shift+Left move left
bindsym $ALT+Shift+Down move down
bindsym $ALT+Shift+Up move up
bindsym $ALT+Shift+Right move right
#
### Workspaces:
#
bindsym $ALT+Control+Left workspace prev
bindsym $ALT+Control+Right workspace next
bindsym $ALT+Shift+Control+Left \
move container to workspace prev ; workspace prev
bindsym $ALT+Shift+Control+Right \
move container to workspace next ; workspace next
#
### Layout stuff:
#
# bindsym $SUPER+backslash splith
# bindsym $SUPER+minus splitv
# Switch the current container between different layout styles
# bindsym $SUPER+s layout stacking
# bindsym $SUPER+e layout toggle split
bindsym $SUPER+backslash layout toggle split
# Toggle the current focus between tiling and floating mode
bindsym $SUPER+f floating toggle
# Swap focus between the tiling area and the floating area
# bindsym $SUPER+$ALT+f focus mode_toggle
# Move focus to the parent container
# bindsym $SUPER+a focus parent
#
### Resizing containers:
#
bindsym $ALT+r mode "resize"
mode "resize" {
# left will shrink the containers width
bindsym $left resize shrink width 10px
# down will grow the containers height
bindsym $down resize grow height 10px
# up will shrink the containers height
bindsym $up resize shrink height 10px
# right will grow the containers width
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
#
### Theme:
#
include catppuccin-mocha
seat seat0 xcursor_theme Hack-C
default_border pixel 2
smart_borders on
mouse_warping output
hide_edge_borders smart
corner_radius 15
### Target: title bg text indicator border
client.focused $green $mantle $text $lavender $green
client.focused_inactive $overlay0 $mantle $text $surface1 $base
client.unfocused $overlay0 $mantle $text $lavender $base
client.urgent $peach $base $peach $overlay0 $green
client.placeholder $overlay0 $crust $text $overlay0 $overlay0
client.background $base
#
### Rules:
# swaymsg -t get_tree
for_window {
[app_id="rink"] floating enable, resize set width 200 height 250
[class="marktext"] floating enable
[app_id="wavemon"] floating enable, resize set width 650 height 450
[app_id="pcmanfm"] floating enable
[app_id="pop-up"] floating enable, resize set width 80 height 400
[app_id="minialacritty"] floating enable, resize set width 250 height 250, border pixel 8, corner_radius 20
[app_id="fu"] floating enable, resize set width 600 height 500
[app_id="moon"] floating enable, resize set width 500 height 360
[class="wifis"] floating enable, resize set width 500 height 410
[app_id="converseen"] floating enable, resize set width 600 height 800
[app_id="wifis"] floating enable, resize set width 500 height 410
[app_id="file-roller"] floating enable
[app_id="bashmount"] floating enable, resize set width 565 height 450
[title="Library"] floating enable
[title="Picture-in-Picture"] floating enable
[window_role="bubble"] floating enable
[window_role="dialog"] floating enable
[title="GIMP Startup"] floating enable, border none
[title="/Animation Playback/"] floating enable, border none
[app_id="fr.greyc.gmic_gimp_qt"] floating enable, border none
[class=".*"] inhibit_idle fullscreen
[app_id=".*"] inhibit_idle fullscreen
[app_id="org.gnome.DejaDup"] inhibit_idle fullscreen
[title="wl-gammarelay-applet"] floating enable,\
move position cursor, move down 20
[title="/Extension: (Bitwarden Password Manager)/"] floating enable, shadows disable
# [title="Extension: (Bitwarden Password Manager) - \
# Bitwarden — Mozilla Firefox"] floating enable
}
include /etc/sway/config.d/*
include ~/.config/sway/config.d/*.conf