Skip to content

Instantly share code, notes, and snippets.

@bcremer
Last active August 5, 2023 23:09
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save bcremer/7524492 to your computer and use it in GitHub Desktop.
Save bcremer/7524492 to your computer and use it in GitHub Desktop.
My i3 config.
# .config/i3/config
set $mod Mod4
set $alt Mod1
font pango:Segoe UI 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
## Solarized colorshema
# class border backgr. text indicator
client.focused #b58900 #b58900 #fdf6e3 #cb4b16
client.focused_inactive #073642 #073642 #fdf6e3 #073642
client.unfocused #073642 #073642 #fdf6e3 #073642
## Hide top bar of window
new_window pixel 1
## Set per-application border
for_window [instance="urxvt"] border pixel 1
for_window [class="Chromium" title=" - Chromium$"] border pixel 0
for_window [class="Firefox"] border pixel 0
for_window [class="Spotify"] border pixel 0
assign [class="Chromium"] 1
assign [class="Firefox"] 1
#assign [class="jetbrains-phpstorm"] 2
assign [class="Spotify"] 4
# Enable or disable floating
for_window [class="Gnome-screenshot"] floating enable
for_window [class="Gmrun"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
# workspace switching
bindsym $mod+Tab workspace back_and_forth
workspace_auto_back_and_forth no
# don't steal focus
focus_on_window_activation smart
# disable focus follows mouse
focus_follows_mouse no
hide_edge_borders smart
# kill focused window
bindsym $mod+Shift+q kill
bindsym ctrl+q kill
# put YouTube into fullscreen and execute this for media mode
bindsym $mod+y fullscreen disable; floating enable; resize set 400 300; sticky enable; move window to position 2140 20
# border changing
bindsym $mod+b border toggle
focus_wrapping no
# 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
# split in horizontal orientation
bindsym $mod+shift+v split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+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
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+F1 workspace 11
bindsym $mod+F2 workspace 12
bindsym $mod+F3 workspace 13
bindsym $mod+F4 workspace 14
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
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
bindsym $mod+Shift+F1 move container to workspace 11
bindsym $mod+Shift+F2 move container to workspace 12
bindsym $mod+Shift+F3 move container to workspace 13
bindsym $mod+Shift+F4 move container to workspace 14
# 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
bindsym $mod+t exec termite
bindsym $mod+Enter exec termite
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
set $mode_launcher Launch: [f]irefox [r]un [p]hpstorm
bindsym $mod+o mode "$mode_launcher"
mode "$mode_launcher" {
bindsym f exec firefox; mode "default"
bindsym c exec /home/bcremer/BTSync/Configs/bin/chrome-work; mode "default"
bindsym p exec phpstorm; mode "default"
bindsym r exec gmrun; mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# resize window (you can also use the mouse for that)
bindsym $alt+r mode "resize"
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"
}
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
mode hide
hidden_state hide
modifier $mod
position top
status_command i3status -c ~/.config/i3/i3status.conf
#status_command i3blocks
tray_output eDP-1
tray_output DP-2-1
tray_output DP-2-2
font pango:Consolas 10
colors {
## solarized
background #073642
statusline #eee8d5
focused_workspace #cb4b16 #cb4b16 #eee8d5
active_workspace #cb4b16 #cb4b16 #eee8d5
inactive_workspace #b58900 #b58900 #eee8d5
}
}
# .config/i3/config
set $mod Mod4
set $alt Mod1
font pango:Segoe UI 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
## Solarized colorshema
# class border backgr. text indicator
client.focused #b58900 #b58900 #fdf6e3 #cb4b16
client.focused_inactive #073642 #073642 #fdf6e3 #073642
client.unfocused #073642 #073642 #fdf6e3 #073642
## Hide top bar of window
new_window pixel 1
## Set per-application border
for_window [instance="urxvt"] border pixel 1
for_window [class="Chromium" title=" - Chromium$"] border pixel 0
for_window [class="Firefox"] border pixel 0
for_window [class="Spotify"] border pixel 0
assign [class="Chromium"] 1
assign [class="Firefox"] 1
#assign [class="jetbrains-phpstorm"] 2
assign [class="Spotify"] 4
# Enable or disable floating
for_window [class="Gnome-screenshot"] floating enable
for_window [class="Gmrun"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
# workspace switching
bindsym $mod+Tab workspace back_and_forth
workspace_auto_back_and_forth no
# don't steal focus
focus_on_window_activation smart
# disable focus follows mouse
focus_follows_mouse no
hide_edge_borders smart
# kill focused window
bindsym $mod+Shift+q kill
bindsym ctrl+q kill
# put YouTube into fullscreen and execute this for media mode
bindsym $mod+y fullscreen disable; floating enable; resize set 400 300; sticky enable; move window to position 2140 20
# border changing
bindsym $mod+b border toggle
focus_wrapping no
# 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
# split in horizontal orientation
bindsym $mod+shift+v split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+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
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+F1 workspace 11
bindsym $mod+F2 workspace 12
bindsym $mod+F3 workspace 13
bindsym $mod+F4 workspace 14
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
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
bindsym $mod+Shift+F1 move container to workspace 11
bindsym $mod+Shift+F2 move container to workspace 12
bindsym $mod+Shift+F3 move container to workspace 13
bindsym $mod+Shift+F4 move container to workspace 14
# 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
bindsym $mod+t exec termite
bindsym $mod+Enter exec termite
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
set $mode_launcher Launch: [f]irefox [r]un [p]hpstorm
bindsym $mod+o mode "$mode_launcher"
mode "$mode_launcher" {
bindsym f exec firefox; mode "default"
bindsym c exec /home/bcremer/BTSync/Configs/bin/chrome-work; mode "default"
bindsym p exec phpstorm; mode "default"
bindsym r exec gmrun; mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# resize window (you can also use the mouse for that)
bindsym $alt+r mode "resize"
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"
}
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
mode hide
hidden_state hide
modifier $mod
position top
status_command i3status -c ~/.config/i3/i3status.conf
#status_command i3blocks
tray_output eDP-1
tray_output DP-2-1
tray_output DP-2-2
font pango:Consolas 10
colors {
## solarized
background #073642
statusline #eee8d5
focused_workspace #cb4b16 #cb4b16 #eee8d5
active_workspace #cb4b16 #cb4b16 #eee8d5
inactive_workspace #b58900 #b58900 #eee8d5
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment