Created
March 5, 2016 09:01
-
-
Save cubarco/170c58938fb12d25c5a7 to your computer and use it in GitHub Desktop.
My i3 configs.
This file contains 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
#....... | |
# font | |
#....... | |
#font -*-cure-medium-*-*-*-11-*-*-*-*-*-*-* | |
font pango:snap, Tamsyn, WenQuanYi Bitmap Song, FontAwesome, Unifont 8 | |
#.......... | |
# windows | |
#.......... | |
new_window pixel 2 | |
new_float 1pixel | |
#.......... | |
# colors | |
#.......... | |
#class border backgr. text | |
#client.focused #0066ff #0066ff #6666cc | |
#client.focused_inactive #191919 #191919 #999999 | |
#client.unfocused #191919 #191919 #999999 | |
#client.urgent #cd989a #cd989a #2e3436 | |
#client.background #121212 | |
set $mod Mod4 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
#........... | |
# Keybinds | |
#........... | |
# start a terminal | |
bindsym $mod+Return exec termite | |
# kill focused window | |
bindsym $mod+q kill | |
# start dmenu (a program launcher) | |
bindsym Mod4+p exec dmenu_run -fn "-*-snap-*-*-*-*-10-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191919" -sf "#0066ff" -b | |
#bindsym Mod4+p exec dmenu_run -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191919" -sf "#0066ff" -b | |
# change focus | |
bindsym $mod+h focus left | |
bindsym $mod+j focus down | |
bindsym $mod+k focus up | |
bindsym $mod+l focus right | |
bindsym $mod+Tab focus down | |
# alternatively, you can use the cursor keys: | |
bindsym $mod+Left workspace prev | |
#bindsym $mod+Down focus down | |
#bindsym $mod+Up focus up | |
bindsym $mod+Right workspace next | |
# move focused window | |
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+Right move right | |
# split in horizontal orientation | |
bindsym $mod+g 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+s layout stacking | |
bindsym $mod+w layout tabbed | |
#bindsym $mod+e layout toggle split | |
bindsym $mod+d layout default | |
# 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+c focus child | |
# switch to workspace | |
bindsym $mod+1 workspace 1: main | |
bindsym $mod+2 workspace 2: web | |
bindsym $mod+3 workspace 3: terms | |
bindsym $mod+4 workspace 4: media | |
bindsym $mod+5 workspace 5: off | |
bindsym $mod+6 workspace 6: misc | |
# move focused container to workspace | |
bindsym $mod+Shift+1 move container to workspace 1: main | |
bindsym $mod+Shift+2 move container to workspace 2: web | |
bindsym $mod+Shift+3 move container to workspace 3: terms | |
bindsym $mod+Shift+4 move container to workspace 4: media | |
bindsym $mod+Shift+5 move container to workspace 5: off | |
bindsym $mod+Shift+6 move container to workspace 6: misc | |
# 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+q 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'" | |
bindsym $mod+Shift+q exec i3-msg exit | |
#Screenshot | |
#bindsym $mod+0xff57 exec scrot ~/Pictures/Screenshots/screenshot_%Y_%m_%d_%H_%M_%S.png | |
bindsym Print exec deepin-screenshot | |
# Custom binds | |
bindsym Mod1+Ctrl+t exec termite | |
bindsym Mod1+Ctrl+e exec google-chrome-stable | |
bindsym Mod1+Ctrl+l exec --no-startup-id py3lock | |
bindsym $mod+t exec bash /home/cubelin/bin/chat-helper | |
bindsym $mod+e exec nemo | |
# MPD | |
bindsym Mod1+Ctrl+Up exec --no-startup-id mpc toggle | |
bindsym Mod1+Ctrl+Down exec --no-startup-id mpc stop | |
bindsym Mod1+Ctrl+Left exec --no-startup-id mpc prev | |
bindsym Mod1+Ctrl+Right exec --no-startup-id mpc next | |
# Sound | |
bindsym Mod1+Up exec --no-startup-id amixer set Master 5%+ >/dev/null | |
bindsym Mod1+Down exec --no-startup-id amixer set Master 5%- >/dev/null | |
bindsym Mod1+m exec --no-startup-id amixer set Master toggle >/dev/null | |
# Scratchpad | |
bindsym $mod+Shift+z move scratchpad | |
bindsym $mod+z scratchpad show | |
# 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 h resize shrink width 10 px or 10 ppt | |
bindsym j resize grow height 10 px or 10 ppt | |
bindsym k resize shrink height 10 px or 10 ppt | |
bindsym l 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" | |
#Status bar | |
bar { | |
mode dock | |
position top | |
tray_output primary | |
#font -*-cure-medium-*-*-*-11-*-*-*-*-*-*-* | |
font pango:snap, Tamsyn, WenQuanYi Bitmap Song, FontAwesome, Unifont 8 | |
workspace_buttons yes | |
status_command i3status -c ~/.i3/i3status.conf | ~/.i3/wrapper.py | |
colors { | |
background #101010 | |
statusline #66ccff | |
#statusline #506f7a | |
focused_workspace #101010 #101010 #0066ff | |
active_workspace #506f7a #101010 #101010 | |
inactive_workspace #101010 #101010 #5f5f5f | |
urgent_workspace #2e3436 #0066ff | |
} | |
} | |
#assign application to workspace | |
assign [class="Firefox"] → 2: web | |
assign [class="google-chrome"] → 2: web | |
assign [class="luakit"] → 2: web | |
assign [class="Opera"] → 2: web | |
assign [class="^URxvt$" instance="^ncmpcpp$"] → 3: terms | |
assign [class="MPlayer"] → 4: media | |
assign [class="Vlc"] → 4: media | |
assign [class="FBReader"] → 5: off | |
assign [class="libreoffice-writer"] → 5: off | |
assign [class="Zathura"] → 5: off | |
assign [class="Gimp"] → 6: misc | |
assign [class="VirtualBox"] → 6: misc | |
assign [instance="smplayer"] → 4: media | |
assign [class="mpv"] → 4: media | |
assign [class="Steam"] → 6: misc | |
for_window [title="Hangouts"] floating enable | |
for_window [title="^kock$"] floating enable | |
for_window [instance="smplayer"] floating enable | |
for_window [class="mpv"] floating enable | |
for_window [class="VirtualBox"] floating enable | |
for_window [class="Steam"] floating enable | |
for_window [class="Skype"] floating enable | |
for_window [class="cloudmusic.exe"] floating enable | |
for_window [instance="QQ.exe"] floating enable | |
for_window [instance="QQ.exe"] border none | |
for_window [instance="nemo"] floating enable | |
for_window [window_role="bubble"] floating enable | |
for_window [window_role="pop-up"] floating enable | |
exec --no-startup-id /home/cubelin/.config/autostart.sh |
This file contains 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
# i3status configuration file. | |
# see "man i3status" for documentation. | |
# It is important that this file is edited as UTF-8. | |
# The following line should contain a sharp s: | |
# ß | |
# If the above line is not correctly displayed, fix your editor first! | |
general { | |
output_format = i3bar | |
colors = true | |
interval = 2 | |
color_good = "#66ccff" | |
} | |
#order += "ipv6" | |
order += "disk /" | |
order += "run_watch DHCP" | |
#order += "run_watch VPN" | |
order += "wireless _first_" | |
order += "ethernet _first_" | |
order += "battery 0" | |
order += "load" | |
order += "cpu_temperature 0" | |
order += "volume master" | |
order += "tztime local" | |
wireless _first_ { | |
format_up = "W: (%quality at %essid) %ip" | |
format_down = "W: down" | |
} | |
ethernet _first_ { | |
# if you use %speed, i3status requires root privileges | |
format_up = "E: %ip (%speed)" | |
format_down = "E: down" | |
} | |
#battery 0 { | |
#format = "%status %percentage %remaining" | |
#} | |
battery 0 { | |
format = "⚡: %percentage %remaining" | |
format_down = "No battery" | |
#status_chr = "⚇ CHR" | |
#status_bat = "⚡ BAT" | |
#status_full = "☻ FULL" | |
path = "/sys/class/power_supply/BAT%d/uevent" | |
low_threshold = 10 | |
} | |
run_watch DHCP { | |
pidfile = "/var/run/dhcpcd*.pid" | |
} | |
#run_watch VPN { | |
#pidfile = "/var/run/vpnc/pid" | |
#} | |
tztime local { | |
format = "%m-%d %a %H:%M:%S" | |
} | |
load { | |
format = "L: %1min" | |
} | |
disk "/" { | |
format = "/: %avail" | |
} | |
volume master { | |
format = ": %volume" | |
format_muted = ": muted (%volume)" | |
device = "default" | |
mixer = "Master" | |
mixer_idx = 0 | |
} | |
cpu_temperature 0 { | |
format = "T: %degrees °C" | |
#path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input" | |
path = "/sys/class/thermal/thermal_zone0/temp" | |
} |
This file contains 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
#!/usr/bin/env bash | |
COLOR_PLAYING="#66CCFF" | |
COLOR_PAUSED="#00FF00" | |
COLOR_STOPPED="#FF0000" | |
if mpc | grep -q 'playing'; then | |
PLAYING="♫: $(mpc | head -n1) $(mpc | grep "playing" | awk '{print $3}')" | |
COLOR_CODE=$COLOR_PLAYING | |
elif mpc | grep -q 'paused'; then | |
PLAYING="♫: $(mpc | head -n1) $(mpc | grep "paused" | awk '{print $3}')" | |
COLOR_CODE=$COLOR_PAUSED | |
else | |
PLAYING="♫: STOPPED" | |
COLOR_CODE=$COLOR_STOPPED | |
fi | |
echo -n "{\"name\":\"mpd\",\"color\":\"$COLOR_CODE\",\"full_text\":\"$PLAYING\"}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment