Skip to content

Instantly share code, notes, and snippets.

@dongalor
Forked from marcusscomputer/i3 config
Created August 9, 2021 21:47
Show Gist options
  • Save dongalor/5fb33712a0efc759a891813e2d65f28b to your computer and use it in GitHub Desktop.
Save dongalor/5fb33712a0efc759a891813e2d65f28b to your computer and use it in GitHub Desktop.
marcus-s i3 config
# Modifier Key (Super)
set $mod Mod4
# No mouse focus
focus_follows_mouse no
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Noto Sans 11
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec --no-startup-id sakura
# kill focused window
bindsym Ctrl+Delete kill
# start dmenu (a program launcher)
bindsym $mod+r exec --no-startup-id rofi -theme /home/marcus-s/.config/rofi/themes/onedark.rasi -show run
bindsym Mod1+space exec --no-startup-id xfce4-appfinder
bindsym $mod+space exec --no-startup-id catfish
bindsym $mod+Tab exec --no-startup-id rofi -theme /home/marcus-s/.config/rofi/themes/onedark.rasi -show
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym $mod+shift+r exec --no-startup-id /home/marcus-s/Private/Scripts/dmenu-desktop
# change focus
#bindsym $mod+j focus left
#bindsym $mod+k focus down
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
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+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym Mod1+h split h
# split in vertical orientation
bindsym Mod1+v split v
# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+Shift+s layout stacking
bindsym $mod+Shift+w layout tabbed
# bindsym $mod+Shift+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 Mod1+a focus parent
# Define the workspace names and labels
set $workspace1 " 1: "
set $workspace2 " 2: "
set $workspace3 " 3: "
set $workspace4 " 4: "
set $workspace5 " 5: "
set $workspace6 " 6: "
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
# Move to next or previous workspace with Ctrl+Alt+Arrow
bindsym Ctrl+Mod1+Left workspace prev
bindsym Ctrl+Mod1+Right workspace next
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
# 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
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
colors {
background #141a21
statusline #141a21
separator #4b5262
# colour of border, background, and text
focused_workspace #2b5278 #2b5278 #dedede
active_workspace #2b5278 #2b5278 #dedede
inactive_workspace #141a21 #141a21 #dddddd
urgent_workspace #943600 #943600 #fefefe
}
status_command i3blocks -c ~/.config/i3/i3blocks.conf
# status_command i3status
position bottom
tray_output HDMI-2
font xft:Noto Sans, FontAwesome 11
}
#Shortcuts
#Autostart
exec_always --no-startup-id setxkbmap -layout "de" -option "grp:ctrl_shift_toggle"
exec_always --no-startup-id nm-applet
exec_always --no-startup-id pnmixer
exec_always --no-startup-id compton --config /home/marcus-s/.config/compton.conf
exec_always --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec
exec_always --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
exec_always --no-startup-id feh --bg-scale /home/marcus-s/.wallpaper/wallpaper.jpg
exec_always --no-startup-id xflux -l 52.5166667 -g 13.4
# colour of border, background, text, indicator, and child_border
client.focused #272727 #272727 #FFFFFF #FFFF00
client.unfocused #404552 #404552 #AAAAAA #ffff00
client.focused_inactive #404552 #404552 #AAAAAA #ffff00
client.urgent #990000 #990000 #FFFF00 #ffff00
# Shortcuts -
bindsym $mod+b exec blender
bindsym $mod+c exec codelite
bindsym $mod+d exec discord
bindsym $mod+e exec sakura -e ranger
bindsym $mod+Shift+e exec thunar
bindsym $mod+f exec firefox-esr
bindsym $mod+g exec gimp
bindsym $mod+m exec geary
bindsym $mod+s exec synaptic-pkexec
bindsym $mod+t exec mousepad
bindsym $mod+v exec virt-manager
# bindsym $mod+w exec xfce4-terminal -e /home/marcus-s/Private/Scripts/vm_start_win10.sh
bindsym $mod+y exec obs
# System shortcuts
bindsym Ctrl+Mod1+S exec systemctl suspend
bindsym Ctrl+Mod1+P exec systemctl poweroff
bindsym Ctrl+Mod1+R exec systemctl reboot
# Gaps specific
gaps inner 10
gaps outer 10
for_window [class="^.*"] border pixel 4
# ------------------------------------------------------------------------------
# APP TO WORKSPACE ASSIGNMENTS
# ------------------------------------------------------------------------------
assign [class="Gvim"] $workspace2
assign [class="Pluma"] $workspace2
assign [class="Firefox"] $workspace3
assign [class="qutebrowser"] $workspace3
assign [class="Gimp"] $workspace4
assign [class="Blender"] $workspace4
assign [class="SimpleScreenRecorder"] $workspace4
assign [class="Codelite"] $workspace2
assign [class="QtCreator"] $workspace2
assign [class="Pale moon"] $workspace3
assign [class="geary"] $workspace1
assign [class="discord"] $workspace1
assign [class="obs"] $workspace5
assign [class="libreoffice"] $workspace6
# ------------------------------------------------------------------------------
# CERTAIN WINDOW OPENING MODES
# ------------------------------------------------------------------------------
for_window [class="xfce4-appfinder"] floating enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment