dotfiles/dot_config/i3/config.tmpl

266 lines
8.4 KiB
Cheetah

# vim: syntax=i3config ft=i3config ts=4 sts=4 sw=4 noet
#
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $foreground #ebdbb2
set $background #282828
set $color0 #1d2021
set $color1 #cc241d
set $color2 #98971a
set $color3 #d79921
set $color4 #458588
set $color5 #b16286
set $color6 #689d6a
set $color7 #a89984
set $color8 #665c54
set $color9 #fb4934
set $color10 #b8bb26
set $color11 #fabd2f
set $color12 #83a598
set $color13 #d3869b
set $color14 #8ec07c
set $color15 #fbf1c7
set $color16 #d65d0e
set $color17 #fe8019
set $mod Mod4
set $left h
set $down n
set $up e
set $right i
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# font pango:Pragmata Pro, FontAwesome 11
font pango:Pragmata Pro, FontAwesome 12
#class background border text split
client.focused $color8 $color8 $foreground $color7
client.focused_inactive $background $background $color7 $color0
client.unfocused $color0 $background $color8 $color0
client.urgent $color1 $color1 $foreground $color1
client.background $background
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec roxterm
# kill focused window
bindsym $mod+Shift+q kill
# start rofi
bindsym $mod+space exec "rofi -show drun"
bindsym $mod+BackSpace exec "rofi -show drun"
# rofi password manager
bindsym $mod+k exec "rofi-pass"
# 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 workspace to other outputs
bindsym $mod+Control+$left move workspace to output left
bindsym $mod+Control+$down move workspace to output down
bindsym $mod+Control+$up move workspace to output up
bindsym $mod+Control+$right move workspace to output right
# split in horizontal orientation
bindsym $mod+c 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 (tabbed, toggle split)
bindsym $mod+s layout toggle split
bindsym $mod+t layout tabbed
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
bindsym $mod+Shift+BackSpace floating toggle
bindsym $mod+g focus mode_toggle
bindsym $mod+Tab workspace next
bindsym $mod+Shift+Tab workspace prev
# switch to workspace
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+p workspace 
bindsym $mod+w workspace 
bindsym $mod+m workspace 
# move focused container to workspace
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
bindsym $mod+Shift+p move container to workspace 
bindsym $mod+Shift+w move container to workspace 
bindsym $mod+Shift+m move container to workspace 
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Control+l exec "i3lock -e -i ~/pictures/wallpapers/blue_screen.png -t"
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym n resize shrink height 10 px or 10 ppt
bindsym e resize grow height 10 px or 10 ppt
bindsym i resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Up resize grow 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"
}
bindsym $mod+r mode "resize"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $(pacmd stat | \grep "Default sink name" | cut -d ' ' -f 4) +2%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $(pacmd stat | \grep "Default sink name" | cut -d ' ' -f 4) -2%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute $(pacmd stat | \grep "Default sink name" | cut -d ' ' -f 4) toggle
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10
bindsym Shift+XF86MonBrightnessUp exec light -A 2
bindsym Shift+XF86MonBrightnessDown exec light -U 2
# Cmus controls
bindsym XF86AudioPlay exec "cmus-remote --server localhost:3000 --passwd {{ .cmus.passwd }} -u"
bindsym XF86AudioNext exec "cmus-remote --server localhost:3000 --passwd {{ .cmus.passwd }} -n"
bindsym XF86AudioPrev exec "cmus-remote --server localhost:3000 --passwd {{ .cmus.passwd }} -r"
# Take screenshot
bindsym Print exec pyazo
assign [class="(?i)firefox"] 
assign [class="(?i)chromium"] 
assign [class="Telegram"] 
assign [class="(?i)riot"] 
assign [class="Thunderbird"] 
for_window [class="Lxappearance"] floating enable
new_window pixel 2
hide_edge_borders smart
exec xcape -e 'Control_L=Escape'
exec_always python ~/.config/i3/i3-autoname-workspaces.py &
exec telegram-desktop >/dev/null 2>/dev/null &
exec roxterm -e cmus --listen 0.0.0.0:3000 >/dev/null 2>/dev/null &
exec env GTK_THEME=Arc-Solid gtk-launch firefox >/dev/null 2>/dev/null &
exec gtk-launch thunderbird >/dev/null 2>/dev/null &
set $mode_power (1) shutdown, (2) reboot, (3) exit i3, (4) reload i3
mode "$mode_power" {
bindsym 1 exec --no-startup-id "shutdown now", mode "default"
bindsym 2 exec --no-startup-id "reboot", mode "default"
bindsym 3 exec --no-startup-id "i3-msg exit", mode "default"
bindsym 4 exec --no-startup-id "~/sbin/i3-reload", mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+x mode "$mode_power"
set $mode_kb_select (1) US, (2) Colemak, (3) Latin, (4) Cyrillic, (5) DE
mode "$mode_kb_select" {
bindsym 1 exec --no-startup-id "setxkbmap -layout us", mode "default"
bindsym 2 exec --no-startup-id "setxkbmap -layout custom -variant colemak -option ctrl:swapcaps", mode "default"
bindsym 3 exec --no-startup-id "setxkbmap -layout rs -variant latin", mode "default"
bindsym 4 exec --no-startup-id "setxkbmap -layout rs", mode "default"
bindsym 5 exec --no-startup-id "setxkbmap -layout de", mode "default"
bindsym Escape mode "default"
}
bindsym $mod+F12 mode "$mode_kb_select"
bar {
position top
tray_output none
status_command ~/.local/share/bumblebee-status/bumblebee-status -m \
cmus {{ .i3.bumblebee.modules }} \
sensors \
layout \
pasource \
pasink \
date \
time \
-p engine.workspacewheel=False \
pasource.showbars="1" \
pasink.showbars="1" \
cmus.server="localhost:3000" \
cmus.passwd="{{ .cmus.passwd }}" \
cmus.layout="cmus.prev cmus.main cmus.next cmus.shuffle" \
{{ .i3.bumblebee.parameters }} \
date.format="%a, %Y-%m-%d" \
time.format="%H:%M:%S" \
-t gruvbox-powerline
bindsym button4 nop
bindsym button5 nop
colors {
background $color0
focused_workspace $color8 $color8 $foreground
active_workspace $color8 $color8 $foreground
inactive_workspace $color8 $color0 $foreground
urgent_workspace $color9 $color1 $foreground
}
}
bar {
position bottom
status_command ~/.local/share/bumblebee-status/bumblebee-status -m \
traffic \
nic \
load \
cpu2 \
memory \
-p engine.workspacewheel=False \
traffic.hide_down=True \
traffic.exclude="lo,virbr,docker,vboxnet,veth,br-" \
nic.exclude="lo,virbr,docker,vboxnet,veth,br-" \
nic.states="^down" \
cpu2.layout="cpu2.coresload" \
cpu2.colored=1 \
-t gruvbox-powerline
bindsym button4 nop
bindsym button5 nop
colors {
background $color0
focused_workspace $color8 $color8 $foreground
active_workspace $color8 $color8 $foreground
inactive_workspace $color8 $color0 $foreground
urgent_workspace $color9 $color1 $foreground
}
}