Skip to content

Instantly share code, notes, and snippets.

@phwelo
Created September 15, 2018 03:02
Show Gist options
  • Save phwelo/f6238809ebbbd7a587b80dbef6eeb33c to your computer and use it in GitHub Desktop.
Save phwelo/f6238809ebbbd7a587b80dbef6eeb33c to your computer and use it in GitHub Desktop.
i3 config file
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#####################################
# Main Config
#
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod1
#
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window none
new_float 1pixel
#
# Hide borders
hide_edge_borders none
#
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font "Hasklug Nerd Font Mono Light 10"
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
#
# hide/unhide i3status bar
bindsym $mod+m bar mode toggle
#
###################################
######################################
# Rofi Stuff
# .desktop index and search
bindsym $mod+Shift+d --release exec "rofi -show drun"
#
# launch categorized menu - now using rofi
bindsym $mod+z exec --no-startup-id morc_menu
#
# dmenu style launcher
bindsym $mod+space \
exec --no-startup-id rofi -show run -line-margin 0 -line-padding 1 -font "Hasklug Nerd Font Mono Light 10" -hide-scrollbar -theme "solarized_alternate"
#
# password (pass)
bindsym $mod+p exec --no-startup-id rofi-pass
#
# menu of open windows from i3 api
bindsym $mod+x \
exec --no-startup-id rofi -show window -line-margin 0 -line-padding 1 -font "Hasklug Nerd Font Mono Light 10" -hide-scrollbar -theme "solarized_alternate"
#
#####################################
####################################
# Hotkeys that start applications
#
# start a terminal
bindsym $mod+Return exec st -e 'tmux'
#
# lockscreen
bindsym $mod+Shift+Backspace exec gl2
#
# launch dat browser
bindsym $mod+backslash exec --no-startup-id qutebrowser
#
# Start that weird text based menu configuration thing
bindsym $mod+Ctrl+Shift+b exec terminal -e 'bmenu'
#
# File Explorer
bindsym $mod+a exec ranger
#
# Lock screen
bindsym $mod+9 exec --no-startup-id gl2
#
# Cool trick, kill an xwindow
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
#
# kill focused window
bindsym $mod+q kill
#
###################################
# Scratchpad Handling
bindsym $mod+Escape move scratchpad
bindsym $mod+Tab scratchpad show
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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
# split orientation - removed the vertical & horizontal in favor of a toggle
bindsym $mod+v split toggle;exec notify-send 'tile toggled'
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) -- removed stacking because i don't use it
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+Ctrl+Shift+space focus mode_toggle
#############################################################
# Nothing but a bunch of workspace shit
# Move Workspaces
bindsym $mod+Control+j move workspace to output left
bindsym $mod+Control+semicolon move workspace to output right
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 ¹⛧
set $ws2 ﱤ²
set $ws3 ﲵ³
set $ws4 ⁴✎
set $ws5 ⁵⬦
set $ws6 ⁶
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
# Open applications on specific workspaces
assign [class="code"] $ws1
# Open specific applications in floating mode - removed apps i'm fairly sure i won't use
for_window [title="alsamixer"] floating enable border pixel 1
for_window [title="File Transfer*"] floating enable
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Pamac-manager"] floating enable
for_window [class="Simple-scan"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
#
##########################################################
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# 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 shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
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"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; compton -b
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id xautolock -time 10 -locker gl2
exec_always --no-startup-id fix_xcursor
# Solarized
set_from_resource $term_background background
set_from_resource $term_foreground foreground
set_from_resource $term_color0 color0
set_from_resource $term_color1 color1
set_from_resource $term_color2 color2
set_from_resource $term_color3 color3
set_from_resource $term_color4 color4
set_from_resource $term_color5 color5
set_from_resource $term_color6 color6
set_from_resource $term_color7 color7
set_from_resource $term_color8 color8
set_from_resource $term_color9 color9
set_from_resource $term_color10 color10
set_from_resource $term_color11 color11
set_from_resource $term_color12 color12
set_from_resource $term_color13 color13
set_from_resource $term_color14 color14
set_from_resource $term_color15 color15
# Theme colors
# class border backgr. text indicator child_border
client.focused #d33682 #d33682 #000000 #268bd2 #d33682
client.focused_inactive #d33682 #d33682 #586e75 #268bd2 #d33682
client.unfocused #073642 #073642 #888888 #073642 #073642
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #002b36 #002b36 #ffffff #002b36 #002b36
client.background #ffffff
font pango:Hasklug Nerd Font Mono Light 10
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
gaps inner 14
gaps outer -2
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
bar {
colors {
background #002b36
focused_workspace #2aa198 #2aa198 #ffffff
active_workspace #002b36 #2aa198 #ffffff
inactive_workspace #002b36 #00afaf #6c71c4
urgent_workspace #268bd2 #268bd2 #ffffff
binding_mode #d33682 #d33682 #ffffff
}
font pango:Hasklug Nerd Font Mono Light 10
i3bar_command i3bar
status_command i3status
position bottom
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment