Skip to content

Instantly share code, notes, and snippets.

@bhcopeland
Last active August 29, 2015 14:13
Show Gist options
  • Save bhcopeland/15ea5c0b087feed8ffd6 to your computer and use it in GitHub Desktop.
Save bhcopeland/15ea5c0b087feed8ffd6 to your computer and use it in GitHub Desktop.
i3 setup for desktop and laptop. Dependences: dunst, conky. feh, conkyclementine, Faenza-Dark-Icon, Faenza-Dark, mediterraneannight-theme
### Conky configuration file
## No output to X <yes/no>
out_to_x no
## Create own window to draw <yes/no>
own_window no
## Print everything to console?
out_to_console yes
## Use double buffering (reduces flicker, not needed for console output)
double_buffer no
## Set to yes if you want Conky to be forked in the background
background no
## Update interval in seconds
update_interval 1.0
## This is the number of times Conky will update before quitting.
## Set to zero to run forever.
total_run_times 0
## Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes
## How strict should if_up be when testing an interface for being up?
## The value is one of up, link or address, to check for the interface
## being solely up, being up and having link or being up, having link
## and an assigned IP address.
if_up_strictness address
## Add spaces to keep things from moving about? This only affects certain objects.
## use_spacer should have an argument of left, right, or none
use_spacer left
## Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
## number of cpu samples to average
## set to 1 to disable averaging
cpu_avg_samples 2
## Stuff after 'TEXT' will be formatted on screen
TEXT
[
#{
# "full_text": "CPU ${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%",
# "color": "\#e39792"
#},
{"full_text": " ■ [$cpubar] ", "color":"\#00A9B5"},
{"full_text": " ■ [$loadavg] ", "color":"\#00A9B5"},
{"full_text": "C:${execpi 2 sensors|grep Physical|cut -c18-21}°C", "color": "\#eec68b"},
{"full_text":"G:${execpi 5 nvidia-smi -q -d TEMPERATURE | grep 'GPU Current Temp' | cut -c39-40|head -n1}", "color": "\#bc8bee"},
{"full_text":"G:${execpi 5 nvidia-smi -q -d TEMPERATURE | grep 'GPU Current Temp' | cut -c39-40|tail -1}", "color": "\#bc8bee"},
{"full_text": "RAM ${mem}/${memmax}", "color": "\#e6ee8b"},
{"full_text": "${if_running clementine}${if_match "${execi 5 conkyClementine --datatype=ST}" == "Playing"}►${font Droid Sans:bold:size=10}${color0} ${execi 5 conkyClementine --datatype=AR} - ${execi 5 conkyClementine} (${execi 5 conkyClementine --datatype=BR}kbps)${endif} ", "color": "\#eec68b"},
#{"full_text": " ♪ ${moc_artist}", "color":"\#268BD2"},
{"full_text": "/ ${fs_free /}", "color": "\#8beea1"},
{"full_text":"eno1 ▼ ${downspeed eno1}/s ▲ ${upspeed eno1}/s", "color": "\#8be4ee"},
#{"full_text":"wlp2s0 ${downspeed wlp2s0}/s ${upspeed wlp2s0}/s", "color": "\#8bc0ee"},
{"full_text": " ↑ [${uptime}] ","color": "\#dc322f"},
{"full_text":"${time %Y-%m-%d %a} ${time %H:%M}", "color": "\#bc8bee"}],
### Conky configuration file
## No output to X <yes/no>
out_to_x no
## Create own window to draw <yes/no>
own_window no
## Print everything to console?
out_to_console yes
## Use double buffering (reduces flicker, not needed for console output)
double_buffer no
## Set to yes if you want Conky to be forked in the background
background no
## Update interval in seconds
update_interval 1.0
## This is the number of times Conky will update before quitting.
## Set to zero to run forever.
total_run_times 0
## Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes
## How strict should if_up be when testing an interface for being up?
## The value is one of up, link or address, to check for the interface
## being solely up, being up and having link or being up, having link
## and an assigned IP address.
if_up_strictness address
## Add spaces to keep things from moving about? This only affects certain objects.
## use_spacer should have an argument of left, right, or none
use_spacer left
## Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
## number of cpu samples to average
## set to 1 to disable averaging
cpu_avg_samples 2
## Stuff after 'TEXT' will be formatted on screen
TEXT
[
#{
# "full_text": "CPU ${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%",
# "color": "\#e39792"
#},
{"full_text": " ■ [$cpubar] ", "color":"\#00A9B5"},
{"full_text": " ■ [$loadavg] ", "color":"\#00A9B5"},
{"full_text": "C:${execpi 2 sensors|grep Physical|cut -c18-21}°C", "color": "\#eec68b"},
{"full_text": "RAM ${mem}/${memmax}", "color": "\#e6ee8b"},
{"full_text": "${if_running clementine}${if_match "${execi 5 conkyClementine --datatype=ST}" == "Playing"}►${font Droid Sans:bold:size=10}${color0} ${execi 5 conkyClementine --datatype=AR} - ${execi 5 conkyClementine} (${execi 5 conkyClementine --datatype=BR}kbps)${endif} ", "color": "\#eec68b"},
#{"full_text": " ♪ ${moc_artist}", "color":"\#268BD2"},
{"full_text": "/ ${fs_free /}", "color": "\#8beea1"},
{ "full_text" : "sda ${diskio_read sda}/${diskio_write sda}", "color": "\#8beea1" },
#{"full_text":"eno1 ▼ ${downspeed eno1}/s ▲ ${upspeed eno1}/s", "color": "\#8be4ee"},
#{"full_text": "${wireless_essid wlp3s0} | ${wireless_link_qual wlp3s0}", "color": "\#8be4ee"},
#{"full_text":"wlp2s0 ${downspeed wlp2s0}/s ${upspeed wlp2s0}/s", "color": "\#8bc0ee"},
{ "full_text" : "${if_up wlp3s0}${wireless_bitrate wlp3s0}${wireless_link_qual wlp3s0}% - ${wireless_essid wlp3s0} ${else}wlan${endif}" , "color" : ${if_up wlp3s0}"\#00ff00"${else}"\#ff0000"${endif} },
{ "full_text" : "${battery} ${battery_time}", "color" : ${if_match ${battery_percent}<20}"\#ff0000"${else}"\#ffffff"${endif} },
{"full_text": " ↑ [${uptime}] ","color": "\#dc322f"},
{"full_text":"${time %Y-%m-%d %a} ${time %H:%M}", "color": "\#bc8bee"}],
#!/bin/sh
# Send the header so that i3bar knows we want to use JSON:
echo '{"version":1}'
# Begin the endless array.
echo '['
# We send an empty first array of blocks to make the loop simpler:
echo '[],'
# Now send blocks with information forever:
# use this if i3-status bar produces parsing error
#if [ ! -f /tmp/conky-i3bar ]; then
# #sleep 16
# touch /tmp/conky-i3bar
#fi
exec conky -c $HOME/.conky/conky-i3bar
[global]
font = Terminus (TTF) 12
allow_markup = yes
format = "<b>%s</b>\n%b"
sort = yes
indicate_hidden = yes
alignment = left
bounce_freq = 0
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
# geometry [{width}]x{height}][+/-{x}+/-{y}]
geometry = "0-10+10"
shrink = no
transparency = 20
idle_threshold = 120
monitor = 0
follow = none
sticky_history = yes
history_length = 20
show_indicators = yes
line_height = 0
separator_height = 1
padding = 8
horizontal_padding = 8
separator_color = frame
startup_notification = false
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
[frame]
width = 1
color = "6092BE"
#color = "#6C6C6C"
[shortcuts]
#close = mod4+x
#close_all = mod4+ctrl+x
history = mod4+grave
context = ctrl+shift+period
[urgency_low]
background = "#6092BE"
foreground = "#FFFFFF"
#background = "#222222"
#foreground = "#888888"
timeout = 10
[urgency_normal]
background = "#6092BE"
foreground = "#FFFFFF"
#background = "#222222"
#foreground = "#888888"
timeout = 20
[urgency_critical]
background = "#801515"
foreground = "#D46A6A"
#background = "#900000"
#foreground = "#ffffff"
timeout = 0
[irc]
appname = weechat
timeout = 20
background = "#99FF33"
foreground = "#000000"
[HexChat]
appname = HexChat
timeout = 20
background = "#94DBFF"
foreground = "#000000"
[Settings]
gtk-theme-name = MediterraneanLight
gtk-font-name = Open Sans 11
gtk-fallback-icon-theme = Mint-X
gtk-icon-theme-name = Faenza-Dark
gtk-theme-name = "MediterraneanLight"
gtk-font-name = "Open Sans 11"
gtk-icon-theme-name = "Faenza-Dark"
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
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.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
font pango: Ubuntu Mono 10
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+semicolon 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
# 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
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+KP_1 workspace 1
bindsym $mod+KP_2 workspace 2
bindsym $mod+KP_3 workspace 3
bindsym $mod+KP_4 workspace 4
bindsym $mod+KP_5 workspace 5
bindsym $mod+KP_6 workspace 6
bindsym $mod+KP_7 workspace 7
bindsym $mod+KP_8 workspace 8
bindsym $mod+KP_9 workspace 9
bindsym $mod+KP_0 workspace 10
# move focused container to workspace
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
# 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 semicolon 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
# status_command i3status
status_command /home/ben/Scripts/conky-i3bar
tray_output GPU-0.DVI-I-2
colors{
background #232323
statusline #DCDCDC
}
}
exec xfce4-volumed
exec --no-startup-id whatpulse -delaystartup
exec dropboxd start
exec --no-startup-id skype
exec gpufan min
exec setxkbmap gb
exec clementine
exec compton -b
exec feh --bg-fill /home/ben/.config/variety/Favorites/wallpaper-332998.jpg
exec steam
# xfce4-notify
#for_window [class="Xfce4-notifyd"] floating enable;border none; focus mode_toggle; move absolute position 0 0
#for_window [class="Xfce4-notifyd"] floating enable;border none; focus mode_toggle
#for_window [class="^xfce4-notifyd$"] floating enable; border none; focus mode_toggle
# shutdown menu
bindsym $mod+Shift+p exec xfce4-session-logout
# xfce settings
bindsym $mod+Shift+s exec xfce4-settings-manager
bindsym Control+Alt+e exec Thunar
bindsym Print exec scrot '%Y-%m-%d-%T_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots/'
#bindsym $mod+Shift+e exec pygtk-shutdown
#for_window [instance="pygtk-shutdown"] floating enable;border none; focus mode_toggle;
for_window [instance="hipchat"] move container to output GPU-0.DVI-I-3
for_window [instance="hexchat"] move container to output GPU-0.DVI-I-3
for_window [instance="skype"] floating enable, move scratchpad, scratchpad show;
for_window [instance="Steam"] floating enable, move scratchpad, scratchpad show;
for_window [class="Skype" title="Information"] floating enable
for_window [class="Skype" title="Add to Chat"] floating enable
for_window [class="Skype" title="Profile for"] floating enable
for_window [class="Skype" title="Contact request from"] floating enable
for_window [class="Skype" title="Are you sure you want to call?"] floating enable
for_window [class="Skype" title="Rename"] floating enable
for_window [class="Skype" title="Search for Skype Contacts"] floating enable
for_window [instance="mono"] floating enable, move scratchpad, scratchpad show;
bindsym $mod+x move workspace to output right
bindsym $mod+z move workspace to output left
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
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.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
font pango:Terminus 16
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+semicolon 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
# 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
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
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 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
# 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 semicolon 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#
bar {
position top
status_command i3status
status_command /home/ben/Scripts/conky-i3bar-lappy
colors{
background #232323
statusline #DCDCDC
}
}
exec feh --bg-scale .config/variety/Favorites/3248978863_0482ce14fe_o.jpg
exec xfce4-volumed
exec --no-startup-id whatpulse -delaystartup
exec dropboxd start
exec --no-startup-id skype
exec gpufan min
exec setxkbmap gb
exec clementine
exec compton -b
for_window [class="Skype"] floating enable
#for_window [class="^xfce4-mixer$"] floating enable
# # Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
for_window [class="^xfce4-notifyd$"] floating enable; border none; focus mode_toggle
#kebyboard LED brightness
bindsym XF86KbdBrightnessDown exec --no-startup-id "cd /sys/class/leds/smc::kbd_backlight; cur=$(cat brightness); cur=$((cur-5)); if [ $cur -lt 0 ]; then cur=0; fi; echo $cur | sudo tee brightness "
bindsym XF86KbdBrightnessUp exec --no-startup-id "cd /sys/class/leds/smc::kbd_backlight; cur=$(cat brightness); cur=$((cur+5)); if [ $cur -gt 255 ]; then cur=255; fi; echo $cur | sudo tee brightness "
for_window [instance="hipchat"] move container to output GPU-0.DVI-I-3
for_window [instance="hexchat"] move container to output GPU-0.DVI-I-3
for_window [instance="skype"] floating enable, move scratchpad, scratchpad show;
for_window [instance="Steam"] floating enable, move scratchpad, scratchpad show;
for_window [class="Skype" title="Information"] floating enable
for_window [class="Skype" title="Add to Chat"] floating enable
for_window [class="Skype" title="Profile for"] floating enable
for_window [class="Skype" title="Contact request from"] floating enable
for_window [class="Skype" title="Are you sure you want to call?"] floating enable
for_window [class="Skype" title="Rename"] floating enable
for_window [class="Skype" title="Search for Skype Contacts"] floating enable
for_window [instance="mono"] floating enable, move scratchpad, scratchpad show;
bindsym $mod+x move workspace to output right
bindsym $mod+z move workspace to output left
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment