Files
dots/files/i3/.config/i3/config
2023-02-06 16:53:02 +01:00

165 lines
5.3 KiB
Plaintext

set $mod Mod4
font pango:SFMono 10
# screens
exec_always --no-startup-id ~/.screenlayout/default.sh
# https://wiki.archlinux.org/index.php/XDG_Autostart
# manage via gnome tweaks
exec --no-startup-id dex-autostart --autostart --environment i3
# locking
exec --no-startup-id xss-lock --transfer-sleep-lock -- xlock
set $mode_system System (l)ock, l(o)gout, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id loginctl lock-session, mode "default"
bindsym o exec --no-startup-id i3-msg exit, mode "default"
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym h exec --no-startup-id systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Ctrl+BackSpace mode "$mode_system"
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
exec --no-startup-id blueman-applet
# audio control
bindsym $mod+a exec --no-startup-id pavucontrol -t 1
# jp input - fcitx5 fcitx5-configtool fcitx5-gtk4 fcitx5-qt fcitx5-mozc
exec --no-startup-id fcitx5
# keyboard and mouse
exec_always --no-startup-id setxkbmap eu
exec_always --no-startup-id xinput --set-prop 'pointer:Logitech MX Vertical' 'libinput Accel Profile Enabled' 0, 1
exec_always --no-startup-id xset r rate 250 50
# notifications
bindsym Ctrl+space exec --no-startup-id dunstctl close-all
bindsym Ctrl+Shift+space exec --no-startup-id dunstctl history-pop
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec --no-startup-id alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+space exec --no-startup-id dmenu_run \
-m 0 \
-i \
-l 10 \
-p dmenu \
-fn SFMono-10 \
-nb "#2f383e" \
-nf "#d3c6aa" \
-sb "#93b259" \
-sf "#2f383e" \
# show all open windows
bindsym $mod+s exec --no-startup-id ~/.config/i3/i3-windows.sh
# screenshot
bindsym $mod+Shift+s exec --no-startup-id flameshot gui
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# workspaces
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# reload the configuration file
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
set $bg #2F383E
set $fg #D3C6AA
set $accent #93b259
set $inactive #dfa000
set $alert #e67e80
bar {
status_command i3status
position top
output DP-1
padding -5px 0 0 0
colors {
statusline $fg
background $bg
focused_workspace $accent $accent $bg
inactive_workspace $bg $bg $inactive
active_workspace $inactive $inactive $bg
urgent_workspace $alert $alert $bg
}
}
for_window [all] title_window_icon on
default_border none
# setup default session
for_window [class="firefox"] move to workspace 10
for_window [class="discord"] move to workspace 10
for_window [class="Spotify"] move to workspace 10
for_window [class="Pavucontrol"] fullscreen enable
workspace 1 output DP-1
workspace 10 output DP-3
# i3-save-tree --workspace 2 > ~/.screenlayout/i3layout.json
# remember to adjust 'swallow'
exec --no-startup-id i3-msg "workspace 10; append_layout ~/.screenlayout/i3layout.json; workspace 1"
exec --no-startup-id firefox
exec --no-startup-id spotify
exec --no-startup-id discord
# wallpaper
exec_always --no-startup-id feh --bg-fill ~/cloud/images/wallpaper/wallpaper