222 lines
6.9 KiB
Text
222 lines
6.9 KiB
Text
# Mod1 = Alt
|
|
# Mod4 = Windows key
|
|
set $mod Mod1
|
|
set $left h
|
|
set $down j
|
|
set $up k
|
|
set $right l
|
|
set $term alacritty
|
|
set $browser firefox
|
|
set $menu wmenu-run -i -p '>' -l 4 -f "BerkeleyMono Nerd Font Mono 12"
|
|
set $file thunar
|
|
|
|
set $ws1 1 web
|
|
set $ws2 2 term
|
|
set $ws3 3 file
|
|
set $ws4 4 blog
|
|
set $ws5 5 media
|
|
set $ws7 6 other
|
|
|
|
default_border pixel 5
|
|
default_floating_border pixel 5
|
|
gaps inner 8
|
|
# Hide border when only 1 window
|
|
hide_edge_borders smart
|
|
|
|
set {
|
|
$bg #243936
|
|
#$focused #ffde21
|
|
$text #c0c8c6
|
|
$active #66ac9f
|
|
}
|
|
# border background text indicator childborder
|
|
client.focused $bg $bg $text $active $active
|
|
|
|
output * bg ~/data/local/wallpaper/abstract.jpg fill
|
|
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
|
|
|
# BSP-style window tiling
|
|
exec_always autotiling
|
|
|
|
# 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.
|
|
exec swayidle -w \
|
|
timeout 300 'swaylock -f -c 000000' \
|
|
timeout 330 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
|
before-sleep 'swaylock -f -c 000000'
|
|
|
|
# Clipboard manager
|
|
#exec wl-paste -t text --watch clipman store --no-persist
|
|
exec wl-paste --watch cliphist store
|
|
bindsym $mod+ctrl+v exec cliphist list | wmenu -l 3 | cliphist decode | wl-copy && wl-paste --no-newline | xargs -I {} wtype {}
|
|
|
|
# Notifications
|
|
|
|
### Input configuration
|
|
input type:keyboard {
|
|
xkb_layout "us"
|
|
xkb_variant intl
|
|
repeat_delay 250
|
|
repeat_rate 50
|
|
}
|
|
|
|
input type:pointer {
|
|
#accel_profile "flat" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat")
|
|
accel_profile "adaptive" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat")
|
|
pointer_accel -0.85 # set mouse sensitivity (between -1 and 1)
|
|
}
|
|
|
|
# Read `man 5 sway-input` for more information about this section.
|
|
|
|
### Key bindings
|
|
bindsym $mod+Return exec $term
|
|
bindsym $mod+G exec $browser
|
|
bindsym $mod+T exec $file
|
|
|
|
# Kill focused window
|
|
bindsym $mod+Shift+q kill
|
|
|
|
# Start your launcher
|
|
bindsym $mod+d exec $menu
|
|
|
|
# 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.
|
|
floating_modifier $mod normal
|
|
|
|
# Reload the configuration file
|
|
bindsym $mod+Shift+c reload
|
|
|
|
# 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'
|
|
|
|
# Lock screen
|
|
bindsym $mod+o exec 'swaylock -f'
|
|
# Focus window
|
|
bindsym $mod+$left focus left
|
|
bindsym $mod+$down focus down
|
|
bindsym $mod+$up focus up
|
|
bindsym $mod+$right focus right
|
|
bindsym $mod+Left focus left
|
|
bindsym $mod+Down focus down
|
|
bindsym $mod+Up focus up
|
|
bindsym $mod+Right focus right
|
|
|
|
# Move focused window
|
|
bindsym $mod+Shift+$left move left
|
|
bindsym $mod+Shift+$down move down
|
|
bindsym $mod+Shift+$up move up
|
|
bindsym $mod+Shift+$right move right
|
|
bindsym $mod+Shift+Left move left
|
|
bindsym $mod+Shift+Down move down
|
|
bindsym $mod+Shift+Up move up
|
|
bindsym $mod+Shift+Right move right
|
|
|
|
# Switch workspace
|
|
bindsym $mod+1 workspace $ws1
|
|
bindsym $mod+2 workspace $ws2
|
|
bindsym $mod+3 workspace $ws3
|
|
bindsym $mod+4 workspace $ws4
|
|
bindsym $mod+5 workspace $ws5
|
|
bindsym $mod+6 workspace $ws6
|
|
bindsym $mod+7 workspace $ws7
|
|
# Move focused container to workspace
|
|
bindsym $mod+Shift+1 move container to workspace $ws1
|
|
bindsym $mod+Shift+2 move container to workspace $ws2
|
|
bindsym $mod+Shift+3 move container to workspace $ws3
|
|
bindsym $mod+Shift+4 move container to workspace $ws4
|
|
bindsym $mod+Shift+5 move container to workspace $ws5
|
|
bindsym $mod+Shift+6 move container to workspace $ws6
|
|
bindsym $mod+Shift+7 move container to workspace $ws7
|
|
bindsym ctrl+alt+shift+n workspace next
|
|
bindsym ctrl+alt+shift+p workspace prev
|
|
|
|
# LAYOUT
|
|
# 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
|
|
|
|
# Zen mode
|
|
bindsym $mod+z floating toggle; resize set width 1750 height 1000; move position center
|
|
|
|
# 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
|
|
# XXX: what is this for
|
|
#bindsym $mod+a focus parent
|
|
|
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
# You can send windows there and get them back later.
|
|
# Move the currently focused window to the scratchpad
|
|
bindsym $mod+Shift+minus move scratchpad
|
|
|
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
# If there are multiple scratchpad windows, this command cycles through them.
|
|
bindsym $mod+minus scratchpad show
|
|
|
|
bindsym ctrl+alt+shift+a resize shrink width 10px
|
|
bindsym ctrl+alt+shift+s resize grow height 10px
|
|
bindsym ctrl+alt+shift+w resize shrink height 10px
|
|
bindsym ctrl+alt+shift+d resize grow width 10px
|
|
|
|
# Resizing containers:
|
|
mode "RESIZE" {
|
|
bindsym $left resize shrink width 80px
|
|
bindsym $down resize grow height 20px
|
|
bindsym $up resize shrink height 20px
|
|
bindsym $right resize grow width 80px
|
|
# Return to default mode
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
}
|
|
bindsym ctrl+alt+shift+r mode "RESIZE"
|
|
|
|
# Volume control with PipeWire
|
|
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
|
# Get the device ID with `wpctl status` or use @DEFAULT_AUDIO_SINK@
|
|
bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-
|
|
bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+
|
|
# FIXME: https://wiki.archlinux.org/title/MPRIS
|
|
# bindsym --locked XF86AudioPause exec wpctl set-mute 48 toggle
|
|
|
|
# Screenshot
|
|
bindsym Mod4+Shift+4 exec grimshot --notify save area
|
|
bindsym Mod4+Shift+Space exec grimshot --notify save window
|
|
|
|
# man 5 sway-bar
|
|
bar {
|
|
position bottom
|
|
font BerkeleyMono Nerd Font Mono
|
|
status_command ~/.config/sway/status.sh
|
|
|
|
colors {
|
|
statusline #869795
|
|
background #ffffff00
|
|
inactive_workspace #32323200 #32323200 #6c7e7c
|
|
focused_workspace #2d4844 #2d4844 #d5dad9
|
|
urgent_workspace #b4b479 #b4b479 #121c1b
|
|
}
|
|
}
|
|
|
|
for_window [title="galculator"] floating enable
|
|
|
|
include /etc/sway/config.d/*
|