aboutsummaryrefslogtreecommitdiffstats
path: root/.i3/config
diff options
context:
space:
mode:
Diffstat (limited to '.i3/config')
-rw-r--r--.i3/config226
1 files changed, 125 insertions, 101 deletions
diff --git a/.i3/config b/.i3/config
index 3388538..1e274bb 100644
--- a/.i3/config
+++ b/.i3/config
@@ -2,10 +2,17 @@
## ~/.i3/config
##
## i3 config file (v4)
-## Ref: http://i3wm.org/docs/userguide.html
##
-## Weitian LI <liweitianux@gmail.com>
-## 2014/05/10
+## References:
+## [1] http://i3wm.org/docs/userguide.html
+##
+## Credits:
+## [1] https://github.com/Airblader/dotfiles-manjaro
+## [2] https://github.com/Remedan/dotfiles
+##
+## Aaron LI <aaronly.me@outlook.com>
+## Created: 2014-05-10
+## Updated: 2015-12-18
###########################################################
###### NOTES ###### {{{
@@ -34,7 +41,7 @@ set $shots_dir ~/pictures/screenshots
# Use pango to choose FreeType fonts
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
#font pango:DejaVu Sans Mono 10
-font pango:Terminus, WenQuanYi Bitmap Song, Icons, FontAwesome, 10
+font pango:Terminus, WenQuanYi Bitmap Song, FontAwesome, 10
# use `Mouse+$mod' to drag floating windows
floating_modifier $mod
@@ -45,6 +52,9 @@ floating_modifier $mod
# timeout of urgency hint on workspace change (default 500ms)
force_display_urgency_hint 1000 ms
+# do not focus the activated window, always mark urgent (default: smart)
+focus_on_window_activation urgent
+
# ipc (`i3-msg' to run i3 commands)
ipc-socket ~/.i3/i3-ipc.sock
###### settings ###### }}}
@@ -53,9 +63,12 @@ ipc-socket ~/.i3/i3-ipc.sock
# border style
#new_window 1pixel
bindsym $mod+t border normal
-bindsym $mod+y border 1pixel
+bindsym $mod+y border pixel 3
bindsym $mod+u border none
+# 2 pixel border by default
+for_window [class="^.*"] border pixel 2
+
# orientation for new workspaces
default_orientation auto
@@ -63,29 +76,44 @@ default_orientation auto
#hide_edge_borders vertical
### colors
-## solarized colorscheme (customized) {{{
-client.background #1e2320
-# colorclass border background text indicator
-client.focused #859900 #859900 #fdf6e3 #2e9ef4
-client.focused_inactive #268bd2 #268bd2 #fdf6e3 #484e50
-client.unfocused #93a1a1 #93a1a1 #fdf6e3 #292d2e
-client.urgent #cb4b16 #cb4b16 #fdf6e3 #2e9ef4
-## colorscheme }}}
-#
+# molokai
+set $black #1b1d1e
+set $white #f8f8f2
+set $dark_gray #303030
+set $light_gray #9999aa
+set $red #b60050
+set $light_red #f92672
+set $green #88bb22
+set $light_green #80ff00
+set $brown #c47f2c
+set $yellow #ffba68
+set $blue #30309b
+set $light_blue #7070f0
+set $purple #7e40a5
+set $light_purple #bb88dd
+set $cyan #4699af
+set $light_cyan #66d9ef
+
+# BORDER BACKGROUND TEXT INDICATOR
+client.focused $green $green $black $green
+client.unfocused $black $black $white $black
+client.focused_inactive $black $black $white $black
+client.urgent $red $red $black $red
+client.background $black
###### appearance ###### }}}
###### workspace ###### {{{
# name workspace
-set $ws1 1gentoo
-set $ws2 2term
-set $ws3 3vim
-set $ws4 4web
-set $ws5 5work
-set $ws6 6media
-set $ws7 7game
-set $ws8 8sys
-set $ws9 9misc
-set $ws0 0float
+set $ws1 "1: "
+set $ws2 "2: "
+set $ws3 "3: "
+set $ws4 "4: "
+set $ws5 "5: ??"
+set $ws6 "6: ??"
+set $ws7 "7: "
+set $ws8 "8:  "
+set $ws9 "9: "
+set $ws0 "10: "
# switch to workspace
bindsym $mod+1 workspace $ws1
@@ -98,6 +126,7 @@ bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws0
+
# auto back-and-forth when switched to the current workspace
workspace_auto_back_and_forth yes
@@ -115,11 +144,6 @@ bindsym $mod+Shift+0 move container to workspace $ws0
# move to provided workspace
bindsym $mod+Shift+m exec i3-input -F 'move container to workspace "%s"' -P 'move to workspace: '
-# assign workspace for applications
-assign [class="Gvim"] $ws3
-assign [class="Firefox" instance="Navigator"] $ws4
-assign [class="Vlc"] $ws6
-
# switch workspace
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+Ctrl+Left workspace prev
@@ -138,34 +162,33 @@ bindsym $mod+Shift+q kill
bindsym $mod+F4 kill
# change focus (h/j/k/l)
-bindsym $mod+h focus left
-bindsym $mod+j focus down
-bindsym $mod+k focus up
-bindsym $mod+l focus right
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l 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+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window (h/j/k/l)
-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+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l 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+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+Shift+v split h
-
# split in vertical orientation
-bindsym $mod+v split v
+bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
@@ -194,6 +217,9 @@ bindsym $mod+Shift+minus move scratchpad
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
+# toggle whether to stick a window to the screen (regardless of workspaces)
+bindsym $mod+Shift+s sticky toggle
+
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves layout/session, can be used to upgrade i3)
@@ -226,12 +252,11 @@ mode "resize" {
bindsym $mod+r mode "resize"
# mode_system: prompt for lock, logout, suspend, shutdown, etc.
-set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
+set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $i3_scripts/i3exit.sh lock, mode "default"
bindsym e exec --no-startup-id $i3_scripts/i3exit.sh logout, mode "default"
bindsym s exec --no-startup-id $i3_scripts/i3exit.sh suspend, mode "default"
- bindsym h exec --no-startup-id $i3_scripts/i3exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id $i3_scripts/i3exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id $i3_scripts/i3exit.sh shutdown, mode "default"
# back to normal: Enter or Escape
@@ -241,29 +266,34 @@ mode "$mode_system" {
bindsym $mod+Ctrl+Delete mode "$mode_system"
###### i3 modes ###### }}}
-###### applications bindings ###### {{{
+###### application bindings ###### {{{
## NOTE: (Mod4: Win)
## Some Mod4-keys binded for urxvt (~/.Xresources)
## Mod4-c, Mod4-v, Mod4-Shift-v
## Mod4-Escape, Mode4-s, Mod4-u
-# dmenu & i3-dmenu-desktop
-bindsym $mod+d exec --no-startup-id dmenu_run
-bindsym $mod+F2 exec --no-startup-id dmenu_run
+## program launcher
+#bindsym $mod+d exec --no-startup-id dmenu_run
+#bindsym $mod+F2 exec --no-startup-id dmenu_run
+# use 'rofi' instead of 'dmenu'
+bindsym $mod+d exec --no-startup-id rofi -show run
+bindsym $mod+F2 exec --no-startup-id rofi -show run
# `i3-dmenu-desktop' only displays applications with a .desktop file
-bindsym $mod+p exec --no-startup-id i3-dmenu-desktop
+bindsym $mod+p exec --no-startup-id i3-dmenu-desktop
# lock screen (i3lock)
bindsym $mod+Ctrl+l exec --no-startup-id $i3_scripts/i3exit.sh lock
+bindsym $sup+l exec --no-startup-id $i3_scripts/i3exit.sh lock
# turn off display
bindsym $mod+Ctrl+b exec --no-startup-id sleep 1 && xset dpms force off
# screenshots
-bindsym Print exec --no-startup-id scrot -e 'mv $f $shots_dir/$f'
-bindsym $mod+Print exec --no-startup-id scrot -s -e 'mv $f $shots_dir/$f'
+bindsym --release Print exec --no-startup-id scrot -e 'mv $f $shots_dir/'
+bindsym --release $mod+Print exec --no-startup-id scrot -s -e 'mv $f $shots_dir/'
# terminal
-bindsym $sup+t exec urxvtc || urxvt || i3-sensible-terminal
+bindsym $sup+t exec urxvtc || urxvt || i3-sensible-terminal
+bindsym $sup+Enter exec urxvtc || urxvt || i3-sensible-terminal
# file manager
bindsym $sup+f exec thunar
# web browser
@@ -281,61 +311,53 @@ bindsym $mod+backslash [instance="dropdown_term"] scratchpad show
###### window control ###### {{{
## floating
-for_window [window_role="pop-up"] floating enable
-for_window [class="Feh"] floating enable
-for_window [class="XFontSel"] floating enable
-for_window [class="Arandr"] floating enable
-for_window [class="Xfce4-notifyd"] floating enable
+for_window [window_role="pop-up"] floating enable
+for_window [window_role="bubble"] floating enable
+for_window [window_role="task_dialog"] floating enable
+for_window [window_role="Preferences"] floating enable
+
+for_window [window_type="dialog"] floating enable
+for_window [window_type="menu"] floating enable
+
+for_window [class="(?i)Arandr"] floating enable
for_window [class="Xscreensaver-demo"] floating enable
-for_window [class="Pinentry-gtk-2"] floating enable
-for_window [class="Ds9"] floating enable
-for_window [class="Toplevel"] floating enable
-for_window [class="Firefox" instance="Places"] floating enable
-for_window [class="Firefox" instance="Browser"] floating enable
-for_window [class="Firefox" instance="Update"] floating enable
-## floating by title
-# xbindkeys
+
for_window [title="^XBindKey:.*Hit.*"] floating enable
-# xev
-for_window [title="^Event Tester$"] floating enable
-# thunar copy files
-for_window [title="^File Operation Progress$"] floating enable
-
-## adjust window border
-for_window [class="URxvt"] border 1pixel
-for_window [class="Firefox"] border 1pixel
-for_window [class="Xfce4-notifyd"] border none
+
+for_window [class="(?i)Xfce4-notifyd"] floating enable, border none
+
+# assign workspace for applications
+assign [class="(?i)firefox"] $ws1
###### window control ###### }}}
###### i3bar ###### {{{
-# i3bar (plus the system information i3status finds out, if available)
bar {
- #status_command py3status -c ~/.i3/py3status.conf
- status_command py3status -s -c ~/.i3/py3status.conf
+ #status_command i3status -c ~/.i3/i3status.conf
+ status_command i3blocks -c ~/.i3/i3blocks.conf
position top
# whether show the current binding mode indicator (default yes)
#binding_mode_indicator no
+ font pango:Terminus, WenQuanYi Bitmap Song, FontAwesome, 11
+ tray_output primary
+ separator_symbol " "
+ # disable scroll on workspace buttons
+ bindsym button4 nop
+ bindsym button5 nop
+ # disable tray padding (default: 2)
+ tray_padding 0
+ # display workspace of name "[n]:[NAME]" with only the "[NAME]"
+ strip_workspace_numbers yes
- ## color theme
colors {
- ## zenburn colorscheme (customized) {{{
- background #1e2320
- statusline #dcdccc
- separator #94bff3
- # colorclass border background text
- focused_workspace #506070 #506070 #ffffff
- active_workspace #dcdccc #506070 #ffffff
- inactive_workspace #dcdccc #1e2320 #dcdccc
- urgent_workspace #dcdccc #cb4b16 #dcdccc
- ## colorscheme }}}
- #
- ## solarized colorscheme {{{
- #background #073642
- #statusline #eee8d5
- #focused_workspace #cb4b16 #cb4b16 #eee8d5
- #active_workspace #cb4b16 #cb4b16 #eee8d5
- #inactive_workspace #b58900 #b58900 #eee8d5
- ## solarized }}}
+ statusline $white
+ background $black
+ separator $green
+ # BORDER BACKGROUND TEXT
+ focused_workspace $light_green $light_green $black
+ active_workspace $black $black $white
+ inactive_workspace $black $black $white
+ urgent_workspace $light_red $light_red $white
+ binding_mode $black $black $yellow
}
}
###### i3bar ###### }}}
@@ -343,11 +365,13 @@ bar {
###### autostart ###### {{{
## run applications on startup
## if need to run command when restarting i3, use `exec_always'
-# disable bell
exec --no-startup-id xset b off
exec --no-startup-id xrdb -load ~/.Xresources
+#exec --no-startup-id feh --bg-fill $i3_images/wallpaper.png
exec --no-startup-id sh ~/.fehbg
-exec --no-startup-id xcompmgr
+#exec --no-startup-id xcompmgr
+exec --no-startup-id compton -b
+exec --no-startup-id redshift
exec --no-startup-id xbindkeys
exec --no-startup-id urxvtd -q -o -f
exec --no-startup-id parcellite