Created
April 2, 2017 13:56
-
-
Save niklasad1/cacef2f572e87374136ec5af7b5cdb06 to your computer and use it in GitHub Desktop.
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 key to win | |
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:System San Fransisco Display 11 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# start a terminal | |
bindsym $mod+Return exec terminator | |
# bindsym $mod+Return exec termite | |
# kill focused window | |
bindsym $mod+Shift+q kill | |
# start dmenu (a program launcher) | |
#bindsym $mod+d exec dmenu_run | |
bindsym $mod+d exec rofi -show run -lines 3 -eh 2 -width 50 -padding 50 -opacity "85" -bw 0 -bc "$bg-color" -bg "$bg-color" -fg "$text-color" -hlbg "$bg-color" -hlfg "#9575cd" -font "System San Fransisco Display 20" | |
# lock screen | |
bindsym $mod+Shift+l exec i3lock -c 141414 | |
# print screen | |
# bindsym $mod+p exec scrot -s $HOME/Pictures/ScreenShoots/`date +%Y-%m-%d_%H:%M:%S`.png | |
bindsym --release $mod+p exec scrot -s | |
# change focus | |
bindsym $mod+j focus left | |
bindsym $mod+k focus down | |
bindsym $mod+l focus up | |
bindsym $mod+odiaeresis 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+odiaeresis 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 | |
# focus the child container | |
#bindsym $mod+d focus child | |
# set labels to the workspaces | |
set $ws1 "1. " | |
set $ws2 "2. " | |
set $ws3 "3. " | |
set $ws4 "4. " | |
set $ws5 "5. " | |
set $ws6 "6. " | |
# 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 | |
bindsym $mod+7 workspace 7 | |
bindsym $mod+8 workspace 8 | |
bindsym $mod+9 workspace 9 | |
bindsym $mod+0 workspace 10 | |
# move focused container to workspace | |
bindsym $mod+Shift+1 move container to workspace $ws1 | |
bindsym $mod+Shift+2 move container to workspace $ws2 | |
bindsym $mod+Shift+3 move container to workspace $ws3 | |
bindsym $mod+Shift+4 move container to workspace $ws4 | |
bindsym $mod+Shift+5 move container to workspace $ws5 | |
bindsym $mod+Shift+6 move container to workspace $ws6 | |
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 | |
# 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 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 odiaeresis 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" | |
set $bg-color #2f343f | |
set $inactive-bg-color #2f343f | |
set $text-color #f3f4f5 | |
set $inactive-text-color #676E7D | |
set $urgent-bg-color #E53935 | |
# window colors | |
client.focused $bg-color $bg-color $text-color #00ff00 | |
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00 | |
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00 | |
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00 | |
# new_window 1pixel | |
# Start i3bar to display a workspace bar (plus the system information i3status | |
# finds out, if available) | |
bar { | |
colors { | |
background #2f343f | |
focused_workspace #5294E2 #5294E2 #000000 | |
} | |
# status_command i3status | |
status_command /home/niklasad1/.config/i3/statusline | |
tray_output primary | |
position top | |
} | |
# Pulse Audio controls | |
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume | |
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume | |
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound | |
# Sreen brightness controls | |
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness | |
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness | |
# Touchpad controls | |
# bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad | |
# Media player controls | |
bindsym XF86AudioPlay exec playerctl play | |
bindsym XF86AudioPause exec playerctl pause | |
bindsym XF86AudioNext exec playerctl next | |
# Set inner/outer gaps | |
gaps inner 10 | |
gaps outer 5 | |
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" | |
} | |
# window behaviour | |
assign [class="Terminal"] $WS1 | |
assign [class="Firefox"] $WS2 | |
assign [class="Thunderbird"] $WS3 | |
assign [class="Slack|IRC"] $WS4 | |
assign [class="Spotify"] $WS5 | |
assign [class="Skype"] $WS5 | |
assign [class="Okular"] $WS6 | |
# for_window [class="(?i)nautilus"] floating enable | |
for_window [window_role="(?i)conversation"] floating enable | |
for_window [window_role="(?i)messages"] floating enable | |
for_window [window_role="(?i)pop-up"] floating enable | |
for_window [window_role="(?i)task_dialog"] floating enable | |
for_window [window_role="(?i)Skype"] floating enable | |
# no window title | |
for_window [class="Firefox|Okular|Thunderbird|Spotify"] border pixel 1 | |
# start apps | |
exec --no-startup-id compton -f & | |
exec --no-startup-id nm-applet | |
exec --no-startup-id feh --bg-scale ~/Pictures/bc8XA.jpg | |
exec --no-startup-id /usr/bin/gnome-terminal | |
exec --no-startup-id /usr/bin/firefox | |
exec --no-startup-id /usr/bin/thunderbird | |
exec --no-startup-id /usr/bin/slack | |
exec --no-startup-id /usr/bin/hexchat | |
exec --no-startup-id /usr/bin/spotify | |
exec --no-startup-id /usr/bin/okular | |
exec --no-restart-id /usr/bin/skype | |
exec --no-startup-id ~/.dropbox-dist/dropboxd & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment