Files
.dotfiles/.config/sway/config
2025-03-21 13:06:13 -07:00

135 lines
3.8 KiB
Plaintext

# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
font 'JetBrainsMono NF' 9
### Variables
#
# Logo key. Use Mod1 for Alt.
#set $mod Mod4
set $mod Mod1
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term foot
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu wofi -S drun -Ii
include /etc/sway/config-vars.d/*
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/ubuntu-wallpaper-d.png fill
hide_edge_borders smart
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
output * scale 1.8
set $laptop eDP-1
output $laptop mode 2880x1800@60Hz scale 2
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
exec_always ./scripts/clamshell-mode.sh
### Idle configuration
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
include ./keybinds.conf
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command i3blocks
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
# Generated windows.
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable;
for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 800 600
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% \
&& pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% \
&& pkill -RTMIN+10 i3blocks
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle \
&& pkill -RTMIN+10 i3blocks
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym XF86Search exec bemenu-run
bindsym $mod+p exec grimshot savecopy anything
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
default_border pixel 2
default_floating_border pixel 2
titlebar_padding 2
titlebar_border_thickness 2
exec nextcloud-desktop-client.nextcloud
exec mako
exec preload
include /etc/sway/config.d/*