2024-06-22 08:44:12 -05:00
exec "/usr/lib/polkit-kde-authentication-agent-1"
2025-03-12 16:57:56 -05:00
exec_always {
pkill kanshi
pkill swayidle
pkill swaync
}
2024-06-07 16:50:49 -05:00
exec_always "sleep 1"
2024-06-02 06:06:59 -05:00
### Variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
2024-07-24 17:04:59 -05:00
set $term kitty
2025-03-12 16:57:56 -05:00
set $files nautilus
set $browser flatpak run app.zen_browser.zen
set $menu wofi
2024-06-02 06:06:59 -05:00
2025-05-02 06:09:07 -05:00
set $next_or_new swaymsg -r -t get_workspaces | jq -r --arg OUTPUT $(swaymsg -t get_outputs -r | jq -r '.[] | select(.focused == true) | .name') '(. | (max_by(.num) | .num)) as $max | [.[] | select(.output == $OUTPUT)] | (max_by(.num) | .num) as $maxOutput | (.[] | select(.focused == true) | .num) as $current | if $maxOutput > $current then "next_on_output" else $max + 1 end'
set $previous_or_first swaymsg -r -t get_workspaces | jq -r --arg OUTPUT $(swaymsg -t get_outputs -r | jq -r '.[] | select(.focused == true) | .name') '(. | (max_by(.num) | .num)) as $max | [.[] | select(.output == $OUTPUT)] | (min_by(.num) | .num) as $minOutput | (.[] | select(.focused == true) | .num) as $current | if $minOutput < $current then "prev_on_output" else $current end'
2024-06-02 06:06:59 -05:00
include /etc/sway/config-vars.d/*
2024-06-07 04:49:14 -05:00
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
2024-06-07 16:50:49 -05:00
2024-06-15 08:31:47 -05:00
exec_always {
gsettings set org.gnome.desktop.interface gtk-theme 'catppuccin-mocha-mauve-standard+default'
}
2024-06-02 06:06:59 -05:00
### Output configuration
2025-03-12 21:09:35 -05:00
output * bg ~/.config/configfiles/wallpaper.jpg fill
2024-06-07 16:50:49 -05:00
exec_always "kanshi"
2024-06-02 06:06:59 -05:00
### Idle configuration
2024-06-07 04:49:14 -05:00
exec_always swayidle -w \
2025-03-12 16:57:56 -05:00
timeout 120 'swaylock -f' \
timeout 240 'swaymsg "output * dpms off"' \
2025-04-24 10:40:42 -05:00
timeout 300 'systemctl suspend' \
2024-06-07 16:50:49 -05:00
resume 'swaymsg "output * dpms on"' \
2025-04-24 10:40:42 -05:00
before-sleep 'swaylock -f'
2024-06-02 06:06:59 -05:00
2024-06-26 06:25:36 -05:00
#timeout 1200 'systemctl suspend' \
2024-06-02 06:06:59 -05:00
### Input configuration
2024-08-23 16:25:54 -05:00
input "type:touchpad" {
2024-06-05 17:23:02 -05:00
dwt enabled
tap enabled
middle_emulation enabled
2024-08-23 16:25:54 -05:00
natural_scroll disabled
2025-03-12 16:57:56 -05:00
scroll_factor 0.5
2024-06-05 17:23:02 -05:00
}
2024-06-02 06:06:59 -05:00
2024-07-14 05:42:54 -05:00
input "type:pointer" {
accel_profile "flat"
pointer_accel 0
}
2025-04-24 10:40:42 -05:00
2024-06-07 16:50:49 -05:00
# Notification Daemon
exec_always swaync
# Toggle control center
bindsym $mod+Shift+n exec swaync-client -t -sw
2024-07-14 07:03:21 -05:00
# Start IDE
bindsym $mod+Shift+i exec /opt/goland/bin/goland.sh
2024-06-02 06:06:59 -05:00
### Key bindings
2024-06-05 17:23:02 -05:00
2024-06-02 06:06:59 -05:00
# Basics:
2024-06-05 17:23:02 -05:00
# Start a terminal
2025-04-24 10:40:42 -05:00
bindsym $mod+t exec $term
2024-06-02 06:06:59 -05:00
2024-09-15 08:55:49 -05:00
# File Browser
2025-04-24 10:40:42 -05:00
bindsym $mod+f exec $files
2024-09-15 08:55:49 -05:00
# Browser
2025-04-24 10:40:42 -05:00
bindsym $mod+b exec $browser
2024-09-15 08:55:49 -05:00
2024-06-05 17:23:02 -05:00
# Kill focused window
2025-04-24 10:40:42 -05:00
bindsym $mod+q kill
2024-06-02 06:06:59 -05:00
2024-06-05 17:23:02 -05:00
# Start your launcher
bindsym $mod+space exec $menu
2024-06-02 06:06:59 -05:00
2024-06-05 17:23:02 -05:00
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
2024-07-14 05:42:54 -05:00
#floating_modifier control normal
2024-06-02 06:06:59 -05:00
2024-06-05 17:23:02 -05:00
# Reload the configuration file
bindsym $mod+Shift+c reload
2024-06-02 06:06:59 -05:00
2024-06-05 17:23:02 -05:00
# Lock
bindsym $mod+Shift+Escape exec swaylock -f -c 000000
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
2024-06-03 20:20:48 -05:00
2024-06-02 06:06:59 -05:00
# Moving around:
2024-06-05 17:23:02 -05:00
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
2025-04-24 10:40:42 -05:00
# Workspaces:
2024-06-05 17:23:02 -05:00
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
2025-04-02 19:44:16 -05:00
2024-06-05 17:23:02 -05:00
# Move focused container to workspace
2025-04-24 10:40:42 -05:00
bindsym $mod+control+1 move container to workspace number 1;workspace number 1
bindsym $mod+control+2 move container to workspace number 2;workspace number 2
bindsym $mod+control+3 move container to workspace number 3;workspace number 3
bindsym $mod+control+4 move container to workspace number 4;workspace number 4
bindsym $mod+control+5 move container to workspace number 5;workspace number 5
bindsym $mod+control+6 move container to workspace number 6;workspace number 6
bindsym $mod+control+7 move container to workspace number 7;workspace number 7
bindsym $mod+control+8 move container to workspace number 8;workspace number 8
bindsym $mod+control+9 move container to workspace number 9;workspace number 9
bindsym $mod+control+0 move container to workspace number 10;workspace number 10
2024-06-05 17:23:02 -05:00
2025-05-02 06:09:07 -05:00
bindsym $mod+control+l exec swaymsg "workspace $($next_or_new)"
bindsym $mod+control+h exec swaymsg "workspace $($previous_or_first)"
bindsym $mod+Shift+control+$right exec swaymsg "move container to workspace $($next_or_new), workspace next_on_output"
bindsym $mod+Shift+control+$left exec swaymsg "move container to workspace $($previous_or_first), workspace prev_on_output"
# bindsym $mod+control+l workspace next
# bindsym $mod+control+h workspace prev
#
# # Move window to next or previous workspace
# bindsym $mod+Shift+control+$left move container to workspace prev; workspace prev
# bindsym $mod+Shift+control+$right move container to workspace next; workspace next
2025-04-02 19:44:16 -05:00
# bindsym $mod+control+$left move workspace to output left
# bindsym $mod+control+$down move workspace to output down
# bindsym $mod+control+$up move workspace to output up
# bindsym $mod+control+$right move workspace to output right
2024-06-05 17:23:02 -05:00
2024-06-02 06:06:59 -05:00
# Layout stuff:
2024-06-05 17:23:02 -05:00
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
2025-04-24 10:40:42 -05:00
#bindsym $mod+b splith
#bindsym $mod+v splitv
2024-06-05 17:23:02 -05:00
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
2025-04-24 10:40:42 -05:00
bindsym $mod+m fullscreen
2024-06-05 17:23:02 -05:00
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
#bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
2024-06-02 06:06:59 -05:00
# Resizing containers:
2024-06-05 17:23:02 -05:00
2024-06-02 06:06:59 -05:00
mode "resize" {
2024-06-05 17:23:02 -05:00
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
2024-06-02 06:06:59 -05:00
}
bindsym $mod+r mode "resize"
# Status Bar:
bar {
swaybar_command waybar
workspace_buttons yes
}
# Audio
bindsym XF86AudioRaiseVolume exec "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+; pkill -RTMIN+8 waybar"
bindsym XF86AudioLowerVolume exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; pkill -RTMIN+8 waybar"
bindsym XF86AudioMute exec "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; pkill -RTMIN+8 waybar"
# Brightness
2024-06-02 13:38:15 -05:00
bindsym XF86MonBrightnessDown exec brightnessctl s 10%-
bindsym XF86MonBrightnessUp exec brightnessctl s +10%
2024-06-02 06:06:59 -05:00
2024-06-21 06:55:18 -05:00
2024-06-14 17:21:27 -05:00
# ScreenShot
bindsym $mod+p exec grim -g "$(slurp)" - | wl-copy
2025-04-02 19:44:16 -05:00
bindsym $mod+shift+p exec grim - | wl-copy
2024-06-17 04:47:55 -05:00
# Border
2025-04-24 10:40:42 -05:00
client.focused "#ff77ff" "#ff77ff" "#ffffff" "#ff77ff"
2025-04-02 19:44:16 -05:00
default_border pixel 2
gaps inner 2
2024-06-17 04:47:55 -05:00
2024-08-25 20:36:32 -05:00
# Guesture
2025-04-24 10:40:42 -05:00
bindgesture swipe:right workspace next
bindgesture swipe:left workspace prev
2024-08-25 20:36:32 -05:00
2024-06-02 06:06:59 -05:00
include /etc/sway/config.d/*