dotfiles/crates/05-i3/files/config

207 lines
6 KiB
Text
Raw Normal View History

2024-03-22 10:04:21 +01:00
#######################
2023-10-14 22:38:12 +02:00
## Raine's i3 config ##
2024-03-22 10:04:21 +01:00
## Mar 22, 2023 ##
## mutation: 1m ##
2023-10-14 22:38:12 +02:00
#######################
## Mostly similar to i3's config yet differs
# Useful variables:
# This section probably gets changed a lot
# ---
set $terminal alacritty
set $screen_lock i3lock -c "#111111" --nofork
set $appmenu i3-dmenu-desktop
2023-10-14 22:38:16 +02:00
set $screenshot maim -s | xclip -selection clipboard -t image/png
2023-10-14 22:38:12 +02:00
set $font pango:monospace 8
# Startup Applications:
# Things that will startup when starting i3.
# ---
2024-03-07 14:25:45 +01:00
exec_always --no-startup-id dex --autostart --environment i3
exec_always --no-startup-id nm-applet
exec_always --no-startup-id xss-lock --transfer-sleep-lock -- $screen_lock
exec_always --no-startup-id gnome-keyring-daemon --start --components=ssh,secrets,pkcs11
exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpaper.jpg
2024-03-22 10:04:21 +01:00
exec_always --no-startup-id picom
2024-03-07 14:25:45 +01:00
# Gaps & Borders:
# ---
2024-03-22 10:04:21 +01:00
gaps inner 10
2024-03-07 14:25:45 +01:00
smart_gaps on
default_border pixel 1
hide_edge_borders smart_no_gaps
2023-10-14 22:38:12 +02:00
# Extra variables:
# Only need changing for very specific installations.
# ---
set $audio_volume_up XF86AudioRaiseVolume
set $audio_volume_down XF86AudioLowerVolume
set $audio_mute XF86AudioMute
set $audio_mute_mic XF86AudioMicMute
set $brightness_up XF86MonBrightnessUp
set $brightness_down XF86MonBrightnessDown
2023-10-14 22:38:13 +02:00
set $ws_1 "1:main"
set $ws_2 "2:term"
2024-03-07 14:25:45 +01:00
set $ws_3 "3:docs"
2023-10-14 22:38:13 +02:00
set $ws_4 "4:mail"
2023-10-14 22:38:12 +02:00
set $ws_5 "5"
set $ws_6 "6"
set $ws_7 "7"
set $ws_8 "8"
2024-03-07 14:25:45 +01:00
set $ws_9 "9:bg"
set $ws_10 "10:misc"
2023-10-14 22:38:12 +02:00
set $meta_refresh_statusbar killall -SIGUSR1 i3status
bar {
2023-10-14 22:38:13 +02:00
strip_workspace_numbers yes
2023-10-14 22:38:12 +02:00
status_command i3status
}
# END OF CONFIG
2024-03-07 14:25:45 +01:00
set $mod Mod4
set $alt Mod1
2023-10-14 22:38:12 +02:00
# Customization
2024-03-07 14:25:45 +01:00
# class border backgr. text indic. child_border
client.focused #81A1C1 #81A1C1 #ffffff #D8DEE9
client.focused_inactive #2E3440 #2E3440 #88C0D0 #454948
client.unfocused #2E3440 #2E3440 #88C0D0 #454948
client.urgent #D08770 #3B4252 #ffffff #268BD2
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #3B4252
2023-10-14 22:38:12 +02:00
# Generic
2024-03-07 14:25:45 +01:00
floating_modifier $mod
2023-10-14 22:38:12 +02:00
tiling_drag modifier titlebar
font $font
# Open a terminal
bindsym $mod+Return exec $terminal
# Kill current window
2024-03-07 14:25:45 +01:00
bindsym $mod+$alt+q kill
2023-10-14 22:38:12 +02:00
# Open app menu
2024-03-07 14:25:45 +01:00
bindsym $mod+d exec --no-startup-id $appmenu
2023-10-14 22:38:12 +02:00
# Lock screen
bindsym $mod+l exec --no-startup-id $screen_lock
# Screenshots
2024-03-22 10:04:21 +01:00
bindsym Print exec --no-startup-id $screenshot
2023-10-14 22:38:12 +02:00
# Audio
bindsym $audio_volume_up exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $meta_refresh_statusbar
bindsym $audio_volume_down exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $meta_refresh_statusbar
bindsym $audio_mute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $meta_refresh_statusbar
bindsym $audio_mute_mic exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $meta_refresh_statusbar
# Brightness
bindsym $brightness_up exec --no-startup-id brightnessctl set +5% && $meta_refresh_statusbar
bindsym $brightness_down exec --no-startup-id brightnessctl set 5%- && $meta_refresh_statusbar
# Change focused window
2024-03-07 14:25:45 +01:00
bindsym $mod+Up focus up
bindsym $mod+Down focus down
bindsym $mod+Left focus left
bindsym $mod+Right focus right
2023-10-14 22:38:12 +02:00
# Move focused window
2024-03-07 14:25:45 +01:00
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Right move right
2023-10-14 22:38:12 +02:00
# Splits
2024-03-07 14:25:45 +01:00
bindsym $mod+Shift+h split h
bindsym $mod+Shift+v split v
2023-10-14 22:38:12 +02:00
# Change container layout
2024-03-07 14:25:45 +01:00
bindsym $mod+Shift+s layout stacking
bindsym $mod+Shift+t layout tabbed
bindsym $mod+Shift+d layout toggle split
# Make current window fullscreen
bindsym $mod+Shift+f fullscreen toggle
2023-10-14 22:38:12 +02:00
# Floating stuff
2023-10-14 22:38:13 +02:00
bindsym $mod+space focus mode_toggle
2024-03-07 14:25:45 +01:00
bindsym $mod+Shift+space floating toggle
2023-10-14 22:38:12 +02:00
# Scratchpad
2024-03-07 14:25:45 +01:00
bindsym $mod+Shift+minus move scratchpad
2023-10-14 22:38:12 +02:00
bindsym $mod+minus scratchpad show
# Switch to workspace
2023-10-14 22:38:13 +02:00
bindsym $mod+1 workspace $ws_1
bindsym $mod+2 workspace $ws_2
bindsym $mod+3 workspace $ws_3
bindsym $mod+4 workspace $ws_4
bindsym $mod+5 workspace $ws_5
bindsym $mod+6 workspace $ws_6
bindsym $mod+7 workspace $ws_7
bindsym $mod+8 workspace $ws_8
bindsym $mod+9 workspace $ws_9
bindsym $mod+0 workspace $ws_10
2023-10-14 22:38:12 +02:00
# Move focused container to workspace
2023-10-14 22:38:13 +02:00
bindsym $mod+Shift+1 move container to workspace $ws_1
bindsym $mod+Shift+2 move container to workspace $ws_2
bindsym $mod+Shift+3 move container to workspace $ws_3
bindsym $mod+Shift+4 move container to workspace $ws_4
bindsym $mod+Shift+5 move container to workspace $ws_5
bindsym $mod+Shift+6 move container to workspace $ws_6
bindsym $mod+Shift+7 move container to workspace $ws_7
bindsym $mod+Shift+8 move container to workspace $ws_8
bindsym $mod+Shift+9 move container to workspace $ws_9
bindsym $mod+Shift+0 move container to workspace $ws_10
2023-10-14 22:38:12 +02:00
2024-03-07 14:25:45 +01:00
# Move through workspaces
bindsym $mod+$alt+Left workspace prev
bindsym $mod+$alt+Right workspace next
2023-10-14 22:38:12 +02:00
# WM stuff
# reload i3 config
2024-03-07 14:25:45 +01:00
bindsym $mod+$alt+c reload
2023-10-14 22:38:12 +02:00
# restart i3
2024-03-07 14:25:45 +01:00
bindsym $mod+$alt+r restart
# exit i3
2023-10-14 22:38:12 +02:00
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
# Modes
2024-03-07 14:25:45 +01:00
bindsym $mod+r mode resize
2023-10-14 22:38:12 +02:00
mode "resize" {
bindsym $nav_left resize shrink width 10 px or 10 ppt
bindsym $nav_down resize grow height 10 px or 10 ppt
bindsym $nav_up resize shrink height 10 px or 10 ppt
bindsym $nav_right resize grow width 10 px or 10 ppt
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
bindsym Return mode "default"
bindsym Escape mode "default"
2024-03-07 14:25:45 +01:00
bindsym $mod+r mode "default"
2023-10-14 22:38:12 +02:00
}
2024-03-07 14:25:45 +01:00
bindsym $mod+s mode "session"
2023-10-14 22:38:12 +02:00
mode "session" {
bindsym l exec --no-startup-id $lock, mode "default"
bindsym e exec --no-startup-id i3-msg exit, mode "default"
bindsym Shift+r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
2024-03-07 14:25:45 +01:00
bindsym $mod+s mode "default"
2023-10-14 22:38:12 +02:00
}