Last active
August 29, 2015 14:00
-
-
Save winny-/11346616 to your computer and use it in GitHub Desktop.
Winny's take on the linux desktop
This file contains hidden or 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
alignment bm | |
background false | |
lua_load ~/.conkyrc.lua | |
update_interval 1 | |
own_window false | |
gap_x 0 | |
gap_y 0 | |
default_bar_size 975 10 | |
TEXT | |
${lua_parse color_battery_bar} |
This file contains hidden or 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
alignment tr | |
background false | |
update_interval 1 | |
own_window false | |
use_xft true | |
xftfont Droid Sans Mono:size=18:style=Regular | |
gap_x 5 | |
gap_y 5 | |
TEXT | |
${time %a %e %b %Y %k:%M %Z} |
This file contains hidden or 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
do | |
local battery = '0' | |
local file_ | |
function conky_color_battery_bar() | |
if is_discharging(battery) then | |
color = 'red' | |
else | |
color = 'white' | |
end | |
return '${color '..color..'}${battery_bar}${color}' | |
end | |
function is_discharging(battery) | |
if _file == nil then | |
local battery_status_path = '/sys/class/power_supply/BAT' .. | |
battery .. '/status' | |
print('Opening "'..battery_status_path..'"') | |
_file = io.open(battery_status_path) | |
end | |
_file:seek('set') | |
-- '*line' or num causes the same value be read over and | |
-- over again, even after it changes on disk... Not sure why. | |
local status = _file:read('*all') | |
-- Close file and excplicitly return false on read error. | |
if status == nil then | |
_file:close() | |
_file = nil | |
return false | |
end | |
status = trim(status) -- Remove trailing newline. | |
return status == 'Discharging' | |
end | |
function trim(s) | |
return (s:gsub('^%s*(.-)%s*$', '%1')) | |
end | |
end |
This file contains hidden or 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
(xbindkey '(mod4 p) "dmenu_run -fn -*-terminus-bold-*-*-*-*-280-*-*-*-*-iso10646-*") | |
(xbindkey '(mod4 o) "slock") | |
(xbindkey '(mod4 w) "chromium-browser") | |
(xbindkey '(mod4 q) "sh -c 'zenity --question --text \"Log off $USER?\" && pkill -9 evilwm'") | |
(xbindkey '("XF86AudioRaiseVolume") "amixer -c 0 sset 'Master',0 2dB+") | |
(xbindkey '("XF86AudioLowerVolume") "amixer -c 0 sset 'Master',0 2dB-") | |
;; Does not work -- controls 'Speaker' and 'Headphones' | |
;; do not toggle back from mute. | |
;; (xbindkey '("XF86AudioMute") "amixer set Master toggle") |
This file contains hidden or 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
#!/bin/sh | |
xbindkeys & | |
trayer --SetDockType false --widthtype request --edge top \ | |
--align left --transparent true --alpha 240 & | |
# Give trayer time to initialize before populating. | |
(sleep 2; bluetooth-applet & nm-applet &) & | |
setxkbmap -option \ | |
-option ctrl:swapcaps \ | |
-option compose:menu & | |
xsetroot -cursor_name left_ptr & | |
{ test -e ~/.fehbg && sh < ~/.fehbg; } & | |
conky -c ~/.conkyrc-bottom & | |
conky -c ~/.conkyrc-time & | |
exec evilwm -term gnome-terminal -mask1 mod4 -mask2 mod4 \ | |
-fn '-*-terminus-bold-*-*-*-*-280-*-*-*-*-iso10646-*' \ | |
-app panel -f -dock \ | |
-app xclock -f -dock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment