Add ranger specific i3 configs.

This commit is contained in:
Ian Adam Naval 2015-03-23 06:30:39 -04:00
parent f89c7d3647
commit dbdca45d49
3 changed files with 73 additions and 36 deletions

View File

@ -122,9 +122,11 @@ bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
# Pulse Audio controls # Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 -- +10% && killall -SIGUSR1 i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 -- +10% && killall -SIGUSR1 i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -- -10% && killall -SIGUSR1 i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -- -10% && killall -SIGUSR1 i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle
bindsym XF86AudioMicMute exec --no-startup-id amixer -c 1 set Capture toggle
bindsym XF86Display exec arandr
# Sreen brightness controls # Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
@ -132,6 +134,11 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightnes
bindsym Shift+XF86MonBrightnessUp exec xbacklight -inc 1 # increase screen brightness bindsym Shift+XF86MonBrightnessUp exec xbacklight -inc 1 # increase screen brightness
bindsym Shift+XF86MonBrightnessDown exec xbacklight -dec 1 # decrease screen brightness bindsym Shift+XF86MonBrightnessDown exec xbacklight -dec 1 # decrease screen brightness
bindsym XF86Tools exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24"
bindsym XF86Search exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24"
bindsym XF86LaunchA exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24"
bindsym XF86Explorer exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24"
bindsym Print exec gnome-screenshot -i bindsym Print exec gnome-screenshot -i
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
@ -142,16 +149,16 @@ mode "resize" {
# Pressing right will grow the windows width. # Pressing right will grow the windows width.
# Pressing up will shrink the windows height. # Pressing up will shrink the windows height.
# Pressing down will grow the windows height. # Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt bindsym h resize shrink width 8 px or 8 ppt
bindsym j resize grow height 10 px or 10 ppt bindsym j resize grow height 8 px or 8 ppt
bindsym k resize shrink height 10 px or 10 ppt bindsym k resize shrink height 8 px or 8 ppt
bindsym l resize grow width 10 px or 10 ppt bindsym l resize grow width 8 px or 8 ppt
# same bindings, but for the arrow keys # same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 8 px or 8 ppt
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 8 px or 8 ppt
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 8 px or 8 ppt
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize grow width 8 px or 8 ppt
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" bindsym Return mode "default"
@ -159,10 +166,10 @@ mode "resize" {
} }
mode "move" { mode "move" {
bindsym Up move up 20px bindsym Up move up 16px
bindsym Left move left 20px bindsym Left move left 16px
bindsym Down move down 20px bindsym Down move down 16px
bindsym Right move right 20px bindsym Right move right 16px
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
@ -188,23 +195,26 @@ bindsym $mod+Shift+e mode "$quit_msg"
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
new_window normal 0 new_window 1pixel
new_float normal
gaps inner 8
for_window [instance="terminator"] border none #for_window [instance="terminator"] border none
for_window [instance="urxvt"] border none #for_window [instance="urxvt"] border none
for_window [instance="xterm"] border none #for_window [instance="xterm"] border none
for_window [instance="gvim"] border none #for_window [instance="gvim"] border none
for_window [class="thunderbird"] border none #for_window [class="thunderbird"] border none
for_window [class="chrome"] border none #for_window [class="chrome"] border none
for_window [class="(?i)opera"] border none #for_window [class="Chromium"] border none
for_window [class="(?i)firefox"] border none #for_window [class="(?i)opera"] border none
for_window [instance="dwb"] border none #for_window [class="(?i)firefox"] border none
for_window [instance="subl3"] border none #for_window [instance="dwb"] border none
#for_window [instance="subl3"] border none
# border background text indicator # border background text indicator
client.focused #660000 #880000 #ffffff #ff0000 client.focused #660000 #880000 #ffffff #ff0000
client.focused_inactive #333333 #888888 #222222 #000000 client.focused_inactive #252525 #888888 #222222 #000000
client.unfocused #333333 #222222 #888888 #000000 client.unfocused #252525 #222222 #888888 #000000
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)

View File

@ -43,10 +43,28 @@ status.register("disk",
critical_limit=10, critical_limit=10,
critical_color=COLORS['Red']) critical_color=COLORS['Red'])
status.register("pulseaudio", status.register("alsa",
format="{volume}%{muted}", format="{volume}%{muted}",
card=1,
color=COLORS['White'],
color_muted=COLORS['Red'],
muted="M") muted="M")
if os.path.exists("/sys/class/power_supply/BAT0"):
status.register("battery",
battery_ident="BAT0",
format="{consumption:.1f}W {percentage_design:.1f}%{status} {remaining:%E%h:%M}",
alert=True,
alert_percentage=20,
charging_color=COLORS['Yellow'],
full_color=COLORS['Green'],
critical_color=COLORS['Red'],
status={
"DIS": "",
"CHR": "",
"FULL": "=",
})
if os.path.exists("/sys/class/power_supply/BAT1"): if os.path.exists("/sys/class/power_supply/BAT1"):
status.register("battery", status.register("battery",
battery_ident="BAT1", battery_ident="BAT1",
@ -62,16 +80,16 @@ if os.path.exists("/sys/class/power_supply/BAT1"):
"FULL": "=", "FULL": "=",
}) })
if os.path.exists("/sys/class/net/wlp0s29u1u7i2"): if os.path.exists("/sys/class/net/wlp3s0"):
status.register("wireless", status.register("wireless",
interface="wlp0s29u1u7i2", interface="wlp3s0",
format_up="{essid} {quality:.0f}%", format_up="{essid} {quality:.0f}%",
color_up=COLORS['Green'], color_up=COLORS['Green'],
color_down=COLORS['Red']) color_down=COLORS['Red'])
if os.path.exists("/sys/class/net/eth0"): if os.path.exists("/sys/class/net/enp0s25"):
status.register("network", status.register("network",
interface="eth0", interface="enp0s25",
color_up=COLORS['Green'], color_up=COLORS['Green'],
color_down=COLORS['Red']) color_down=COLORS['Red'])
@ -81,9 +99,14 @@ status.register("mem",
warn_color=COLORS['Yellow'], warn_color=COLORS['Yellow'],
alert_color=COLORS['Red']) alert_color=COLORS['Red'])
status.register("text", status.register("keyboard_locks",
text="xterm", format="{caps}",
cmd_leftclick="xterm") caps_on="[CapsLock]",
caps_off="")
status.register("shell",
command="~/.i3/window.sh",
interval=0.1)
status.run() status.run()

4
i3/i3.dotfile/window.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
id=$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')
name=$(xprop -id $id | awk '/_NET_WM_NAME/{$1=$2="";print}' | cut -d'"' -f2)
echo $name