dotfiles/i3/config

325 lines
12 KiB
Plaintext
Raw Normal View History

2017-12-06 18:30:31 +01:00
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
2017-09-20 17:23:24 +02:00
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set the mod key to the "Windows key" and the floating modifier to the mod key.
set $mod Mod4
floating_modifier $mod
############################################
# Constants #
############################################
set $workspace1 "1: "
2017-09-20 17:23:24 +02:00
set $workspace2 "2: "
set $workspace3 "3: "
set $workspace4 "4: "
set $workspace5 "5: "
set $workspace6 "6: "
set $workspace7 "7: "
2017-09-20 17:23:24 +02:00
set $workspace8 "8: "
set $workspace9 "9: "
set $workspace10 "10: "
set $workspace11 "11:  "
2022-08-16 12:42:50 +02:00
set $workspace12 "12: "
set $workspace13 "13: "
2017-09-20 17:23:24 +02:00
2019-02-20 08:51:56 +01:00
# scripts
set $tidal ~/.config/i3/scripts/tidal-cli.sh
set $vpnmanager ~/.config/i3/scripts/vpn-manager.sh
2019-02-20 08:51:56 +01:00
2017-09-20 17:23:24 +02:00
############################################
# i3 management keys #
############################################
# kill focused window
bindsym $mod+Shift+q kill
# change focus
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
# move focused workspace
bindsym $mod+Ctrl+Right move workspace to output right
bindsym $mod+Ctrl+Left move workspace to output left
2017-09-20 17:23:24 +02:00
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+shift+s layout stacking
2018-07-02 22:16:18 +02:00
bindsym $mod+shift+t layout tabbed
2017-09-20 17:23:24 +02:00
bindsym $mod+shift+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
2023-02-05 13:50:06 +01:00
set $mode_power "Exit (L)ogout, (R)eboot, (S)hutdown"
mode $mode_power {
bindsym $mod+r exec systemctl reboot
bindsym $mod+l exit
bindsym $mod+s exec systemctl poweroff
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+Delete mode $mode_power
bindsym $mod+Shift+Escape mode $mode_power
bindsym $mod+Shift+Backspace mode $mode_power
2017-09-20 17:23:24 +02:00
# focus on the parent window
2018-07-02 22:16:18 +02:00
bindsym $mod+shift+alt+p focus parent
2017-09-20 17:23:24 +02:00
# resize window (you can also use the mouse for that)
mode "resize" {
2022-05-03 18:11:25 +02:00
# These bindings trigger as soon as you enter the resize mode
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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
2017-09-20 17:23:24 +02:00
}
bindsym $mod+r mode "resize"
# Lock the computer
2023-12-10 00:02:08 +01:00
bindsym $mod+l exec /bin/bash ~/.config/i3/scripts/lock.sh
2017-09-20 17:23:24 +02:00
# Suspend the computer
2018-07-02 22:42:48 +02:00
bindsym $mod+shift+l exec /bin/bash ~/.config/i3/scripts/suspend.sh
2017-09-20 17:23:24 +02:00
############################################
# Application Keys #
############################################
2022-12-28 22:48:06 +01:00
bindsym $mod+Return exec xfce4-terminal # terminal
2023-12-10 00:02:08 +01:00
bindsym $mod+shift+Return exec xfce4-terminal --drop-down # terminal
bindsym $mod+e exec thunar # File manager
2019-02-20 08:51:56 +01:00
bindsym Print exec flameshot screen -d 0 -p ~/Pictures/Screenshots # Fullscreen screenshot
2023-12-10 00:02:08 +01:00
bindsym $mod+Print exec flameshot gui # Show screenshot window
bindsym $mod+shift+Print exec flameshot launcher # Show settings window (delay) then show screenshot window
bindsym $mod+shift+b exec /bin/bash ~/.config/i3/scripts/brightness.sh # set brightness
bindsym control+shift+Escape exec sysmontask # system monitor
bindsym $mod+BackSpace exec autorandr --change undocked # reset to laptop view
2017-09-20 17:23:24 +02:00
# Rofi
2024-06-10 00:30:56 +02:00
bindsym $mod+d exec "rofi -show drun"
bindsym $mod+Tab exec "rofi -show window"
bindsym $mod+s exec "rofi -show ssh"
2024-06-10 00:30:56 +02:00
bindsym $mod+c exec "rofi -show calc"
bindsym $mod+n exec $vpnmanager
2024-06-10 00:30:56 +02:00
bindsym $mod+colon exec "rofi -show emoji"
2022-08-03 21:41:07 +02:00
bindsym $mod+shift+v exec "rofi -modi 'clipboard:greenclip print' -show clipboard -run-command '{cmd}'"
2017-09-20 17:23:24 +02:00
############################################
# Media keys #
############################################
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym $mod+Next exec $tidal next
bindsym $mod+End exec $tidal previous
bindsym $mod+Delete exec $tidal playpause
2017-09-20 17:23:24 +02:00
############################################
# Workspaces #
############################################
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
2018-07-02 22:16:18 +02:00
bindsym $mod+w workspace $workspace11
bindsym $mod+p workspace $workspace12
2022-08-16 12:42:50 +02:00
bindsym $mod+g workspace $workspace13
2017-09-20 17:23:24 +02:00
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
2018-07-02 22:16:18 +02:00
bindsym $mod+Shift+w move container to workspace $workspace11
bindsym $mod+Shift+p move container to workspace $workspace12
2022-08-16 12:42:50 +02:00
bindsym $mod+Shift+g move container to workspace $workspace13
2018-07-02 22:16:18 +02:00
2017-09-20 17:23:24 +02:00
############################################
# Appearance settings #
############################################
# Set the default font
2022-11-05 20:27:14 +01:00
font pango:Ubuntu regular 12
2024-12-07 15:43:05 +01:00
#new_window 1pixel
2017-09-20 17:23:24 +02:00
hide_edge_borders both
2018-12-27 08:27:03 +01:00
# Window Colours
# class border bground text indicator child_border
# dark
# client.focused #1e1e1e #1e1e1e #f6f6f7 #fcc09e
# client.focused_inactive #252526 #252526 #848484 #fcc09e
# client.unfocused #252526 #252526 #848484 #fcc09e
# client.urgent #252526 #a6a6a6 #ef5350 #fcc09e
# dracula
client.focused #BD93F9 #BD93F9 #F8F8F2 #BD93F9 #BD93F9
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
2017-09-20 17:23:24 +02:00
# Floating windows
for_window [class="Pavucontrol"] floating enable
for_window [class="Lxappearance"] floating enable
for_window [class="Arandr"] floating enable
for_window [class="Eog"] floating enable
for_window [title="Tidal-hifi - settings"] floating enable
for_window [class="Sysmontask"] floating enable
for_window [class="Sysmontask"] resize set 930 665
for_window [instance="Godot_Engine"] floating enable
for_window [class="Alert"] floating enable
2017-09-20 17:23:24 +02:00
############################################
# Workspace specific tools #
# Use xprop to determine class #
############################################
2023-04-27 17:42:31 +02:00
assign [class="Bitwarden"] $workspace12 # moves all windows... including the browser popup
2018-07-02 22:16:18 +02:00
assign [class="VirtualBox Machine"] $workspace11
2017-09-26 09:55:23 +02:00
assign [class="MongoDB Compass"] $workspace8
assign [class="robo3t"] $workspace8
assign [class="Brave-browser"] $workspace9
2023-12-10 00:02:08 +01:00
assign [class="obsidian"] $workspace7
2017-09-26 09:55:23 +02:00
assign [class="Mysql-workbench-bin"] $workspace8
2022-05-03 18:11:25 +02:00
assign [class="azuredatastudio"] $workspace8
assign [class="beekeeper"] $workspace8
2017-09-20 17:23:24 +02:00
############################################
# i3-gaps #
############################################
# Disable window titlebars entirely
for_window [class="^.*"] border pixel 0
# Set inner/outer gaps
gaps inner 10
# gaps outer 0
bindsym $mod+Shift+plus gaps inner all plus 5
bindsym $mod+Shift+minus gaps inner all minus 5
bindsym $mod+Shift+Home gaps inner all set 10
2022-05-03 18:11:25 +02:00
bindsym $mod+Shift+a border normal
2022-05-03 18:11:25 +02:00
# Smart borders (draw borders around container only if it is not the only container on this workspace)
smart_borders on
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
2024-06-10 00:30:56 +02:00
# Press $mod+Shift+end to enter the gap mode. Choose o or i for modifying outer/inner gaps.
2022-05-03 18:11:25 +02:00
# Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace).
# If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
2022-08-16 12:42:50 +02:00
bindsym $mod+Shift+End mode "$mode_gaps"
mode "$mode_gaps" {
2022-05-03 18:11:25 +02:00
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
2022-05-03 18:11:25 +02:00
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
2022-05-03 18:11:25 +02:00
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
2017-09-20 17:23:24 +02:00
############################################
# Autorun #
############################################
2022-11-05 20:27:14 +01:00
# exec_always --no-startup-id picom -b
2023-03-09 10:21:15 +01:00
exec_always feh --bg-scale $(find ~/Pictures/wallpapers/ -type f -name "*" | shuf -n 1)
exec_always --no-startup-id ~/.config/polybar/launch.sh
2022-12-28 22:48:06 +01:00
exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-msg 'workspace $workspace1'
2023-04-27 17:42:31 +02:00
exec --no-startup-id i3-msg 'workspace $workspace12; exec bitwarden-desktop'
2022-05-03 18:11:25 +02:00
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
2017-09-20 17:23:24 +02:00
exec --no-startup-id nm-applet
2022-08-03 21:41:07 +02:00
exec --no-startup-id greenclip daemon
2023-12-10 00:02:08 +01:00
exec --no-startup-id seafile-applet
exec --no-startup-id obsidian
exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh
2024-12-07 15:43:05 +01:00
# don't blank the screen please :)
exec --no-startup-id xset s off && xset -dpms && xset s noblank