dotfiles/.config/sway/config

218 lines
6.1 KiB
Text
Raw Normal View History

2024-06-22 08:44:12 -05:00
exec "/usr/lib/polkit-kde-authentication-agent-1"
2024-06-07 16:50:49 -05:00
exec_always "pkill kanshi"
exec_always "pkill swayidle"
exec_always "pkill swaync"
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
2024-09-15 08:55:49 -05:00
set $files cosmic-files
set $browser flatpak run io.gitlab.librewolf-community
2024-06-02 09:31:22 -05:00
set $menu wofi
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
2024-06-02 09:31:22 -05:00
output * bg ~/.config/configfiles/wallpaper.png 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 \
2024-06-07 16:50:49 -05:00
timeout 300 'swaylock -f' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
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
scroll_factor 0.2
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
}
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
bindsym $mod+Return exec $term
2024-06-02 06:06:59 -05:00
2024-09-15 08:55:49 -05:00
# File Browser
bindsym $mod+Shift+t exec $files
# Browser
bindsym $mod+Shift+f exec $browser
2024-06-05 17:23:02 -05:00
# Kill focused window
bindsym $mod+Shift+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
2024-06-02 06:06:59 -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
# Move focused container to workspace
2024-09-04 15:56:35 -05:00
bindsym $mod+control+1 move container to workspace number 1
bindsym $mod+control+2 move container to workspace number 2
bindsym $mod+control+3 move container to workspace number 3
bindsym $mod+control+4 move container to workspace number 4
bindsym $mod+control+5 move container to workspace number 5
bindsym $mod+control+6 move container to workspace number 6
bindsym $mod+control+7 move container to workspace number 7
bindsym $mod+control+8 move container to workspace number 8
bindsym $mod+control+9 move container to workspace number 9
bindsym $mod+control+0 move container to workspace number 10
2024-06-05 17:23:02 -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-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.
bindsym $mod+b splith
bindsym $mod+v splitv
# 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
bindsym $mod+f fullscreen
# 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
2024-06-17 04:47:55 -05:00
# Border
default_border pixel
gaps inner 5
2024-08-25 20:36:32 -05:00
# Guesture
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
2024-06-02 06:06:59 -05:00
include /etc/sway/config.d/*