Skip to content

Instantly share code, notes, and snippets.

@stealthbomber10
Last active August 7, 2017 12:39
Show Gist options
  • Save stealthbomber10/940eb0e34d2fb235d4f31852383cfdbf to your computer and use it in GitHub Desktop.
Save stealthbomber10/940eb0e34d2fb235d4f31852383cfdbf to your computer and use it in GitHub Desktop.
"you get good or download my rice" - /g/ anon
###
#
# _ _ _ _ _____ __ _
#| | ___ __ __ _ ___| | _| | ___ (_)___ / ___ ___ _ __ / _(_) __ _
#| |/ / '__/ _` |/ __| |/ / |/ _ \ | | |_ \ / __/ _ \| '_ \| |_| |/ _` |
#| <| | | (_| | (__| <| | __/ | |___) | | (_| (_) | | | | _| | (_| |
#|_|\_\_| \__,_|\___|_|\_\_|\___| |_|____/ \___\___/|_| |_|_| |_|\__, |
# |___/
#
# Dependencies: Rofi, Terminus, font awesome, bumblebee-status
# You also need my /bin/lock if you want to use my lock screen.
#
# I used i3 gaps for that gap action. Other program shortcuts that I use
# are towards the bottom of the file.
#
# Font Awesome Cheatsheet: http://fontawesome.io/cheatsheet/
#
# Happy Ricing!
###
# Or just go to here -> https://cd-rw.org/t/de-uglyfying-majaro-linux-xfce/352/5
# - Trent
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
### OTHER FONTS I USE
#font pango:monospace 10
#font pango:DejaVu Sans Mono 9
#font pango:envypn 9
#font pango:Gohu GohuFont 10
#font pango:HelveticaNeue 10
####
#
font pango:xos4 Terminus Regular 9.5
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec gnome-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
# 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+d exec --no-startup-id i3-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 $mod+h 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 (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
#------------WORKSPACE CONFIGURATION-------------------
bindsym $mod+1 workspace 1 1:
bindsym $mod+2 workspace 2 2:
bindsym $mod+3 workspace 3 3:
bindsym $mod+4 workspace 4 4:
bindsym $mod+5 workspace 5 5:
bindsym $mod+6 workspace 6 6:
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10 4_the_fags
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1 1:
bindsym $mod+Shift+2 move container to workspace 2 2:
bindsym $mod+Shift+3 move container to workspace 3 3:
bindsym $mod+Shift+4 move container to workspace 4 4:
bindsym $mod+Shift+5 move container to workspace 5 5:
bindsym $mod+Shift+6 move container to workspace 6 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 4_the_fags
# Move workspace left/right
bindsym $mod+Ctrl+Left Workspace prev
bindsym $mod+Ctrl+Right Workspace next
# 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-------------------------------------------
# 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 2 px or 2 ppt
bindsym k resize grow height 2 px or 2 ppt
bindsym l resize shrink height 2 px or 2 ppt
bindsym semicolon resize grow width 2 px or 2 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"
#-------------------------STATUS COMMAND BARS-------------------------------------
bar {
# This status command requires bumblebee-status.
# https://github.com/tobi-wan-kenobi/bumblebee-status
# For a list of other modules, use 'bumblebee-status -l modules'.
status_command /usr/share/bumblebee-status/bumblebee-status \
-m gpmdp pasink pasource brightness battery disk publicip nic memory cpu \
datetime \
-p disk.path=/home disk.showSize=false datetime.format="%a, %b %d, %Y %I:%M %p" \
memory.format="{used} {percent:05.02f}%" nic.states=^down\
-t gruvbox-powerline
position top
strip_workspace_numbers yes
#publicip
# Colorscheme based on base16-gruvbox.
colors {
#383c6a
statusline #ffffff
background #000000
#name #border #bg #text
focused_workspace #000000 #EBDBB2 #282828
active_workspace #000000 #282828 #EBDBB2
inactive_workspace #000000 #000000 #EBDBB2
urgent_workspace #000000 #EA4545 #1D2021
}
}
#name #border #bg #text #idk?
client.focused #000000 #1D2021 #EBDBB2 #000000
client.focused_inactive #000000 #000000 #ffffff #000000
client.unfocused #282828 #282828 #888888 #282828
client.urgent #282828 #282828 #ffffff #282828
#----------------SYSTEM MENU-----------------------
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (p) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id /bin/lock, mode "default"
bindsym e exec --no-startup-id i3-msg exit, mode "default"
bindsym s exec --no-startup-id /bin/lock && systemctl suspend, mode "default"
bindsym h exec --no-startup-id /bin/lock && systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym p 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+Delete mode "$mode_system"
#--------------- THINKPAD T440s FUNCTION KEY CONFIG -----------
# Pulse Audio controls
#increase sound volume
bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume 0 +5%"
# decrease sound volume
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume 0 -5%"
# mute sound
bindsym XF86AudioMute exec "pactl set-sink-mute 0 toggle"
# Sreen brightness controls
# increase screen brightness
bindsym XF86MonBrightnessUp exec "light -A 1"
# decrease screen brightness
bindsym XF86MonBrightnessDown exec "light -U 1"
# Media player controls (cause the other keys were useless)
bindsym XF86Tools exec playerctl pause
bindsym XF86Search exec playerctl play
bindsym XF86LaunchA exec playerctl previous
bindsym XF86Explorer exec playerctl next
#---------------UTILITY CONFIGURATION------------
# enable gaps
for_window [class="^.*"] border pixel 0
gaps inner 20
# Restore pape
exec --no-startup-id "nitrogen --restore"
# Start Compton (compositor) without shadows on windows and dock
exec --no-startup-id "compton -CG"
# enable guake
#exec --no-startup-id "guake"
# enable redshift
exec --no-startup-id "redshift-gtk"
# enable network manager
exec --no-startup-id "nm-applet"
# enable rofi
bindsym F9 exec rofi -show run -o 85
bindsym F10 exec rofi -show drun -o 85
bindsym F8 exec rofi -show window -o 85
# Customize gaps
bindsym $mod+Shift+t gaps outer current minus 5
bindsym $mod+Shift+y gaps outer current plus 5
bindsym $mod+Shift+u gaps inner current minus 5
bindsym $mod+Shift+i gaps inner current plus 5
bindsym $mod+Shift+o gaps inner all set 20; gaps outer all set 0
# Alt-tabbing
bindsym $mod+Tab focus parent; focus right
# move current workspaces
bindsym $mod+o move workspace to output left
bindsym $mod+p move workspace to output right
#--------------APPLICATION AUTOSTARTS/WORKSPACE CONFIGS------------------
# application rules
# web browsers
assign [class="Chromium"] workspace 2 2:
assign [class="Firefox"] workspace 2 2:
assign [Class="qutebrowser"] workspace 2 2:
# text editors
assign [class="Atom"] workspace 3 3:
assign [class="vim"] workspace 3 3:
# music
assign [class="Google Play Music"] workspace 5 5:
# discord
assign [class="discord"] workspace 4 4:
# steam
assign [class="Steam"] workspace 6 6:
exec --no-startup-id i3-msg 'workspace 1 1:; exec gnome-terminal'
exec --no-startup-id i3-msg 'workspace 2 2:; exec qutebrowser'
exec --no-startup-id i3-msg 'workspace 3 3:; exec gnome-terminal'
exec --no-startup-id i3-msg 'workspace 4 4:; exec discord'
exec --no-startup-id i3-msg 'workspace 5 5:; exec gpmdp'
exec --no-startup-id i3-msg 'workspace 6 6:; exec steam-native'
#---------------APPLICATION SHORTCUTS-----------------
bindsym $mod+Ctrl+c exec --no-startup-id "chromium"
bindsym $mod+Ctrl+f exec --no-startup-id "firefox"
bindsym $mod+Ctrl+n exec --no-startup-id "nemo"
bindsym $mod+Ctrl+a exec --no-startup-id "atom"
bindsym $mod+Ctrl+g exec --no-startup-id "gpmdp"
bindsym $mod+Ctrl+b exec --no-startup-id "qutebrowser"
bindsym $mod+Ctrl+h exec --no-startup-id "gnome-terminal -e htop"
bindsym $mod+Ctrl+r exec --no-startup-id "gnome-terminal -e ranger"
bindsym $mod+Ctrl+v exec --no-startup-id "gnome-terminal -e vim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment