sync/skel/.i3/config

219 lines
7.6 KiB
Plaintext
Raw Normal View History

2016-06-01 18:41:40 -04:00
# Variables
2014-09-12 19:03:40 -04:00
set $mod Mod4
2016-06-01 18:41:40 -04:00
set $x_switch workspace
# Assignments
2018-02-13 12:18:40 -05:00
for_window [class=nextcloud] floating disable
2015-01-27 15:38:30 -05:00
assign [class=Firefox] 2
2016-08-12 19:15:11 -04:00
assign [class=google-chrome] 2
2017-04-30 13:14:50 -04:00
assign [class=Google-chrome] 2
2015-04-27 08:21:57 -04:00
assign [class=midori4] 2
2015-04-28 13:48:08 -04:00
assign [class=Chromium-browser] 2
2016-06-01 18:41:40 -04:00
# Bindings
floating_modifier $mod
# Hide/show bar
bindsym $mod+apostrophe bar mode hide
bindsym $mod+shift+apostrophe bar mode dock
2016-06-01 18:41:40 -04:00
# Rename a workspace
2015-01-15 12:42:10 -05:00
bindsym $mod+shift+d exec i3-input -F 'rename workspace to "%s"' -P 'Rename to: '
2016-06-01 18:41:40 -04:00
# Rofi shortcuts
2017-08-29 11:42:06 -04:00
bindsym $mod+p exec "~/.i3/run.sh run"
2017-11-19 23:14:12 -05:00
# Clipboard manager
bindsym ctrl+Mod1+v exec "~/.i3/run.sh clip"
# Pass shortcut
#bindsym $mod+shift+p exec "keepass --auto-type"
2016-06-04 16:08:50 -04:00
bindsym $mod+shift+p exec "rofi-pass --last-used"
2016-06-01 18:41:40 -04:00
# Misc shortcuts
2016-02-21 18:28:47 -05:00
bindsym --release Num_Lock exec "xdotool key --clearmodifiers Shift+Insert;numlockx on"
2017-01-24 15:54:05 -05:00
bindsym Print exec "~/.i3/run.sh screenshot"
2016-06-01 18:41:40 -04:00
# Split in vertical orientation
2014-08-11 15:14:46 -04:00
bindsym $mod+v split h
2016-06-01 18:41:40 -04:00
# Split in horizontal orientation
2015-01-15 12:42:10 -05:00
bindsym $mod+shift+v split v
2016-06-01 18:41:40 -04:00
# Use keyboard as a mouse
bindsym $mod+z exec xdotool click 1
bindsym $mod+shift+z exec xdotool click 3
2016-06-01 18:41:40 -04:00
# Show/hide title
2015-01-27 15:38:30 -05:00
bindsym $mod+i border normal
bindsym $mod+shift+i border 1pixel
2016-06-01 18:41:40 -04:00
# Run a terminal
bindsym $mod+Return exec urxvt
2016-10-12 23:42:57 -04:00
bindsym $mod+shift+Return exec urxvt -cd "$(xcwd)"
2016-06-01 18:41:40 -04:00
# Terminate program
2015-01-15 12:42:10 -05:00
bindsym $mod+shift+c kill
2016-06-01 18:41:40 -04:00
# XF86 Buttons
2016-04-02 14:35:38 -04:00
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10 -time 0 -steps 1"
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10 -time 0 -steps 1"
bindsym $mod+XF86MonBrightnessUp exec "xbacklight -inc 5 -time 0 -steps 1"
bindsym $mod+XF86MonBrightnessDown exec "xbacklight -dec 5 -time 0 -steps 1"
bindsym XF86TouchpadToggle exec "synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')"
2016-06-04 16:08:50 -04:00
bindsym XF86AudioRaiseVolume exec "amixer set Master 7%+ unmute"
bindsym XF86AudioLowerVolume exec "amixer set Master 7%- unmute"
2017-05-08 22:24:12 -04:00
bindsym XF86AudioMute exec "amixer -D pulse set Master 1+ toggle;amixer set Master 0%"
2016-06-01 18:41:40 -04:00
# Toggle toucpad
bindsym $mod+backslash exec "synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')"
2018-07-02 16:01:13 -04:00
# Toggle tap to click
bindsym $mod+shift+backslash exec "synclient TapButton2=$(($(synclient -l | grep -c 'TapButton1.*=.*0') * 3));synclient TapButton1=$(synclient -l | grep -c 'TapButton1.*=.*0')"
2016-06-01 18:41:40 -04:00
# Movement
bindsym $mod+o workspace back_and_forth
bindsym $mod+bracketleft workspace prev
bindsym $mod+bracketright workspace next
2014-08-11 15:14:46 -04:00
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
2015-01-15 12:42:10 -05:00
bindsym $mod+shift+h move left
bindsym $mod+shift+j move down
bindsym $mod+shift+k move up
bindsym $mod+shift+l move right
bindsym $mod+shift+Left move left
bindsym $mod+shift+Down move down
bindsym $mod+shift+Up move up
bindsym $mod+shift+Right move right
2018-07-02 16:01:13 -04:00
# Moving to corners
bindsym $mod+ctrl+h exec "~/.i3/run.sh move left"
bindsym $mod+ctrl+j exec "~/.i3/run.sh move bottom"
bindsym $mod+ctrl+k exec "~/.i3/run.sh move top"
bindsym $mod+ctrl+l exec "~/.i3/run.sh move right"
2016-06-01 18:41:40 -04:00
# Fullscreen
2014-08-11 15:14:46 -04:00
bindsym $mod+f fullscreen
2015-01-27 15:38:30 -05:00
bindsym $mod+shift+f fullscreen global
2016-06-01 18:41:40 -04:00
# Layouts
2014-08-11 15:14:46 -04:00
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
2015-01-15 12:42:10 -05:00
bindsym $mod+shift+space floating toggle
2018-03-15 10:42:18 -04:00
bindsym $mod+space focus mode_toggle
2018-07-02 16:01:13 -04:00
bindsym $mod+comma exec "~/.i3/run.sh window"
2015-06-09 14:51:45 -04:00
bindsym $mod+1 $x_switch 1
bindsym $mod+2 $x_switch 2
bindsym $mod+3 $x_switch 3
bindsym $mod+4 $x_switch 4
bindsym $mod+5 $x_switch 5
bindsym $mod+6 $x_switch 6
bindsym $mod+7 $x_switch 7
bindsym $mod+8 $x_switch 8
bindsym $mod+9 $x_switch 9
bindsym $mod+0 $x_switch 10
2015-01-15 12:42:10 -05:00
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
2016-11-13 02:17:55 -05:00
bindsym $mod+d exec "~/.i3/run.sh copy"
2016-07-01 13:47:08 -04:00
bindsym $mod+grave exec "~/.i3/run.sh screen-lock"
bindsym $mod+shift+grave exec "~/.i3/run.sh screen-lock"
2016-06-01 18:41:40 -04:00
bindsym $mod+r mode "resize"
bindsym $mod+u focus parent
bindsym $mod+shift+u focus child
bindsym --release $mod+n exec "~/.i3/run.sh paste"
2016-06-01 18:41:40 -04:00
# Exit/restart i3
2014-08-11 15:14:46 -04:00
bindsym $mod+q restart
2017-08-29 11:42:06 -04:00
#bindsym $mod+shift+q exec "i3-nagbar -m 'NMRestart/Shutdown/Restart/Logout' -t warning -b NMRestart 'nmcli radio wifi off;sleep 1;nmcli radio wifi on' -b Shutdown 'sudo /sbin/poweroff' -b Restart 'sudo /sbin/shutdown -r now' -b Logout 'i3-msg exit' -b Sleep 'amixer set Master 0% mute;slock&until echo mem|sudo tee /sys/power/state>/dev/null;do sleep 1;done;sleep 4;nmcli radio wifi off;sleep 3;nmcli radio wifi on'"
bindsym $mod+shift+q exec "~/.i3/run.sh shutdownprompt"
2016-06-01 18:41:40 -04:00
# Wallpaper
bindsym $mod+shift+w exec "~/.i3/run.sh wall"
2014-08-11 15:14:46 -04:00
2016-06-01 18:41:40 -04:00
# Visuals
workspace_layout tabbed
2017-01-24 15:54:05 -05:00
hide_edge_borders smart
2016-06-04 16:08:50 -04:00
#smart_borders on
2016-06-01 18:41:40 -04:00
new_window pixel 1
2014-08-11 15:14:46 -04:00
2016-06-01 18:41:40 -04:00
# Colors
set $bg #121212
set $fg #9f9f9f
set $hi #efef8f
set $ac #a0afa0
set $tx #ffffff
set $ia #8f8f8f
set $be #8faf9f
set $yw #ccdc90
set $gn #88b090
set $rd #e89393
# border background text
client.focused #2f2f2f #2f2f2f #ffffff
client.unfocused $bg $bg $ia
client.focused_inactive $bg $bg $ac
client.urgent $rd $rd $tx
2014-08-11 15:14:46 -04:00
2016-06-01 18:41:40 -04:00
# Bar
bar {
2016-06-04 16:08:50 -04:00
#height 12
2016-06-01 18:41:40 -04:00
status_command i3status --config ~/.i3/i3status.conf
2017-04-30 13:14:50 -04:00
#status_command ~/.i3/status.sh
2016-06-01 18:41:40 -04:00
font -*-*-*-*-*-*-8-*-*-*-*-*-*-*
2016-08-18 15:47:09 -04:00
tray_output primary
2016-06-01 18:41:40 -04:00
mode dock
modifier $mod
colors {
background $bg
statusline $fg
separator $hi
focused_workspace $gn $bg $ac
active_workspace $gn $ac $tx
inactive_workspace $bg $bg $ia
urgent_workspace $rd $bg $ac
}
}
# Resize mode
mode "resize" {
bindsym $mod+h resize shrink width 1 px or 1 ppt
bindsym $mod+j resize grow height 1 px or 1 ppt
bindsym $mod+k resize shrink height 1 px or 1 ppt
bindsym $mod+l resize grow width 1 px or 1 ppt
bindsym Left resize shrink width 15 px or 15 ppt
bindsym Down resize grow height 15 px or 15 ppt
bindsym Up resize shrink height 15 px or 15 ppt
bindsym Right resize grow width 15 px or 15 ppt
# Back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Startup
# Monitor setup
2016-11-13 02:17:55 -05:00
exec --no-startup-id "zsh -c 'xrandr --output eDP1 --primary || xrandr --output HDMI3 --primary'"
2017-07-11 09:25:25 -04:00
# Mute on boot
exec --no-startup-id amixer set Master 0% mute
2016-06-01 18:41:40 -04:00
# Wallpaper
exec --no-startup-id "~/.i3/run.sh wall"
2016-06-01 18:41:40 -04:00
# Keyboard
2014-09-20 23:09:59 -04:00
exec --no-startup-id xmodmap ~/.xmodmap
2016-11-13 02:17:55 -05:00
#exec --no-startup-id ~/xmodmap.sh
2016-06-01 18:41:40 -04:00
# Misc
2016-11-13 02:17:55 -05:00
# Compositor
2018-07-02 16:01:13 -04:00
#exec --no-startup-id compton
2016-11-13 02:17:55 -05:00
# Spawn a terminal
#TODO: Currently the terminal will spawn in the current workspace
2017-04-30 13:14:50 -04:00
exec --no-startup-id /usr/bin/urxvt
2016-11-13 02:17:55 -05:00
# Orange tint
2015-12-29 23:04:58 -05:00
exec --no-startup-id /usr/bin/redshift -l 36.3:-80.3 -t 4000:2000
2016-11-13 02:17:55 -05:00
# Sync x11 clipboards
2017-11-27 10:35:39 -05:00
#exec --no-startup-id /usr/bin/parcellite
exec --no-startup-id /usr/bin/gpaste-client dr
2016-11-13 02:17:55 -05:00
# Turn off numlock!
exec --no-startup-id /usr/bin/numlockx
2016-11-13 02:17:55 -05:00
# Run firefox/firefox-bin
2018-02-13 12:18:40 -05:00
exec --no-startup-id firefox -p a || firefox-bin -p a
2016-11-13 02:17:55 -05:00
# Start syncthing if it hasn't already been started
2018-02-13 12:18:40 -05:00
#exec --no-startup-id /bin/zsh -c 'pidof syncthing||screen -dmS syncthing ~/bin/syncthing'
exec --no-startup-id nextcloud
2017-08-14 01:16:57 -04:00
# Start kdeconnect
2018-07-02 16:01:13 -04:00
#exec --no-startup-id "~/bin/indicator-kdeconnect"
2018-02-13 12:18:40 -05:00
# riot
exec --no-startup-id riot-web --hidden
2014-09-12 19:03:40 -04:00
# vim: ts=2:sw=2:et