2019-08-26 01:42:21 +00:00
|
|
|
#########################
|
|
|
|
# i3/sway common config #
|
|
|
|
#########################
|
|
|
|
|
|
|
|
### Variables
|
|
|
|
#
|
2020-06-19 01:53:42 +00:00
|
|
|
# Logo key. Use Mod1 for Alt, Mod4 for Super
|
|
|
|
set $mod Mod1
|
2019-08-26 01:42:21 +00:00
|
|
|
# Home row direction keys, like vim
|
|
|
|
set $left h
|
|
|
|
set $down j
|
|
|
|
set $up k
|
|
|
|
set $right l
|
|
|
|
# keycodes for number keys
|
|
|
|
set $key1 10
|
|
|
|
set $key2 11
|
|
|
|
set $key3 12
|
|
|
|
set $key4 13
|
|
|
|
set $key5 14
|
|
|
|
set $key6 15
|
|
|
|
set $key7 16
|
|
|
|
set $key8 17
|
|
|
|
set $key9 18
|
|
|
|
set $key0 19
|
|
|
|
# Workspaces names. Format: "index:name"
|
|
|
|
set $ws1 "1:mail"
|
|
|
|
set $ws2 "2:web"
|
|
|
|
set $ws3 "3:3"
|
|
|
|
set $ws4 "4:4"
|
|
|
|
set $ws5 "5:5"
|
|
|
|
set $ws6 "6:6"
|
|
|
|
set $ws7 "7:7"
|
|
|
|
set $ws8 "8:8"
|
|
|
|
set $ws9 "9:9"
|
|
|
|
set $ws10 "10:10"
|
|
|
|
# Your preferred terminal emulator
|
2021-02-14 23:02:01 +00:00
|
|
|
set $term kitty --single-instance --instance-group i3
|
|
|
|
|
|
|
|
# Other utilities
|
|
|
|
set $backlightinc light -A 5
|
|
|
|
set $backlightdec light -U 5
|
|
|
|
set $volinc volcont --up
|
|
|
|
set $voldec volcont --down
|
|
|
|
set $voltog volcont --toggle
|
|
|
|
set $cliplumber cliplumber
|
|
|
|
set $mpdtoggle mpc toggle
|
|
|
|
set $mpdnext mpc next
|
|
|
|
set $mpdprev mpc prev
|
2019-08-26 01:42:21 +00:00
|
|
|
|
|
|
|
# Font for window titles and bar
|
|
|
|
font pango:Hack 8
|
|
|
|
|
|
|
|
# Remove borders
|
|
|
|
hide_edge_borders smart
|
|
|
|
# Remove window title
|
|
|
|
default_border pixel 1
|
2019-11-06 01:36:05 +00:00
|
|
|
# Default to vertical split (vim :sp)
|
2019-08-26 01:42:21 +00:00
|
|
|
|
|
|
|
# Base16 color config
|
|
|
|
include ./colorscheme
|
|
|
|
# Property Name Border BG Text Indicator Child Border
|
|
|
|
client.focused $base05 $base0D $base00 $base0D $base0D
|
|
|
|
client.focused_inactive $base01 $base01 $base05 $base03 $base01
|
|
|
|
client.unfocused $base01 $base00 $base05 $base01 $base01
|
|
|
|
client.urgent $base08 $base08 $base00 $base08 $base08
|
|
|
|
client.placeholder $base00 $base00 $base05 $base00 $base00
|
|
|
|
client.background $base07
|
|
|
|
|
|
|
|
### Key bindings
|
|
|
|
#
|
|
|
|
# Basics:
|
|
|
|
|
2019-08-27 02:47:26 +00:00
|
|
|
# exit i3/sway
|
2021-02-14 23:02:01 +00:00
|
|
|
bindsym $mod+Shift+q exec $exit
|
2019-08-26 01:42:21 +00:00
|
|
|
|
2019-08-27 02:47:26 +00:00
|
|
|
# lock session
|
2020-06-19 01:53:42 +00:00
|
|
|
bindsym Mod4+l exec $lock
|
2019-08-27 02:47:26 +00:00
|
|
|
|
|
|
|
# application launcher
|
2019-08-26 01:42:21 +00:00
|
|
|
bindsym $mod+r exec $menu
|
|
|
|
|
2019-08-27 02:47:26 +00:00
|
|
|
# start a terminal
|
|
|
|
bindsym $mod+Return exec $term
|
|
|
|
|
2019-08-26 01:42:21 +00:00
|
|
|
# call clipboard plumber
|
2021-02-14 23:02:01 +00:00
|
|
|
bindsym $mod+v exec $cliplumber
|
2019-08-26 01:42:21 +00:00
|
|
|
|
|
|
|
# volume control
|
2021-02-14 23:02:01 +00:00
|
|
|
bindsym XF86AudioRaiseVolume exec $volinc
|
|
|
|
bindsym XF86AudioLowerVolume exec $voldec
|
|
|
|
bindsym XF86AudioMute exec $voltog
|
|
|
|
|
|
|
|
# MPD control
|
|
|
|
bindsym $mod+greater exec $mpdnext
|
|
|
|
bindsym $mod+less exec $mpdprev
|
|
|
|
bindsym $mod+p exec $mpdtoggle
|
|
|
|
bindsym XF86AudioNext exec $mpdnext
|
|
|
|
bindsym XF86AudioPrev exec $mpdprev
|
|
|
|
bindsym XF86AudioPlay exec $mpdtoggle
|
|
|
|
|
|
|
|
# brightness control (using Super because MSI weirdness)
|
|
|
|
bindsym Mod4+Up exec $backlightinc
|
|
|
|
bindsym Mod4+Down exec $backlightdec
|
2019-08-26 01:42:21 +00:00
|
|
|
|
|
|
|
# reload the configuration file
|
|
|
|
bindsym $mod+Shift+r reload
|
2019-08-27 02:47:26 +00:00
|
|
|
|
|
|
|
# restart i3/sway inplace (preserves your layout/session)
|
2019-08-26 01:42:21 +00:00
|
|
|
bindsym $mod+Shift+x restart
|
2019-08-27 02:47:26 +00:00
|
|
|
|
|
|
|
# kill focused window
|
|
|
|
bindsym $mod+Shift+c kill
|
|
|
|
|
|
|
|
# mouse button for dragging.
|
|
|
|
floating_modifier $mod normal
|
2019-08-26 01:42:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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:
|
|
|
|
#
|
|
|
|
# switch to workspace
|
|
|
|
bindcode $mod+$key1 workspace $ws1
|
|
|
|
bindcode $mod+$key2 workspace $ws2
|
|
|
|
bindcode $mod+$key3 workspace $ws3
|
|
|
|
bindcode $mod+$key4 workspace $ws4
|
|
|
|
bindcode $mod+$key5 workspace $ws5
|
|
|
|
bindcode $mod+$key6 workspace $ws6
|
|
|
|
bindcode $mod+$key7 workspace $ws7
|
|
|
|
bindcode $mod+$key8 workspace $ws8
|
|
|
|
bindcode $mod+$key9 workspace $ws9
|
|
|
|
bindcode $mod+$key0 workspace $ws10
|
|
|
|
# move focused container to workspace
|
|
|
|
bindcode $mod+Shift+$key1 move container to workspace $ws1
|
|
|
|
bindcode $mod+Shift+$key2 move container to workspace $ws2
|
|
|
|
bindcode $mod+Shift+$key3 move container to workspace $ws3
|
|
|
|
bindcode $mod+Shift+$key4 move container to workspace $ws4
|
|
|
|
bindcode $mod+Shift+$key5 move container to workspace $ws5
|
|
|
|
bindcode $mod+Shift+$key6 move container to workspace $ws6
|
|
|
|
bindcode $mod+Shift+$key7 move container to workspace $ws7
|
|
|
|
bindcode $mod+Shift+$key8 move container to workspace $ws8
|
|
|
|
bindcode $mod+Shift+$key9 move container to workspace $ws9
|
|
|
|
bindcode $mod+Shift+$key0 move container to workspace $ws10
|
|
|
|
# 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+b splith
|
|
|
|
#bindsym $mod+v splitv
|
|
|
|
bindsym $mod+shift+v splith
|
|
|
|
bindsym $mod+ctrl+shift+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" {
|
|
|
|
bindsym $left resize shrink width 10px
|
|
|
|
bindsym $down resize grow height 10px
|
|
|
|
bindsym $up resize shrink height 10px
|
|
|
|
bindsym $right resize grow width 10px
|
|
|
|
# ditto, 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
|
|
|
|
|
|
|
|
# return to default mode
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
# Mnemonic: Dimension
|
|
|
|
bindsym $mod+d mode "resize"
|
|
|
|
|
|
|
|
# Fast resize
|
|
|
|
bindsym $mod+Ctrl+$left resize shrink width 5 px or 5 ppt
|
|
|
|
bindsym $mod+Ctrl+$down resize grow height 5 px or 5 ppt
|
|
|
|
bindsym $mod+Ctrl+$up resize shrink height 5 px or 5 ppt
|
|
|
|
bindsym $mod+Ctrl+$right resize grow width 5 px or 5 ppt
|
|
|
|
|
2021-02-14 23:02:01 +00:00
|
|
|
# App specific settings
|
|
|
|
for_window [class="mpv"] floating enable
|
|
|
|
|
2019-08-26 01:42:21 +00:00
|
|
|
### Status Bar
|
|
|
|
#
|
|
|
|
# Read `man 5 sway-bar` for more information about this section.
|
|
|
|
bar {
|
|
|
|
position top
|
|
|
|
|
|
|
|
# When the status_command prints a new line to stdout, swaybar updates.
|
|
|
|
# The default just shows the current date and time.
|
|
|
|
#status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
|
|
|
|
status_command i3status
|
|
|
|
|
|
|
|
# Base16 colors for the statusbar
|
|
|
|
colors {
|
|
|
|
background $base00
|
|
|
|
separator $base04
|
|
|
|
statusline $base05
|
|
|
|
|
|
|
|
# State Border BG Text
|
2019-08-27 02:47:26 +00:00
|
|
|
focused_workspace $base0D $base0D $base00
|
|
|
|
active_workspace $base03 $base03 $base00
|
|
|
|
inactive_workspace $base01 $base01 $base05
|
|
|
|
urgent_workspace $base0F $base0F $base00
|
|
|
|
binding_mode $base0A $base0A $base00
|
2019-08-26 01:42:21 +00:00
|
|
|
}
|
|
|
|
|
2019-08-27 02:47:26 +00:00
|
|
|
separator_symbol " | "
|
2019-08-26 01:42:21 +00:00
|
|
|
strip_workspace_numbers yes
|
|
|
|
}
|