summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Neumann <rene.neumann@in.tum.de>2013-05-31 10:34:28 +0200
committerRené Neumann <rene.neumann@in.tum.de>2013-05-31 10:34:29 +0200
commite71213f88ea9687bf7ac7f299826a1505d623e43 (patch)
treed823681b347f233fa6f2ee038ae469248e68b213
parent715e8a3e714753a1dd3810ef87fa43b636b0e913 (diff)
downloaddotfiles-e71213f88ea9687bf7ac7f299826a1505d623e43.tar.gz
dotfiles-e71213f88ea9687bf7ac7f299826a1505d623e43.tar.bz2
dotfiles-e71213f88ea9687bf7ac7f299826a1505d623e43.zip
Some i3 / conky changes
-rw-r--r--.i3/config5
-rw-r--r--.i3/conkyrc61
-rw-r--r--.i3/scripts/json_escape.lua20
3 files changed, 55 insertions, 31 deletions
diff --git a/.i3/config b/.i3/config
index 16f7210..0841b08 100644
--- a/.i3/config
+++ b/.i3/config
@@ -29,7 +29,7 @@ bar {
font pango:Inconsolata 9
status_command $dir/scripts/conkystatus.sh
position top
- tray_output DVI-I-2
+ tray_output primary
}
# Key Bindings «1
@@ -187,5 +187,8 @@ for_window [class="^feh$"] floating enable
for_window [class="^(?i)thunderbird$"] floating enable
for_window [class="^(?i)thunderbird$" instance="MsgCompose"] floating disable
for_window [class="^(?i)thunderbird$" instance="Mail"] floating disable
+assign [class="^(?i)thunderbird$"] → mail
+# Firefox stuff
+for_window [class="^(?i)firefox$" instance="Browser"] floating enable
# vim: ft=i3 fdm=marker fmr=«,»
diff --git a/.i3/conkyrc b/.i3/conkyrc
index f64b3e4..250746e 100644
--- a/.i3/conkyrc
+++ b/.i3/conkyrc
@@ -3,9 +3,10 @@ own_window no
out_to_console yes
background no
max_text_width 0
+double_buffer no
# Update interval in seconds
-update_interval 2.0
+update_interval 2.5
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
@@ -39,34 +40,34 @@ template0 "$HOME/.i3/icons/\1.xbm"
TEXT
# JSON for i3bar
-[
+[ \
${if_mpd_playing}{
- "full_text" : "${lua json ${mpd_smart}}",
- "icon" : ${if_match "${mpd_status}"=="Paused"}${template0 pause}${else}${template0 mpd}${endif}
- },${endif}
- {
- "full_text" : "${cpu}%",
- "icon" : ${template0 cpu},
- "min_width" : "99%", "align" : "right"
- },
- {
- "full_text" : "${mem}",
- "icon" : ${template0 load},
- "min_width" : "1000M",
- "color" : "\#${if_match ${memperc}<90}ffffff${else}ff0000${endif}"
- },
- {
- "full_text" : "${platform coretemp.0 temp 2}°C${platform f71882fg.2560 temp 2}°C \
-${execi 30 nvidia-settings -query GPUCoreTemp | perl -n -e'/Attribute.*: (.*).$/ && print $1'}°C",
- "icon" : ${template0 temp}
- },
- {
- "full_text" : "${if_up eth0}${addr}${else}(down)${endif}",
- "icon" : ${template0 net-wired},
- "color" : "\#${if_up eth0}ffffff${else}ff0000${endif}"
- },
- {
- "full_text" : "${time %a, %d. %b %R}",
- "color" : "\#40B5D6"
- }
+ "full_text" : "${lua json ${mpd_smart}}"\
+ "icon" : ${if_match "${mpd_status}"=="Paused"}${template0 pause}${else}${template0 mpd}${endif} \
+ },${endif}\
+ {\
+ "full_text" : "${cpu}%",\
+ "icon" : ${template0 cpu},\
+ "min_width" : "99%",\
+ "align" : "right"\
+ },\
+ {\
+ "full_text" : "${mem}",\
+ "icon" : ${template0 load},\
+ "min_width" : "1000M",\
+ "color" : "\#${if_match ${memperc}<90}ffffff${else}ff0000${endif}"\
+ },\
+ {\
+ "full_text" : "${platform coretemp.0 temp 2}°C${platform f71882fg.2560 temp 2}°C ${execi 30 nvidia-settings -query GPUCoreTemp | perl -n -e'/Attribute.*: (.*).$/ && print $1'}°C",\
+ "icon" : ${template0 temp}\
+ },\
+ {\
+ "full_text" : "${if_up eth0}${addr}${else}(down)${endif}",\
+ "icon" : ${template0 net-wired},\
+ "color" : "\#${if_up eth0}ffffff${else}ff0000${endif}"\
+ },\
+ {\
+ "full_text" : "${time %a, %d. %b %R}",\
+ "color" : "\#40B5D6"\
+ } \
],
diff --git a/.i3/scripts/json_escape.lua b/.i3/scripts/json_escape.lua
index 03860b7..1715738 100644
--- a/.i3/scripts/json_escape.lua
+++ b/.i3/scripts/json_escape.lua
@@ -1,3 +1,23 @@
function conky_json(str)
return string.gsub(conky_parse(str), '[\\"]', '\\%1')
end
+
+function conky_i3(...)
+ d = "{"
+ key = true
+ for i,v in ipairs(arg) do
+ if key then
+ d = d .. "\"" .. v .. "\":"
+ key = false
+ else
+ d = d .. conky_parse(v)
+ if string.sub(v, -1) == '"' then
+ if i < table.getn(arg) then d = d .. "," end
+ key = true
+ else
+ d = d .. " "
+ end
+ end
+ end
+ return d .. "}"
+end