summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-15 21:56:23 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-15 21:56:23 +0200
commitf10997702155c0469ac0a4dd7296e1a5614dc669 (patch)
treec755d8edfe9df5570efa9c72eb7f5a8e72568bd9
parent0d025b4e59100b9ac37ecdf5f5317c9d599c2c16 (diff)
downloaddotfiles-f10997702155c0469ac0a4dd7296e1a5614dc669.tar.gz
dotfiles-f10997702155c0469ac0a4dd7296e1a5614dc669.zip
i3wm: refactor + add startup tools
-rw-r--r--i3wm.conf302
1 files changed, 161 insertions, 141 deletions
diff --git a/i3wm.conf b/i3wm.conf
index f8e6ea2..3f2e32b 100644
--- a/i3wm.conf
+++ b/i3wm.conf
@@ -1,44 +1,62 @@
# dotfiles -- i3config
# author: johannst
-# helpful cmdline tools:
-# * xev
-# * xmodmap
+# Helpful cmdline tools.
+# * xev -> shows key / mouse events
+# * xmodmap -> shows which Mod(ifier) maps to which key
+# * xmodmap -pke -> list current keycode - keysym
+# * xprop -> get class names for applications
+#
+# For xft fonts.
+# * fc-list -> list xft fonts
+# * fc-match "<pattern>" -> test which font <pattern> matches, eg
+# fc-match 'MesloLGS NF:style=Italic'
+
+# -- GLOBAL CONFIG -------------------------------------------------------------
-# alt key
+# ALT key.
#set $mod Mod1
-# super key
+# SUPER key.
set $mod Mod4
-#set $my_font xos4 Terminus
-#set $my_font Noto Sans Mono
-set $my_font Font Awesome 5 Brands Regular
+# Use xcore fonts.
+font 6x13
-font pango:$my_font 10
+# Use xft fonts, format (family list separated by ','):
+# font pango:<family list> [<style options>] <size>
+#font pango:MesloLGS NF Regular 8
-# $mod+mouse to move/rezie window in floating mode
+# Use
+# * $mod+mouse_L to move window in floating mode.
+# * $mod+mouse_R to resize window in floating mode.
floating_modifier $mod
-#
-# Basic Key Bindings
-#
+# Default border settings.
+default_border pixel 1
+default_floating_border normal
+hide_edge_borders smart
+
+# -- BASIC KEY BINDINGS --------------------------------------------------------
bindsym $mod+Shift+c kill
bindsym $mod+Shift+s reload
bindsym $mod+Shift+r restart
-bindsym $mod+Shift+e exec "i3-nagbar -f '$my_font' -t warning -m 'Kill X-Sessions' -b 'Kill!' 'i3-msg exit'"
-bindsym $mod+Return exec i3-sensible-terminal
-# demnu
-#bindsym $mod+d exec "dmenu_run -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'"
-#bindsym $mod+p exec "passmenu -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'"
-# rofi
-bindsym $mod+d exec "rofi -show drun"
-bindsym $mod+p exec "rofi -show pass"
-bindsym $mod+Tab exec "rofi -show window"
+bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Kill X-Sessions' -b 'Kill!' 'i3-msg exit'
+# Toggle between dock mode and hide mode.
+bindsym $mod+m bar mode toggle
-#
-# Layout Key Bindings
-#
+# -- SCRATCHPAD KEY BINDINGS ---------------------------------------------------
+
+bindsym $mod+Shift+minus move scratchpad
+bindsym $mod+minus scratchpad show
+
+# -- BORDER KEY BINDINGS -------------------------------------------------------
+
+bindsym $mod+n border none
+bindsym $mod+Shift+n border pixel 1
+bindsym $mod+b border normal
+
+# -- LAYOUT KEY BINDINGS -------------------------------------------------------
bindsym $mod+q layout stacking
bindsym $mod+w layout tabbed
@@ -49,9 +67,7 @@ bindsym $mod+s split v
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
-#
-# Focus Key Bindings
-#
+# -- FOCUS KEY BINDINGS --------------------------------------------------------
bindsym $mod+h focus left
bindsym $mod+j focus down
@@ -63,9 +79,7 @@ bindsym $mod+a focus parent
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
-#
-# Navigation Key Bindings
-#
+# -- NAVIGATION KEY BINDINGS ---------------------------------------------------
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
@@ -78,9 +92,7 @@ bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
-#
-# Move Container Key Bindings
-#
+# -- MOVE CONTAINER KEY BINDINGS -----------------------------------------------
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
@@ -98,70 +110,41 @@ 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
-#
-# Resize Mode
-#
+# -- RESIZE MODE ---------------------------------------------------------------
-# arrow f047
-set $resize_mode (r)
-bindsym $mod+r mode $resize_mode
+bindsym $mod+r mode "resize"
-# bindings for resize mode
-mode "$resize_mode" {
- bindsym h resize shrink width 10 px or 10 ppt
- bindsym j resize grow height 10 px or 10 ppt
- bindsym k resize shrink height 10 px or 10 ppt
- bindsym l resize grow width 10 px or 10 ppt
+mode "resize" {
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
- # back to normal: Enter or Escape
- bindsym Return mode "default"
- bindsym Escape mode "default"
+ # Back to normal mode.
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
}
-#
-# i3lock
-#
-
-#set $lock_cmd i3lock --inactivity-timeout 30s -d --ignore-empty-password -c 455a64 -i ~/.i3/lock.png
-set $lock_cmd i3lock \
- --ignore-empty-password \
- -B=100 \
- --indicator \
- --indpos="100:800" \
- --radius 30 \
- --insidecolor=00000000 \
- --insidevercolor=00000000 \
- --insidewrongcolor=00000000 \
- --ringcolor=ffffff80 \
- --ringvercolor=fffffff0 \
- --ringwrongcolor=ff0000ff \
- --veriftext="" \
- --wrongtext="" \
- --keyhlcolor=00ff0080 \
- --bshlcolor=ff000080
-
-bindsym $mod+Control+l exec $lock_cmd
+# -- POWER MODE ----------------------------------------------------------------
-#
-# Power Mode
-#
-
-# lock f023
-# moon f186
-set $power_mode  (l)  (s)
bindsym $mod+Home mode "$power_mode"
+set $power_mode (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot (Shift+s)shutdown
mode "$power_mode" {
- bindsym l exec $lock_cmd, mode "default"
- bindsym s exec $lock_cmd && systemctl suspend, mode "default"
-
- bindsym Escape mode "default"
- bindsym Return mode "default"
+ bindsym l exec --no-startup-id i3exit lock, mode "default"
+ bindsym s exec --no-startup-id i3exit suspend, mode "default"
+ bindsym u exec --no-startup-id i3exit switch_user, mode "default"
+ bindsym e exec --no-startup-id i3exit logout, mode "default"
+ bindsym h exec --no-startup-id i3exit hibernate, mode "default"
+ bindsym r exec --no-startup-id i3exit reboot, mode "default"
+ bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
+
+ # Back to normal mode.
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
}
-#
-# Color Definition
-#
+# -- COLORS --------------------------------------------------------------------
set $col_x_bla #000000
set $col_x_whi #FFFFFF
@@ -173,72 +156,109 @@ set $col_b_blu #2E9EF4
set $col_d_ora #ff8700
set $col_d_tur #458588
-#
-# Colorscheme
-#
-
-# turn off window titles
-# makes title-{border, body} not viewable
-for_window [class="^.*"] border pixel 2
+# -- WM COLORSCHEME ------------------------------------------------------------
# class title-border title-body title-text split-indicator window-border
-client.focused $col_b_gra $col_b_gra $col_x_whi $col_b_blu $col_b_gra
-client.focused_inactive $col_d_gra $col_d_gra $col_x_whi $col_b_blu $col_d_gra
-client.unfocused $col_d_gra $col_d_gra $col_m_gra $col_b_blu $col_d_gra
-client.urgent $col_d_gra $col_d_red $col_x_whi $col_d_red $col_d_red
-client.placeholder $col_x_bla $col_x_bla $col_x_whi $col_x_bla $col_x_bla
+#client.focused $col_b_gra $col_b_gra $col_x_whi $col_b_blu $col_b_gra
+#client.focused_inactive $col_d_gra $col_d_gra $col_x_whi $col_b_blu $col_d_gra
+#client.unfocused $col_d_gra $col_d_gra $col_m_gra $col_b_blu $col_d_gra
+#client.urgent $col_d_gra $col_d_red $col_x_whi $col_d_red $col_d_red
+#client.placeholder $col_x_bla $col_x_bla $col_x_whi $col_x_bla $col_x_bla
+#
+#client.background $col_x_whi
-client.background $col_x_whi
+# Manjaro colorscheme.
+client.focused #556064 #556064 #80FFF9 #FDF6E3
+client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
+client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
+client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
+client.placeholder #000000 #0c0c0c #ffffff #000000
-#
-# i3bar
-#
+client.background #2B2C2B
+
+# -- STATUS BAR ----------------------------------------------------------------
bar {
- font pango: $my_font 10
- position top
- height 22
- status_command i3blocks -c ~/.config/i3/i3blocks.conf
- #status_command i3status --config ~/.config/i3/i3status.conf
-
- colors {
- background $col_x_bla
- statusline $col_x_whi
- #separator $col_m_gra
-
- # class border background text
- focused_workspace $col_x_bla $col_d_ora $col_x_whi
- active_workspace $col_x_bla $col_x_bla $col_x_whi
- inactive_workspace $col_x_bla $col_x_bla $col_m_gra
- urgent_workspace $col_d_red $col_d_red $col_x_whi
- binding_mode $col_d_tur $col_d_tur $col_x_whi
- }
+ # Dock position: top, bottom.
+ position bottom
+ #status_command i3blocks -c ~/.config/i3/i3blocks.conf
+ #status_command i3status --config ~/.config/i3/i3status.conf
+ status_command i3status
+
+ colors {
+ #background $col_x_bla
+ #statusline $col_x_whi
+ #separator $col_m_gra
+
+ # class border background text
+ #focused_workspace $col_x_bla $col_d_ora $col_x_whi
+ #active_workspace $col_x_bla $col_x_bla $col_x_whi
+ #inactive_workspace $col_x_bla $col_x_bla $col_m_gra
+ #urgent_workspace $col_d_red $col_d_red $col_x_whi
+ #binding_mode $col_d_tur $col_d_tur $col_x_whi
+
+ # Manjaro colorscheme.
+ background #222D31
+ statusline #F9FAF9
+ separator #454947
+
+ focused_workspace #F9FAF9 #16a085 #292F34
+ active_workspace #595B5B #353836 #FDF6E3
+ inactive_workspace #595B5B #222D31 #EEE8D5
+ binding_mode #16a085 #2C2C2C #F9FAF9
+ urgent_workspace #16a085 #FDF6E3 #E5201D
+ }
}
-#
-# Function Keys
-#
+# -- FN KEYS -------------------------------------------------------------------
-# Alsamixer controls
-# bindsym XF86AudioRaiseVolume exec "amixer set Master 5%+"
-# bindsym XF86AudioLowerVolume exec "amixer set Master 5%-"
-# bindsym XF86AudioMute exec "amixer set Master toggle"
-# Pulse Audio controls
-bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
-bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
-bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
+#bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
+#bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
-bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
-bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
+# -- TOOLS KEY BINDINGS --------------------------------------------------------
-# PLAYGROUND
+bindsym $mod+Return exec i3-sensible-terminal
-gaps outer 2
-gaps inner 2
+# demnu / passmenu launcher.
+bindsym $mod+d exec --no-startup-id dmenu_recency -b -l 15 -fn 'MesloLGS NF-9' -p '>_'
+#bindsym $mod+d exec --no-startup-id dmenu_run -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'
+#bindsym $mod+p exec --no-startup-id passmenu -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'
+# rofi launcher.
+#bindsym $mod+d exec --no-startup-id rofi -show drun
+#bindsym $mod+p exec --no-startup-id rofi -show pass
+#bindsym $mod+Tab exec --no-startup-id rofi -show window
-# pin applications to specific workspace
-# helpfull to get name: 'xprop | grep WM_CLASS' (then click window)
-#assign [class="Firefox"] 9
+bindsym Print exec --no-startup-id flameshot gui
+
+# -- AUDIO ---------------------------------------------------------------------
+
+# Alsamixer.
+exec --no-startup-id volumeicon
+bindsym $mod+Shift+m exec terminal -e 'alsamixer'
+# bindsym XF86AudioRaiseVolume exec "amixer set Master 5%+"
+# bindsym XF86AudioLowerVolume exec "amixer set Master 5%-"
+# bindsym XF86AudioMute exec "amixer set Master toggle"
-#% vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1
+# Pulseaudio.
+#exec --no-startup-id pulseaudio
+#exec --no-startup-id pa-applet
+#bindsym $mod+Shift+m exec pavucontrol
+#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
+#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
+#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
+
+# -- AUTOSTART -----------------------------------------------------------------
+
+#exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
+exec --no-startup-id nitrogen --restore; sleep 1; picom -b
+exec --no-startup-id nm-applet
+exec --no-startup-id xfce4-power-manager
+exec --no-startup-id clipit
+# exec --no-startup-id blueman-applet
+# exec_always --no-startup-id sbxkb
+exec --no-startup-id xautolock -time 10 -locker blurlock
+#exec_always --no-startup-id ff-theme-util
+exec_always --no-startup-id fix_xcursor
+
+#% vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:cc=80