Last active
March 18, 2019 12:01
-
-
Save mtekman/9821158918ae9ad31417a6836bdddf71 to your computer and use it in GitHub Desktop.
i3 config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see https://i3wm.org/docs/userguide.html for a complete reference! | |
exec --no-startup-id "sh -c 'pulseaudio --kill; sleep 1; pulseaudio --start'" | |
# My screen setup | |
exec --no-startup-id "sh -c 'sleep 2; ~/.screenlayout/screen_switch.sh last'" | |
exec --no-startup-id i3-msg 'workspace 1; exec firefox' | |
exec --no-startup-id i3-msg 'workspace 1; exec emacs --daemon' | |
# Headphones | |
exec --no-startup-id "sh -c 'pacmd load-module module-bluetooth-policy;pacmd load-module module-bluetooth-discover;'" | |
# Default assignments for these programs | |
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. | |
font pango:monospace 8 | |
# 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 | |
bindsym $mod+Shift+q kill | |
# Floating terminal | |
exec --no-startup-id lxterminal | |
for_window [instance="lxterminal"] move scratchpad; | |
bindsym $mod+Return [instance="lxterminal"] scratchpad show; | |
#bindsym $mod+Return scratchpad show; | |
bindsym $mod+Shift+minus [title="YouTube.*"] move container to scratchpad | |
bindsym $mod+period floating toggle | |
bindsym $mod+minus [title="YouTube.*"] scratchpad show | |
# brightness + volume + screen | |
bindsym XF86MonBrightnessDown exec xbacklight - 5 | |
bindsym XF86MonBrightnessUp exec xbacklight + 20 | |
bindsym XF86AudioMute exec pulsemixer --toggle-mute | |
bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -10 | |
bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +10 | |
bindsym $mod+Shift+p exec ~/.screenlayout/screen_switch.sh | |
#bindsym $mod+Shift+w exec ~/.config/i3/sleeper.sh | |
bindsym $mod+Shift+w exec python3 ~/.config/i3/batter.py | |
# program bindings | |
bindsym $mod+j exec emacs -f org-journal-new-entry | |
bindsym $mod+Shift+X exec emacsclient -c -n | |
bindsym $mod+Escape exec xtrlock | |
bindsym $mod+Shift+Return exec lxterminal | |
# start dmenu (a program launcher) | |
bindsym $mod+d exec dmenu_run | |
set $e_filter "^((?!emacs).)*" | |
bindsym $mod+F1 [title=$e_filter] focus | |
# alternatively, you can use the cursor keys: | |
bindsym $mod+Left [title=$e_filter] focus left | |
bindsym $mod+Down [title=$e_filter] focus down | |
bindsym $mod+Up [title=$e_filter] focus up | |
bindsym $mod+Right [title=$e_filter] focus right | |
# alternatively, you can use the cursor keys: | |
bindsym $mod+Shift+Left move left 100px | |
bindsym $mod+Shift+Down move down 100px | |
bindsym $mod+Shift+Up move up 100px | |
bindsym $mod+Shift+Right move right 100px | |
# split in horizontal orientation | |
bindsym $mod+h split h | |
bindsym $mod+v split v | |
# enter fullscreen mode for the focused container | |
bindsym $mod+f fullscreen toggle | |
bindsym $mod+k layout stacking | |
bindsym $mod+w layout tabbed | |
bindsym $mod+e layout toggle split | |
# toggle tiling / floating | |
bindsym $mod+button2 floating toggle | |
#some defaults | |
focus_follows_mouse no | |
# Define names for other workspaces for which we configure key bindings later on. | |
# We use variables to avoid repeating the names in multiple places. | |
# Auto naming of workspaces | |
# requires: i3wsr from AUC | |
exec_always --no-startup-id exec i3wsr | |
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 0 | |
# 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 | |
mode "movement" { | |
bindsym Up move workspace to output up | |
bindsym Down move workspace to output down | |
bindsym Left move workspace to output left | |
bindsym Right move workspace to output right | |
bindsym Return mode "default" | |
} | |
bindsym $mod+m mode "movement" | |
# reload the configuration file | |
bindsym $mod+Shift+c reload | |
bindsym $mod+Shift+r restart | |
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -b 'Yes' 'i3-msg exit'" | |
# resize window (you can also use the mouse for that) | |
mode "resize" { | |
bindsym Ctrl+Left resize shrink width 50 px or 50 ppt | |
bindsym Ctrl+Down resize grow height 50 px or 50 ppt | |
bindsym Ctrl+Up resize shrink height 50 px or 50 ppt | |
bindsym Ctrl+Right resize grow width 50 px or 50 ppt | |
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 | |
bindsym Shift+Left resize shrink width 1 px or 1 ppt | |
bindsym Shift+Down resize grow height 1 px or 1 ppt | |
bindsym Shift+Up resize shrink height 1 px or 1 ppt | |
bindsym Shift+Right resize grow width 1 px or 1 ppt | |
bindsym Return mode "default" | |
} | |
bindsym $mod+r mode "resize" | |
# Start i3bar to display a workspace bar (plus the system information i3status | |
# finds out, if available) | |
bar { | |
# status_command i3status | |
# status_command py3status | |
font pango:Inconsolata 10 | |
output EDP1 | |
output HDMI1 | |
# Install the following packages to get bumblebee-status to work: | |
# progress pulseaudio pavucontrol pacmd python-requests bluez bluez-utils python-netifaces | |
status_command ~/repos/bumblebee-status/bumblebee-status -m\ | |
pasink brightness progress date time spacer arch-update cpu memory disk nic publicip bluetooth battery\ | |
-t greyish-powerline\ | |
-p\ | |
progress.placeholder=""\ | |
root.path=/\ | |
memory.format="{percent:2.1f}%"\ | |
disk.format="{percent:2.01f}%"\ | |
time.format="%H:%M" date.format="%a, %b %d %Y"\ | |
nic.format="{ip}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment