aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xconky/conkyrc.txt8
-rwxr-xr-xconky/start.sh14
-rwxr-xr-xconky/test.sh2
3 files changed, 19 insertions, 5 deletions
diff --git a/conky/conkyrc.txt b/conky/conkyrc.txt
index c082053..54ac074 100755
--- a/conky/conkyrc.txt
+++ b/conky/conkyrc.txt
@@ -27,16 +27,16 @@ conky.config = {
default_outline_color ='white', --Default outline colors
-- font = 'DejaVu Sans Mono:size=9', --Conky Text Font
alignment = 'top_right', --Text alignment
- gap_x = 10, --X gap between border of screen and text (same thing as passing -x at command line)
- gap_y = 25, --Y gap between border of screen and text (same thing as passing -y at command line)
+ gap_x = -1262,
+ gap_y = 120,
no_buffers = true, --Subtract file system buffers from used memory?
uppercase = false, --Set to True if you want all text to be in uppercase
cpu_avg_samples = 2, --Number of cpu samples to average. (set to 1 to disable averaging)
net_avg_samples = 2, --Number of net samples to average. (set to 1 to disable averaging)
override_utf8_locale = true, --Force UTF8? (Note that UTF8 support requires XFT)
use_spacer = 'right', --Add spaces to keep things from moving about? This only affects certain objects.
- text_buffer_size = 2048 --Text buffer size
-
+ text_buffer_size = 2048, --Text buffer size
+ alignment = top_left
}
diff --git a/conky/start.sh b/conky/start.sh
new file mode 100755
index 0000000..6bbc6cc
--- /dev/null
+++ b/conky/start.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+screens=$(xrandr | grep -cw connected);
+
+if [[ "$screens" -eq 2 ]];then
+ sed -i.bak 's/gap_x .*/gap_x = -1262,/' conkyrc.txt
+ sed -i.bak 's/gap_y .*/gap_y = 120,/' conkyrc.txt
+else
+ sed -i.bak 's/gap_x .*/gap_x = 10,/' conkyrc.txt
+ sed -i.bak 's/gap_y .*/gap_y = 20,/' conkyrc.txt
+fi
+
+killall -9 conky
+conky -c conkyrc.txt
diff --git a/conky/test.sh b/conky/test.sh
index 9227167..7108e59 100755
--- a/conky/test.sh
+++ b/conky/test.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# commend example
# sudo hddtemp /dev/sda
-if [ $(sensors | grep -P "k10temp-pci-00c3") == "k10temp-pci-00c3" ];then
+if [[ $(sensors | grep -P "k10temp-pci-00c3") == "k10temp-pci-00c3" ]];then
amdtemp=$(sensors | grep temp1 | grep "(high" | awk -F' ' '{print $2}' | cut -d+ -f2)
echo "\${color white}\${freq}MHz / $amdtemp (\${cpu cpu1}%) \${alignr}\${freq}MHz / $amdtemp (\${cpu cpu2}%)"
echo "\${color green}\${cpubar cpu1 5,120} \${alignr}\${color green}\${cpubar cpu2 5,120}"