Modularize sway configs

This commit is contained in:
Salt 2024-04-17 01:27:21 -05:00
parent 7f756565a0
commit 6494402d57
7 changed files with 108 additions and 108 deletions

View File

@ -3,55 +3,8 @@
# Licensed under the terms of the MIT License
#
# Configs
## CONFIGS
set $term foot
## WINDOW RULES
for_window {
[app_id="org.mozilla.firefox"] move container to workspace $w1
[app_id="org.mozilla.Thunderbird"] move container to workspace $w7
[app_id="org.keepassxc.KeePassXC"] move container to workspace $w8
[app_id="com.discordapp.Discord"] move container to workspace $w9
[app_id="com.discordapp.Discord"] inhibit_idle visible
[class="Element"] move container to workspace $w9
[class="Element"] inhibit_idle visible
[class="Spotify"] move container to workspace $w10
}
## COSMETICS
font pango:IBM Plex Sans 12
default_border pixel 4
titlebar_border_thickness 4
focus_on_window_activation none
gaps inner 8
set $red #fb4934
set $green #b8bb26
set $yellow #fabd2f
set $blue #83a598
set $magenta #de869b
set $cyan #8ec07c
set $white #ebdbb2
set $black #282828
set $gray #32302f
# See sway(5) for details on these
# Border color of the view itself v
# Indicator color (like for v/h split) v
# Titlebar text color v
# Titlebar backgrouond color v
# Titlebar border color v
# <colorclass> <brd> <bg> <text> <ind> <chld>
# The currently focused window
client.focused $blue $blue $black $gray $blue
# The most recently focused view in an unfocused container
client.focused_inactive $gray $black $white $gray $gray
# Any other unfocused views
client.unfocused $gray $gray $white $gray $gray
# Any view with an urgency hint
client.urgent $yellow $black $white $gray $yellow
## KEYBINDINGS
# Set modifiers
set $mod Mod1
set $sup Mod4
@ -60,82 +13,65 @@ set $shift Shift
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Program opening and closing
bindsym $mod+Return exec "$term"
bindsym $mod+q kill
bindsym $mod+space exec "rofi -show drun"
bindsym $mod+backslash exec "rofi -show ssh"
bindsym $mod+Tab exec "rofi -show window"
# Dunst management
bindsym $mod+$shift+space exec dunstctl close
bindsym $mod+$shift+Return exec dunstctl close-all
bindsym $mod+$shift+d exec dunstctl history-pop
bindsym $mod+$shift+o exec dunstctl context
# Pulse controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Screenshots
bindsym $mod+o exec grim -g "$(slurp -d)" - | wl-copy
# Brightness controls
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
# pavucontrol-qt controls
# pavucontrol controls
bindsym $mod+p exec --no-startup-id "pgrep pavucontrol || pavucontrol"
bindsym $mod+$shift+p exec --no-startup-id "pkill pavucontrol"
# Miscellaneous non-movement hotkeys
bindsym $ctl+$mod+l exec --no-startup-id "loginctl lock-session"
bindsym $mod+$shift+c reload
# change focus
# Change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move focused window
# Move the focused window around
bindsym $mod+$shift+h move left
bindsym $mod+$shift+j move down
bindsym $mod+$shift+k move up
bindsym $mod+$shift+l move right
# move focused workspace between monitors
bindsym $sup+h move workspace to output left
bindsym $sup+j move workspace to output down
bindsym $sup+k move workspace to output up
bindsym $sup+l move workspace to output right
# split in horizontal orientation
# Move the focused workspace between monitors
# Disabled here because I like having workspaces allocated to certain outputs
#bindsym $sup+h move workspace to output left
#bindsym $sup+j move workspace to output down
#bindsym $sup+k move workspace to output up
#bindsym $sup+l move workspace to output right
# Configure the split of this container
bindsym $mod+semicolon split h
# split in vertical orientation
bindsym $mod+v split v
# toggle tiling / floating
# Toggle floating
bindsym $mod+f floating toggle
# enter fullscreen mode for the focused container
# Fullscreen
bindsym $mod+$shift+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# focus the parent container
# Change the layout of this container
# Disabled because I just fatfinger these, they're never useful in my workflow
#bindsym $mod+s layout stacking
#bindsym $mod+w layout tabbed
#bindsym $mod+e layout toggle split
# Focus the parent container. Lets you move groups at a time
bindsym $mod+a focus parent
# focus the child container
# Focus the child container
bindsym $mod+d focus child
# switch to workspace
# Switch between workspaces
bindsym $mod+1 workspace $w1
bindsym $mod+2 workspace $w2
bindsym $mod+3 workspace $w3
@ -146,12 +82,9 @@ bindsym $mod+7 workspace $w7
bindsym $mod+8 workspace $w8
bindsym $mod+9 workspace $w9
bindsym $mod+0 workspace $w10
# switch to next and previous workspaces
bindsym $mod+period workspace next
bindsym $mod+comma workspace prev
# move focused container to workspace
# Move the focused container to a specific workspace
bindsym $mod+$shift+1 move container to workspace $w1
bindsym $mod+$shift+2 move container to workspace $w2
bindsym $mod+$shift+3 move container to workspace $w3
@ -163,24 +96,6 @@ bindsym $mod+$shift+8 move container to workspace $w8
bindsym $mod+$shift+9 move container to workspace $w9
bindsym $mod+$shift+0 move container to workspace $w10
## INPUTS
# Mice
#input "type:pointer" {
# accel_profile flat # Disables mouse acceleration
# pointer_accel 0.000 # Set a sens that I like
#}
input "type:touchpad" {
drag enabled
dwt disabled
tap enabled
tap_button_map lrm
}
# Keyboards
input "type:keyboard" {
xkb_capslock disabled
xkb_numlock enabled
}
## OUTPUTS
# Wallpaper
output * bg ~/Pictures/Wallpapers/.current fill

View File

@ -0,0 +1,22 @@
# vim: set ft=swayconfig:
#
# This file stores global confguration for input devices
#
# Mice
#input "type:pointer" {
# accel_profile flat # Disables mouse acceleration
# pointer_accel 0.000 # Set a sens that I like
#}
input "type:touchpad" {
drag enabled
dwt disabled
tap enabled
tap_button_map lrm
}
# Keyboards
input "type:keyboard" {
xkb_capslock disabled
xkb_numlock enabled
}

View File

@ -0,0 +1,38 @@
# vim: set ft=swayconfig:
#
# This file controls all theming within swaywm, including colors, gaps,
# borders, fonts, etc.
#
# Right now we're staring at a nice gruvbox theme
#
font pango:IBM Plex Sans 12
default_border pixel 4
titlebar_border_thickness 4
focus_on_window_activation none
gaps inner 8
set $red #fb4934
set $green #b8bb26
set $yellow #fabd2f
set $blue #83a598
set $magenta #de869b
set $cyan #8ec07c
set $white #ebdbb2
set $black #282828
set $gray #32302f
# See sway(5) for details on these
# Border color of the view itself v
# Indicator color (like for v/h split) v
# Titlebar text color v
# Titlebar backgrouond color v
# Titlebar border color v
# <colorclass> <brd> <bg> <text> <ind> <chld>
# The currently focused window
client.focused $blue $blue $black $gray $blue
# The most recently focused view in an unfocused container
client.focused_inactive $gray $black $white $gray $gray
# Any other unfocused views
client.unfocused $gray $gray $white $gray $gray
# Any view with an urgency hint
client.urgent $yellow $black $white $gray $yellow

View File

@ -0,0 +1,16 @@
# vim: set ft=swayconfig:
#
# This file allocates rules for organizing windows
#
for_window {
[app_id="org.mozilla.firefox"] move container to workspace $w1
[app_id="org.mozilla.Thunderbird"] move container to workspace $w7
[app_id="org.keepassxc.KeePassXC"] move container to workspace $w8
[app_id="com.discordapp.Discord"] move container to workspace $w9
[app_id="com.discordapp.Discord"] inhibit_idle visible
[class="Element"] move container to workspace $w9
[class="Element"] inhibit_idle visible
[class="Spotify"] move container to workspace $w10
}

View File

@ -1,3 +1,5 @@
# vim: set ft=swayconfig:
#
# Idle and lock configuration
#
# This will lock your screen after 300 seconds of inactivity, then turn off

View File

@ -1,5 +1,10 @@
# vim: set ft=swayconfig:
# wlsunset(1)
#
# wlsunset is more or less redshift. It reddens the screen as the day draws
# to a close.
#
# For customization, see wlsunset(1)
#
exec wlsunset \
-T 5300 \
-t 3500 \

View File

@ -0,0 +1,2 @@
# vim: set ft=swayconfig: