From 2be3fa61d53efaf9a0c7aa72295a8f03c14d59c8 Mon Sep 17 00:00:00 2001 From: Thek4n Date: Mon, 13 Nov 2023 11:25:48 +0300 Subject: [PATCH] conky migration start --- home/user/.config/i3/config | 3 +- home/user/.conkyrc | 47 ++++++++++++++++++++++++++++++++ home/user/.local/bin/conky-i3bar | 13 +++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 home/user/.conkyrc create mode 100755 home/user/.local/bin/conky-i3bar diff --git a/home/user/.config/i3/config b/home/user/.config/i3/config index c4972b0..ba6c702 100644 --- a/home/user/.config/i3/config +++ b/home/user/.config/i3/config @@ -21,7 +21,6 @@ exec --no-startup-id nitrogen --restore; sleep 1; picom -b --config ~/.config/pi exec --no-startup-id hsetroot exec --no-startup-id feh --randomize --no-fehbg --bg-scale $HOME/.wallpaper/* - font xft:FiraCode 12 # Use pactl to adjust volume in PulseAudio. @@ -194,7 +193,7 @@ bar { output primary output nonprimary tray_output primary - status_command exec ~/.local/bin/i3status_wrapper + status_command exec ~/.local/bin/conky-i3bar font xft:FiraCode 13 } diff --git a/home/user/.conkyrc b/home/user/.conkyrc new file mode 100644 index 0000000..1f72322 --- /dev/null +++ b/home/user/.conkyrc @@ -0,0 +1,47 @@ +conky.config = { + out_to_x = false, + own_window = false, + out_to_console = true, + background = false, + max_text_width = 0, + + -- Update interval in seconds + update_interval = 2.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 = true, + + -- 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 = false, + + -- number of cpu samples to average + -- set to 1 to disable averaging + cpu_avg_samples = 2, +}; + +conky.text = [[ +[ + { "full_text": " (${wireless_link_qual_perc}% at ${wireless_essid}) ${addr}" , "color": "\#00ff00" }, + { "full_text": " ${addr}" , "color": "\#00ff00" }, + { "full_text": "/ ${fs_used /}/${fs_size /}" , "color": "\#ffffff" }, + { "full_text": " ${fs_used /home}/${fs_size /home}" , "color": "\#ffffff" }, + { "full_text": " ${mem}/${memmax}" , "color": ${if_match ${memperc}<90}"\#ffffff"${else}"\#ff0000"${endif} }, + { "full_text": " ${cpu}%" , "color": ${if_match ${cpu}<90}"\#ffffff"${else}"\#ff0000"${endif} }, + { "full_text": " ${acpitemp}°" , "color": "\#ffffff" }, + { "full_text": "${time  %d.%m.%y %a  %H:%M}", "color": "\#ffffff" } +], +]]; diff --git a/home/user/.local/bin/conky-i3bar b/home/user/.local/bin/conky-i3bar new file mode 100755 index 0000000..ab28d56 --- /dev/null +++ b/home/user/.local/bin/conky-i3bar @@ -0,0 +1,13 @@ +!/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: +exec conky -c $HOME/.conkyrc