Files
dotfiles/i3/config.j2

372 lines
14 KiB
Plaintext
Raw Normal View History

2013-09-14 14:35:23 +02:00
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
2013-09-27 02:11:00 +02:00
################################################################################
### VARIABLES ##################################################################
################################################################################
2013-09-27 05:08:08 +02:00
# Use the win-key as modifier
set $mod Mod4
# The default terminal
2024-02-12 15:03:02 +01:00
set $terminal "alacritty --config-file ~/.config/alacritty.toml"
set $calc "alacritty --config-file ~/.config/alacritty.toml -e $SHELL -i -c calc"
2013-09-27 05:08:08 +02:00
2024-04-14 01:37:57 +02:00
set $scriptdir ~/.config/i3/scripts
2013-09-27 05:08:08 +02:00
# Keys for the exit mode
set $key_lock l
set $key_logout e
set $key_suspend s
2013-09-27 05:08:08 +02:00
set $key_hibernate h
set $key_reboot r
set $key_shutdown Shift+S
2013-09-27 05:08:08 +02:00
set $signal_lock lock
set $signal_logout logout
set $signal_suspend suspend
2013-09-27 05:08:08 +02:00
set $signal_hibernate hibernate
set $signal_reboot reboot
set $signal_shutdown shutdown
2013-09-27 05:08:08 +02:00
2018-12-28 18:19:00 +01:00
set $workspace1 "1{{ "" if machine.workspace.1 is not defined else ': ' ~ machine.workspace.1 }}"
set $workspace2 "2{{ "" if machine.workspace.2 is not defined else ': ' ~ machine.workspace.2 }}"
set $workspace3 "3{{ "" if machine.workspace.3 is not defined else ': ' ~ machine.workspace.3 }}"
set $workspace4 "4{{ "" if machine.workspace.4 is not defined else ': ' ~ machine.workspace.4 }}"
set $workspace5 "5{{ "" if machine.workspace.5 is not defined else ': ' ~ machine.workspace.5 }}"
set $workspace6 "6{{ "" if machine.workspace.6 is not defined else ': ' ~ machine.workspace.6 }}"
set $workspace7 "7{{ "" if machine.workspace.7 is not defined else ': ' ~ machine.workspace.7 }}"
set $workspace8 "8{{ "" if machine.workspace.8 is not defined else ': ' ~ machine.workspace.8 }}"
set $workspace9 "9{{ "" if machine.workspace.9 is not defined else ': ' ~ machine.workspace.9 }}"
set $workspace10 "10{{ "" if machine.workspace.10 is not defined else ': ' ~ machine.workspace.10 }}"
2013-09-27 02:11:00 +02:00
set $key_workspace1 1
set $key_workspace2 2
set $key_workspace3 3
set $key_workspace4 4
set $key_workspace5 5
set $key_workspace6 6
set $key_workspace7 7
set $key_workspace8 8
set $key_workspace9 9
set $key_workspace10 0
set $left h
set $down j
set $up k
set $right l
2015-11-01 01:37:32 +01:00
set $splith v
set $splitv c
2014-04-22 22:14:06 +02:00
set $split_toggle x
set $fullscreen f
set $layout_stacking s
set $layout_tabbed w
set $layout_default e
set $focus_parent q
set $focus_child a
2021-09-25 19:06:46 +02:00
set $floating_toggle Shift+p
set $focus_mode_toggle p
set $prev_on_output u
set $next_on_output i
2014-04-22 22:14:06 +02:00
set $workspace_back_and_forth asciicircum
2018-08-16 07:25:12 +02:00
set $pim_toggle Tab
set $reload Shift+C
set $restart Shift+R
set $exit Shift+E
set $kill Shift+Q
2021-10-02 10:55:01 +02:00
set $screenshot o
2021-02-09 20:45:51 +01:00
2017-09-01 09:53:09 +02:00
################################################################################
### WORKSPACE ASSIGNMENTS ######################################################
################################################################################
2018-08-20 09:06:42 +02:00
workspace $workspace1 output {{ machine.screen.1 }}
workspace $workspace2 output {{ machine.screen.2 }}
workspace $workspace3 output {{ machine.screen.3 }}
workspace $workspace4 output {{ machine.screen.4 }}
workspace $workspace5 output {{ machine.screen.5 }}
workspace $workspace6 output {{ machine.screen.6 }}
workspace $workspace7 output {{ machine.screen.7 }}
workspace $workspace8 output {{ machine.screen.8 }}
workspace $workspace9 output {{ machine.screen.9 }}
workspace $workspace10 output {{ machine.screen.0 }}
2017-09-01 09:53:09 +02:00
2021-01-06 00:34:46 +01:00
2017-09-01 09:53:09 +02:00
assign [class="^Keepassx$"] $workspace8
2021-01-06 00:34:46 +01:00
# See https://github.com/i3/i3/issues/2060
2022-12-15 21:56:52 +01:00
for_window [class="^Spotify$"] move to workspace $workspace10
assign [class="^Spotify$"] $workspace10
2021-01-06 00:34:46 +01:00
2020-12-08 22:29:38 +01:00
assign [class="^Google-chrome$"] $workspace7
2021-01-06 00:34:46 +01:00
assign [class="^Chromium$"] $workspace7
assign [class="^Steam"] $workspace5
2021-01-31 16:08:42 +01:00
for_window [class="^Steam$"] move to workspace $workspace5
2017-09-01 09:53:09 +02:00
2021-01-13 23:57:50 +01:00
assign [class="^dota2$"] $workspace10
assign [class="^Wine$"] $workspace10
2013-09-27 02:11:00 +02:00
################################################################################
### KEYBINDINGS ################################################################
2013-09-27 05:08:08 +02:00
##################9#############################################################
2013-09-27 02:11:00 +02:00
### MOVING AND WINDOW BEHAVIOUR ############################################
bindsym $mod+$kill kill
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
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
bindsym $mod+$splith split h
bindsym $mod+$splitv split v
bindsym $mod+$fullscreen fullscreen
bindsym $mod+$layout_stacking layout stacking
bindsym $mod+$layout_tabbed layout tabbed
bindsym $mod+$layout_default layout default
2014-04-22 22:14:06 +02:00
bindsym $mod+$split_toggle layout toggle split
bindsym $mod+$floating_toggle floating toggle
bindsym $mod+$focus_mode_toggle focus mode_toggle
bindsym $mod+$focus_parent focus parent
bindsym $mod+$focus_child focus child
bindsym $mod+$key_workspace1 workspace $workspace1
bindsym $mod+$key_workspace2 workspace $workspace2
bindsym $mod+$key_workspace3 workspace $workspace3
bindsym $mod+$key_workspace4 workspace $workspace4
bindsym $mod+$key_workspace5 workspace $workspace5
bindsym $mod+$key_workspace6 workspace $workspace6
bindsym $mod+$key_workspace7 workspace $workspace7
bindsym $mod+$key_workspace8 workspace $workspace8
bindsym $mod+$key_workspace9 workspace $workspace9
bindsym $mod+$key_workspace10 workspace $workspace10
bindsym $mod+Shift+$key_workspace1 move container to workspace $workspace1
bindsym $mod+Shift+$key_workspace2 move container to workspace $workspace2
bindsym $mod+Shift+$key_workspace3 move container to workspace $workspace3
bindsym $mod+Shift+$key_workspace4 move container to workspace $workspace4
bindsym $mod+Shift+$key_workspace5 move container to workspace $workspace5
bindsym $mod+Shift+$key_workspace6 move container to workspace $workspace6
bindsym $mod+Shift+$key_workspace7 move container to workspace $workspace7
bindsym $mod+Shift+$key_workspace8 move container to workspace $workspace8
bindsym $mod+Shift+$key_workspace9 move container to workspace $workspace9
bindsym $mod+Shift+$key_workspace10 move container to workspace $workspace10
bindsym $mod+$prev_on_output workspace prev_on_output
bindsym $mod+$next_on_output workspace next_on_output
2014-04-22 22:14:06 +02:00
bindsym $mod+$workspace_back_and_forth workspace back_and_forth
bindsym $mod+Shift+$prev_on_output move container to workspace prev_on_output
bindsym $mod+Shift+$next_on_output move container to workspace next_on_output
2013-09-27 02:11:00 +02:00
2015-11-10 01:09:16 +01:00
bindsym $mod+$reload reload
bindsym $mod+$restart restart
bindsym $mod+$exit exit
2013-09-27 02:11:00 +02:00
### START APPLICATIONS #####################################################
2024-04-14 01:37:57 +02:00
bindsym $mod+d exec --no-startup-id $scriptdir/appmenu
2013-09-27 02:11:00 +02:00
bindsym $mod+Return exec $terminal
2018-08-12 14:31:14 +02:00
bindsym $mod+Shift+Return exec $calc
2013-09-27 02:11:00 +02:00
2024-04-14 01:37:57 +02:00
bindsym F1 exec --no-startup-id $scriptdir/shutdown-menu
bindsym F2 exec --no-startup-id $scriptdir/screenmenu
2018-08-10 17:23:37 +02:00
2024-04-14 01:37:57 +02:00
bindsym $mod+F1 exec --no-startup-id $scriptdir/i3exit lock
bindsym $mod+F4 exec --no-startup-id $scriptdir/i3exit suspend
bindsym $mod+Home exec --no-startup-id $scriptdir/shutdown-menu
2014-08-17 23:34:02 +02:00
2021-02-09 20:45:51 +01:00
bindsym $mod+$screenshot exec --no-startup-id sh -c 'maim | xclip -selection clipboard -t image/png'
bindsym $mod+Shift+$screenshot exec --no-startup-id sh -c 'maim --select | xclip -selection clipboard -t image/png'
2016-04-23 20:09:24 +02:00
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
2024-04-14 01:37:57 +02:00
bindsym $mod+$pim_toggle exec --no-startup-id $scriptdir/swap-from-workspace $workspace10
2018-01-29 11:33:48 +01:00
2013-09-27 02:11:00 +02:00
################################################################################
### MODES ######################################################################
################################################################################
# resize window (you can also use the mouse for that)
mode "resize" {
2015-11-08 18:28:34 +01:00
bindsym $left resize shrink width 5 px or 5 ppt
bindsym $down resize grow height 5 px or 5 ppt
2015-09-25 16:25:48 +02:00
bindsym $up resize shrink height 5 px or 5 ppt
2015-11-08 18:28:34 +01:00
bindsym $right resize grow width 5 px or 5 ppt
2013-09-27 02:11:00 +02:00
2015-11-08 18:28:34 +01:00
bindsym 113 resize shrink width 5 px or 5 ppt
bindsym 116 resize grow height 5 px or 5 ppt
2015-09-25 16:25:48 +02:00
bindsym 111 resize shrink height 5 px or 5 ppt
2015-11-08 18:28:34 +01:00
bindsym 114 resize grow width 5 px or 5 ppt
2013-09-27 02:11:00 +02:00
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
################################################################################
### GENERAL SETUP ##############################################################
################################################################################
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# Default orientation for new workspaces will be derived from aspect ratio
default_orientation auto
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# New containers will start in tiling mode
workspace_layout default
2013-09-14 14:35:23 +02:00
2014-06-14 00:26:03 +02:00
new_window 1pixel
new_float normal 1
2020-04-01 10:15:02 +02:00
# default_border pixel 1
# default_floating_border normal
hide_edge_borders smart
2013-09-14 14:35:23 +02:00
2015-09-25 16:25:48 +02:00
focus_follows_mouse yes
2020-12-08 22:30:18 +01:00
mouse_warping output
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# Only map a popup in fullscreen mode if it belongs to the fullscreen window
# <smart|ignore|leave_fullscreen>
popup_during_fullscreen leave_fullscreen
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# Do not always wrap but change to a container on the same level instead
2020-12-08 22:30:18 +01:00
force_focus_wrapping yes
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
force_xinerama no
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# Hit the current workspace button again to return to the previous workspace
workspace_auto_back_and_forth yes
2013-09-14 14:35:23 +02:00
2013-09-27 02:11:00 +02:00
# Draw a window as urgent when switching to its workspace, even if focused, for
# 500 ms
force_display_urgency_hint 500 ms
2013-09-14 14:35:23 +02:00
2020-12-08 22:30:18 +01:00
show_marks yes
2013-09-27 02:11:00 +02:00
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
2013-09-14 14:35:23 +02:00
2014-04-22 22:14:06 +02:00
floating_minimum_size 0 x 0
floating_maximum_size 0 x 0
font pango:Inconsolata {{ machine.font_size_1 }}
2015-11-10 01:09:16 +01:00
2014-04-19 04:25:49 +02:00
################################################################################
### COLOR SETTINGS #############################################################
################################################################################
# class border backgr. text indicator
client.focused #e5b567 #e5b567 #000000 #FF0000
2022-06-30 21:29:42 +02:00
client.focused_inactive #272822 #5f676a #ffffff #484e50
client.unfocused #1C1C1C #272822 #cccccc #292d2e
2022-07-05 22:27:10 +02:00
client.urgent #272822 #ff7777 #000000 #900000
2014-04-19 04:25:49 +02:00
2013-09-27 02:11:00 +02:00
################################################################################
### APPLICATION SPECIFIC SETTINGS ##############################################
################################################################################
2013-09-14 14:35:23 +02:00
bindsym $mod+F6 exec --no-startup-id mumble
bindsym $mod+F7 exec --no-startup-id clementine
bindsym $mod+F8 exec --no-startup-id quasselclient
bindsym $mod+F9 exec --no-startup-id evolution
2015-11-10 01:09:16 +01:00
################################################################################
### SPECIAL KEYBINDS ###########################################################
################################################################################
bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend
2022-12-16 19:34:06 +01:00
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute '@DEFAULT_SINK@' toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume '@DEFAULT_SINK@' +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume '@DEFAULT_SINK@' -5%
2017-09-09 14:00:35 +02:00
2022-12-16 19:34:06 +01:00
bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl -p spotify next
bindsym XF86AudioPrev exec --no-startup-id playerctl -p spotify previous
2015-11-10 01:09:16 +01:00
2015-09-25 16:25:48 +02:00
# keys seemingly switched
2018-02-08 21:41:15 +01:00
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 8 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 8 ; exec --no-startup-id $scriptdir/update-status
2015-09-25 16:25:48 +02:00
2024-04-20 11:39:55 +02:00
bindsym $mod+m exec --no-startup-id pactl set-source-mute '@DEFAULT_SOURCE@' toggle
2022-12-16 19:34:06 +01:00
bindsym $mod+space exec --no-startup-id pactl set-source-mute '@DEFAULT_SOURCE@' toggle
2024-04-20 11:39:55 +02:00
bindsym KP_Enter exec --no-startup-id pactl set-source-mute '@DEFAULT_SOURCE@' toggle
2017-09-01 09:53:09 +02:00
2020-12-20 20:37:13 +01:00
##############################################################################
2015-11-10 01:09:16 +01:00
### BARS #######################################################################
################################################################################
2022-12-15 22:31:50 +01:00
2015-09-25 16:25:48 +02:00
bar {
mode dock
2019-12-18 10:10:03 +01:00
position bottom
2015-09-25 16:25:48 +02:00
2020-04-01 10:15:27 +02:00
tray_padding 2
2015-11-17 19:51:11 +01:00
strip_workspace_numbers no
binding_mode_indicator yes
2015-09-25 16:25:48 +02:00
workspace_buttons yes
id bar-0
font pango:Inconsolata, FontAwesome {{ machine.font_size_1 }}
2015-09-25 16:25:48 +02:00
colors {
2022-12-15 19:45:04 +01:00
background #272822
2015-09-25 16:25:48 +02:00
statusline #ffffff
2022-06-30 06:38:05 +02:00
separator #555555
2015-09-25 16:25:48 +02:00
focused_separator #e5b567
focused_background #272822
2020-04-01 10:15:27 +02:00
2022-07-05 22:27:10 +02:00
# border bg text
focused_workspace #e5b567 #4f676a #ffffff
active_workspace #272822 #4f676a #ffffff
2022-06-30 21:29:42 +02:00
inactive_workspace #272822 #272822 #dddddd
2022-07-05 22:27:10 +02:00
urgent_workspace #272822 #ff7777 #272822
2022-06-30 21:29:42 +02:00
binding_mode #272822 #e5b567 #272822
2015-09-25 16:25:48 +02:00
}
status_command i3status-rs ~/.config/i3status-rust/config.toml
2015-09-25 16:25:48 +02:00
}