318 lines
10 KiB
Plaintext
318 lines
10 KiB
Plaintext
### Variables
|
|
#
|
|
# Logo key. Use Mod1 for Alt.
|
|
set $mod Mod4
|
|
# Home row direction keys, like vim
|
|
set $left h
|
|
set $down j
|
|
set $up k
|
|
set $right l
|
|
# Your preferred terminal emulator
|
|
set $term terminator
|
|
# Your preferred application launcher
|
|
set $menu rofi -show run
|
|
set $window_list rofi -show window
|
|
set $browser firefox
|
|
set $chromium_work chromium --profile-directory="Work"
|
|
set $chromium_personal chromium --profile-directory="DetangleRegular"
|
|
set $chromium_isolated chromium --profile-directory="DetangleIsolated"
|
|
set $chromium_anon chromium --profile-directory="Anon"
|
|
set $mua thunderbird
|
|
set $kitty_term kitty
|
|
set $alacritty_term env WINIT_UNIX_BACKEND=x11 alacritty
|
|
set $files nautilus
|
|
set $lock swaylock -F -i ~/Pictures/screensaver.jpg
|
|
set $chbg ~/.bin/change-bg.sh
|
|
|
|
### Output configuration
|
|
#
|
|
# Font
|
|
font pango:FiraCode 10
|
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
|
#output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
|
#output * bg /home/leo/Pictures/Wallpapers/Builtin.png fill
|
|
set $laptop eDP-1
|
|
bindswitch --locked lid:on output $laptop disable
|
|
bindswitch --locked lid:off output $laptop enable
|
|
|
|
output eDP-1 {
|
|
resolution 1920x1080
|
|
bg /home/leo/Pictures/random.jpg fill "#0022FF"
|
|
#position 960,1080
|
|
}
|
|
output HDMI-A-2 {
|
|
resolution 1920x1080
|
|
bg /home/leo/Pictures/random.jpg fill "#0022FF"
|
|
}
|
|
for_window [app_id="^.*"] border pixel 2
|
|
for_window [class="^.*"] border pixel 2
|
|
gaps inner 5
|
|
# class border backgr. text indicator child_border
|
|
client.focused #f5e942 #00bf16 #ffffff #f5e942 #f5e942
|
|
client.focused_inactive #5c6370 #3b3228 #ffffff #5c6370 #5c6370
|
|
client.unfocused #5c6370 #3b3228 #ffffff #5c6370 #5c6370
|
|
# Double external screen configuration
|
|
#output HDMI-A-2 {
|
|
# resolution 1920x1200
|
|
# position 1920,0
|
|
# bg /home/leo/Pictures/wallpapers/portal_r.jpg fill "#FF2200"
|
|
#}
|
|
#output DP-1 {
|
|
# resolution 1920x1200
|
|
# position 0,0
|
|
# bg /home/leo/Pictures/wallpapers/portal_l.jpg fill "#FF2200"
|
|
#}
|
|
|
|
#output eDP-1 mode 1920x1200 pos 0,0 bg /home/leo/Pictures/Wallpapers/Builtin.png fill
|
|
#output HDM1-A-1 bg /home/leo/Pictures/Wallpapers/Up.png fill
|
|
#
|
|
# 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
|
|
|
|
### Input configuration
|
|
#
|
|
# Example configuration:
|
|
#
|
|
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
|
# dwt enabled
|
|
# tap enabled
|
|
# natural_scroll enabled
|
|
# middle_emulation enabled
|
|
# }
|
|
#
|
|
#
|
|
input "2:7:SynPS/2_Synaptics_TouchPad" {
|
|
dwt enabled
|
|
tap enabled
|
|
natural_scroll enabled
|
|
middle_emulation enabled
|
|
}
|
|
|
|
|
|
input "1452:782:Apple_Wireless_Trackpad" {
|
|
dwt enabled
|
|
tap enabled
|
|
natural_scroll enabled
|
|
middle_emulation enabled
|
|
}
|
|
input * xkb_layout "it,us"
|
|
input "Dell Keyboard" xkb_model "dell"
|
|
input "Logitech Keyboard" xkb_model "logitech_base"
|
|
# 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
|
|
#
|
|
# Basics:
|
|
#
|
|
# start a terminal
|
|
bindsym $mod+Return exec $term
|
|
|
|
# kill focused window
|
|
bindsym $mod+Shift+q kill
|
|
|
|
# start your launcher
|
|
bindsym $mod+d exec $menu
|
|
bindsym $mod+p exec passmenu
|
|
bindsym $mod+backslash exec $window_list
|
|
bindsym $mod+Shift+Mod1+m exec btmenu
|
|
bindsym $mod+b exec $browser
|
|
bindsym $mod+Mod1+b exec $chromium_work
|
|
bindsym $mod+Mod1+Shift+b exec $chromium_personal
|
|
bindsym $mod+Mod1+i exec $chromium_isolated
|
|
bindsym $mod+Mod1+Shift+i exec $chromium_anon
|
|
bindsym $mod+m exec $mua
|
|
bindsym $mod+Mod1+f exec $files
|
|
bindsym $mod+Shift+t exec $kitty_term
|
|
bindsym $mod+Mod1+t exec $alacritty_term
|
|
bindsym $mod+Mod1+l exec $lock
|
|
bindsym $mod+Shift+b exec $chbg
|
|
|
|
bindsym XF86AudioRaiseVolume exec /home/leo/.bin/volume.sh +
|
|
bindsym XF86AudioLowerVolume exec /home/leo/.bin/volume.sh -
|
|
bindsym XF86AudioMute exec /home/leo/.bin/volume.sh m
|
|
# bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
|
# bindsym XF86AudioRaiseVolume exec volumectl raise
|
|
# bindsym XF86AudioLowerVolume exec volumectl lower
|
|
# bindsym XF86AudioMute exec volumectl mute
|
|
# bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
|
|
# bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
|
|
# bindsym XF86AudioMute exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi"
|
|
|
|
# bindsym XF86MonBrightnessUp exec light -A 5
|
|
# bindsym XF86MonBrightnessDown exec light -U 5
|
|
# bindsym XF86MonBrightnessUp exec lightctl raise
|
|
# bindsym XF86MonBrightnessDown exec lightctl lower
|
|
|
|
for_window [title="avizo"] border pixel 0
|
|
for_window [title="avizo"] sticky toggle
|
|
no_focus [title="avizo"]
|
|
|
|
bindsym Mod1+Shift+s exec ~/.bin/screenshot.sh
|
|
bindsym Print exec ~/.bin/screenshot.sh
|
|
bindsym Ctrl+Print exec ~/.bin/screenshot.sh -s
|
|
bindsym $mod+Ctrl+p exec mpc toggle
|
|
bindsym $mod+Ctrl+c exec mpc clear
|
|
|
|
# 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 exit
|
|
#
|
|
# Moving around:
|
|
#
|
|
# 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
|
|
#
|
|
# Workspaces:
|
|
#
|
|
workspace back_and_forth yes
|
|
#bindsym $mod+tab workspace back_and_forth
|
|
bindsym $mod+tab workspace next_on_output
|
|
bindsym $mod+Shift+tab workspace prev_on_output
|
|
|
|
# switch to workspace
|
|
bindsym $mod+1 workspace 1
|
|
bindsym $mod+2 workspace 2
|
|
bindsym $mod+3 workspace 3
|
|
bindsym $mod+4 workspace 4
|
|
bindsym $mod+5 workspace 5
|
|
bindsym $mod+6 workspace 6
|
|
bindsym $mod+7 workspace 7
|
|
bindsym $mod+8 workspace 8
|
|
bindsym $mod+9 workspace 9
|
|
bindsym $mod+0 workspace 10
|
|
# move focused container to workspace
|
|
bindsym $mod+Shift+1 move container to workspace 1
|
|
bindsym $mod+Shift+2 move container to workspace 2
|
|
bindsym $mod+Shift+3 move container to workspace 3
|
|
bindsym $mod+Shift+4 move container to workspace 4
|
|
bindsym $mod+Shift+5 move container to workspace 5
|
|
bindsym $mod+Shift+6 move container to workspace 6
|
|
bindsym $mod+Shift+7 move container to workspace 7
|
|
bindsym $mod+Shift+8 move container to workspace 8
|
|
bindsym $mod+Shift+9 move container to workspace 9
|
|
bindsym $mod+Shift+0 move container to workspace 10
|
|
# Note: workspaces can have any name you want, not just numbers.
|
|
# We just use 1-10 as the default.
|
|
#
|
|
# Layout stuff:
|
|
#
|
|
# You can "split" the current object of your focus with
|
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
# respectively.
|
|
bindsym $mod+h 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
|
|
#
|
|
# 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
|
|
#
|
|
# Resizing containers:
|
|
#
|
|
mode "resize" {
|
|
# left will shrink the containers width
|
|
# right will grow the containers width
|
|
# up will shrink the containers height
|
|
# down will grow the containers height
|
|
bindsym $left resize shrink width 10 px or 10 ppt
|
|
bindsym $down resize grow height 10 px or 10 ppt
|
|
bindsym $up resize shrink height 10 px or 10 ppt
|
|
bindsym $right resize grow width 10 px or 10 ppt
|
|
|
|
# ditto, with arrow keys
|
|
bindsym Left resize shrink width 10 px or 10 ppt
|
|
bindsym Down resize grow height 10 px or 10 ppt
|
|
bindsym Up resize shrink height 10 px or 10 ppt
|
|
bindsym Right resize grow width 10 px or 10 ppt
|
|
|
|
# return to default mode
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
}
|
|
bindsym $mod+r mode "resize"
|
|
|
|
default_border none
|
|
|
|
#
|
|
# Status Bar:
|
|
#
|
|
# Read `man 5 sway-bar` for more information about this section.
|
|
# bar {
|
|
# position top
|
|
# colors {
|
|
# statusline #ffffff
|
|
# background #323232
|
|
# inactive_workspace #32323200 #32323200 #5c5c5c
|
|
# }
|
|
# }
|
|
|
|
# bar {
|
|
# status_command py3status --wm sway -c ~/.config/py3status/config -l ~/.log/py3status.log -b
|
|
# font pango:FiraCode 10
|
|
# }
|
|
|
|
# bar {
|
|
# status_command python3 /usr/lib/python3.8/site-packages/powerline/bindings/i3/powerline-i3.py
|
|
# font pango:FiraCode 10
|
|
# }
|
|
|
|
include /etc/sway/config.d/*
|