Live-debian_sway/swayconfig

256 lines
8.2 KiB
Text
Raw Permalink Normal View History

#==================================================================================#
# Sway Window Manager Configuration File #
#----------------------------------------------------------------------------------#
# Purpose: This configuration file enables you to tweak keyboard shortcuts, adjust #
# themes and colors, set the wallpaper, and more. #
# #
# License: Creative Commons Attribution 4.0 International #
# #
# Pro-tip: While using Sway, you can trigger this configuration to be re-read by #
# pressing Super + Shift + C. #
#==================================================================================#
#========================#
# Appearance and Theming #
#========================#
# Declare Colors:
set $background #332b2b
set $color_urgent #fb4934
set $text_color #ffffff
set $title_bg_unfocused #666666
set $title_outline_active #0e844e
set $title_outline_unfocused #332b2b
# Set Colors: Border Background Text Indicator Child Border
client.background $background
client.focused $title_outline_active $background $text_color $title_outline_active $title_outline_active
client.focused_inactive $title_outline_unfocused $background $text_color $text_color $title_outline_unfocused
client.unfocused $title_outline_unfocused $title_bg_unfocused $text_color $title_outline_active
client.urgent $color_urgent $color_urgent $color_urgent $color_urgent $color_urgent
# Add gaps in between all application windows:
gaps inner 8
gaps outer 3
# Configure the default border:
default_border pixel 2
# Set the Wallpaper:
output * bg $HOME/.config/sway/sirius.png fill
#====================================#
# Activate the panel #
#====================================#
# Set bumblebee status bar:
bar {
status_command /usr/bin/bumblebee/bumblebee-status -m cpu memory battery time \
pasink pasource -p time.format="%H:%M" -t solarized
}
#====================================#
# Keyboard Shortcuts (Sway-specific) #
#====================================#
# Set the modifier key to super:
set $mod Mod4
# Set the ALT key to $alt (since Mod1 is harder to remember):
set $alt Mod1
# Set up a shortcut to reload this config file:
bindsym $mod+Shift+c reload
# Quit your current session and return to the log-in manager/tty:
bindsym $mod+Shift+e exec $HOME/.config/sway/exit.sh
# Screen locking (automatic, with a timeout)
set $lock swaylock -c 550000
exec swayidle -w \
timeout 600 $lock \
timeout 570 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep $lock
# Screen locking (manual)
set $lock_screen exec bash ~/.config/sway/lock_screen.sh
bindsym $mod+Escape exec $lock_screen
#========================================#
# Keyboard Shortcuts (Window Management) #
#========================================#
# Move focus to another window:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move focus to another window ("cult of vim" version):
bindsym $mod+j focus down
bindsym $mod+h focus left
bindsym $mod+l focus right
bindsym $mod+k focus up
# Move the 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
# Move the the window ("cult of vim" version):
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# Hold the modifier key and hold the left/right mouse button
# to drag or resize a window respectively. This isn't exclusive
# to floating windows:
floating_modifier $mod normal
# Resizing containers:
mode "resize" {
# Resize windows with arrow keys:
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# "cult of vim" version:
bindsym h resize shrink width 10px
bindsym j resize grow height 10px
bindsym k resize shrink height 10px
bindsym l resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#=================================#
# Keyboard Shortcuts (Workspaces) #
#=================================#
# Switch to workspace
set $ws1 "1 - Communication"
set $ws2 "2 - Browsing"
set $ws3 "3 - System Administration"
set $ws4 "4 - Learn Linux TV"
set $ws5 "5 - Media"
set $ws6 "6 - Writing"
set $ws7 "7 - Homelab"
set $ws8 "8 - Home Assistant"
set $ws9 "9 - Unwind"
# Move between workspaces
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
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
# 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 $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
#=============================#
# Keyboard Shortcuts (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
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+f floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+tab focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#=================================#
# Keyboard Shortcuts (Scratchpad) #
#=================================#
# 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
#===============================#
# Keyboard Shortcuts (Hardware) #
#===============================#
# 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
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10
#=============================================#
# Keyboard Shortcuts (launching applications) #
#=============================================#
# Set up wofi to replace dmenu as the launcher of choice:
set $menu wofi --show drun -i | xargs swaymsg exec --
# Launch your browser:
bindsym $mod+shift+b exec firefox
# Open a file manager:
bindsym ctrl+$mod+f exec pcmanfm
# Open a terminal emulator:
set $term alacritty
bindsym $mod+t exec terminator
bindsym $alt+t exec termiantor
# Kill focused window:
bindsym $mod+Shift+q kill
# Open the application launcher:
bindsym $mod+space exec $menu
# Open the application launcher (alternate version):
bindsym $mod+d exec $menu
#======#
# Misc #
#======#
include /etc/sway/config-vars.d/*
include /etc/sway/config.d/*