Created
June 5, 2020 09:32
-
-
Save Disaster-Master/5db391b5ac135ec353b84689b53ebee6 to your computer and use it in GitHub Desktop.
My i3 Config
This file contains hidden or 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
set $mod Mod4 | |
# Font that enables cool icons | |
font pango: Cantarell-14, FontAwesome 10 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# Focus Follows mouse | |
focus_follows_mouse no | |
# kill focused window | |
bindsym $mod+Shift+q kill | |
# Move focus with arrows | |
bindsym $mod+Left focus left | |
bindsym $mod+Down focus down | |
bindsym $mod+Up focus up | |
bindsym $mod+Right focus right | |
# Move windows around: | |
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 | |
# change container layout (stacked, tabbed, toggle split) | |
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 | |
# 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 | |
# 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 | |
# Move workspaces between monitors | |
bindsym $mod+shift+n move workspace to output left | |
bindsym $mod+shift+m move workspace to output right | |
# 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 | |
# 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'" | |
# 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 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" | |
#========================= | |
# 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, (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 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" | |
} | |
#========================= | |
# Start some things as floating | |
#========================= | |
# for_window [class="Thunar"] floating enable | |
for_window [class="Arandr"] floating enable | |
# for_window [class="MATLAB R2017a - academic use" instance="sun-awt-X11-XFramePeer"] floating enable | |
for_window [class="XCalc" instance="xcalc"] floating enable | |
for_window [class="MATLAB R2017a" title="^Fig"] floating enable | |
#========================= | |
# Background Applications | |
#========================= | |
# WiFi Applet | |
exec --no-startup-id nm-applet | |
# Dropbox | |
exec_always --no-startup-id /home/morten/.dropbox-dist/dropboxd | |
# exec_always --no-startup-id HOME=$HOME/.dropbox-adapa && /home/morten/.dropbox-adapa/.dropbox-dist/dropboxd | |
# Bluetooth things | |
exec --no-startup-id /etc/init.d/bluetooth start | |
exec_always --no-startup-id blueman-applet | |
# Start notification daemon | |
exec_always --no-startup-id /usr/lib/notification-daemon-1.0/notification-daemon | |
# Compton | |
exec --no-startup-id compton -CGb | |
# Pulseaudio | |
exec --no-startup-id start-pulseaudio-x11 | |
# Pulseaudio applet | |
exec --no-startup-id pa-applet | |
# Albert | |
exec_always --no-startup-id albert | |
#========================= | |
# Colors | |
#========================= | |
set $background #22252d | |
set $text #fefefe | |
set $workspace #bf616a | |
set $inactive #636b78 | |
set $focused #FFA500 | |
set $unfocused #636b78 | |
set $status #dadfea | |
set $urgent #ebcb8b | |
set $focused_bg #b27300 | |
# Nice color for focused window | |
client.focused $focused $focused_bg $text $focused | |
#client.background $background | |
# ======================= | |
# I3Status | |
# ======================= | |
# finds out, if available) | |
bar { | |
status_command i3status | |
i3bar_command i3bar -t | |
position bottom | |
colors { | |
#<colorclass> <border> <background> <text> | |
background #000000A0 | |
focused_workspace $focused $focused_bg $text | |
} | |
} | |
#========================= | |
# Polybar | |
#========================= | |
# exec_always --no-startup-id $HOME/.config/polybar/launch.sh | |
#========================= | |
# Misc settings | |
#========================= | |
# Set DeathAdder mouse speed | |
# exec_always --no-startup-id speed=0.15; DAid=$(xinput | grep "DeathAdder" | grep -o -P '[[:digit:]]{2}'); xinput --set-prop $DAid "Coordinate Transformation Matrix" $speed, 0, 0, 0, $speed, 0, 0, 0, 1 | |
# Font size increase | |
font pango:URW Gothic 12px | |
# Turn on Keyboard Backlight | |
# exec_always --no-startup-id echo 2 > /sys/class/leds/asus::kbd_backlight/brightness | |
# Use USB sound card | |
# exec_always --no-startup-id audioID=$(pacmd list-sinks | grep -B 1 "name: <alsa_output.usb" | grep -o -P 'index: .{1,1}' | grep -o -P '[[:digit:]]{1}') && pacmd set-default-sink $audioID | |
exec_always --no-startup-id pacmd set-default-sink $(pacmd list-sinks | grep -B 1 "name: <alsa_output.usb" | grep -o -P 'index: .{2,2}' | grep -o -P '[[:digit:]]{2}') | |
# Set screen layout | |
exec_always --no-startup-id /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenInit.sh | |
# Fix virtualbox problems | |
# exec --no-startup-id VBoxClient-all | |
# exec --no-startup-id teamviewer --daemon start | |
# Fix weird mouse thingy | |
mouse_warping none | |
# Touchpad disable on typing | |
exec_always --no-startup-id syndaemon -i 0.5 -t -K -R -d | |
# Fix pulseaudio | |
# exec --no-startup-id pulseaudio --kill | |
# exec --no-startup-id pulseaudio --start | |
#========================= | |
# Keybindings | |
#========================= | |
# Pulse Audio controls | |
# increase sound volume | |
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ | |
bindsym $mod+plus exec --no-startup-id amixer -D pulse sset Master 5%+ | |
# decrease sound volume | |
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- | |
bindsym $mod+minus exec --no-startup-id amixer -D pulse sset Master 5%- | |
# mute button | |
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle | |
# Alternate keybindings | |
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% | |
# bindsym $mod+plus exec --no-startup-id pactl set-sink-volume 0 +5% | |
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% | |
# bindsym $mod+minus exec --no-startup-id pactl set-sink-volume 0 -5% | |
## Media Keys | |
#play pause | |
bindsym XF86AudioPlay exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause | |
# Forward/Backwards | |
bindsym XF86Forward exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next | |
bindsym XF86Back exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous | |
bindsym XF86AudioNext exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next | |
bindsym XF86AudioPrev exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous | |
## Sreen brightness controls | |
# bindsym $mod+F5 exec --no-startup-id xbacklight -dec 10 # decrease screen brightness | |
# bindsym $mod+F6 exec --no-startup-id xbacklight -inc 10 # increase screen brightness | |
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 # decrease screen brightness | |
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 # increase screen brightness | |
## Keyboard backlight | |
# bindsym $mod+F3 exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/keyboardBacklightDown.sh | |
# bindsym $mod+F4 exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/keyboardBacklightUp.sh | |
bindsym XF86KbdBrightnessUp exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/keyboardBacklightUp.sh | |
bindsym XF86KbdBrightnessDown exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/keyboardBacklightDown.sh | |
## Calculator Shortcut | |
bindsym XF86Calculator exec --no-startup-id xcalc | |
## Monitor layout toggle | |
bindsym $mod+p exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenToggle.sh; | |
# Uni mode | |
# bindsym $mod+u exec --no-startup-id echo 3 > /home/morten/Dropbox/dotfiles/scripts/screenlayout/.screenIndex && /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenInit.sh | |
# Notebook mode | |
bindsym $mod+n exec --no-startup-id echo 2 > /home/morten/Dropbox/dotfiles/scripts/screenlayout/.screenIndex && /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenInit.sh | |
# Home mode | |
bindsym $mod+z exec --no-startup-id echo 1 > /home/morten/Dropbox/dotfiles/scripts/screenlayout/.screenIndex && /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenInit.sh | |
# TV mode | |
# bindsym $mod+t exec --no-startup-id echo 4 > /home/morten/Dropbox/dotfiles/scripts/screenlayout/.screenIndex && /home/morten/Dropbox/dotfiles/scripts/screenlayout/screenInit.sh | |
## Screenshot | |
bindsym Print exec --no-startup-id scrot /home/morten/screenshot.png | |
bindsym $mod+Shift+s exec --no-startup-id lightscreen | |
## Baguette | |
bindsym Scroll_Lock exec --no-startup-id ffplay '/home/morten/Dropbox/dotfiles/scripts/FØJ FOR HELVEDE.mp3' -nodisp -autoexit | |
# bindsym Scroll_Lock exec --no-startup-id ffplay '/home/morten/Dropbox/dotfiles/scripts/baguette.mp3' -nodisp -autoexit | |
## lock | |
bindsym $mod+l exec --no-startup-id /home/morten/Dropbox/dotfiles/scripts/lock.sh | |
## Suspend | |
bindsym XF86PowerOff exec --no-startup-id /usr/bin/customLock && systemctl suspend | |
#========================= | |
# Program Shortcuts | |
#========================= | |
# Chromium | |
# bindsym $mod+c exec --no-startup-id google-chrome-stable | |
# Firefox | |
bindsym $mod+c exec --no-startup-id firefox | |
# Start file explorer | |
bindsym $mod+shift+X exec --no-startup-id thunar | |
# start a terminal | |
bindsym $mod+Return exec --no-startup-id i3-sensible-terminal | |
# start dmenu | |
# bindsym $mod+d exec --no-startup-id dmenu_recency | |
bindsym $mod+d exec --no-startup-id rofi -show run | |
# ======================= | |
# Gaps | |
# ======================= | |
gaps inner 0 #7 | |
gaps outer 0 | |
for_window [class="^.*"] border pixel 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment