You are not logged in.
but i cant remember how to put fortune cookies on it :-(
anyone kind enough to help ?
how often do you want them to change?
assuming once an hour:
${execi 3600 fortune}
Offline
than you very much ohnonot : )
at the beginning there was darkness then came light
Offline
How can I get the path to the lua script loaded in the conky? If a script is invoked from terminal, argv[0] contains the full path to the script, but this isn't available when it is invoked from lua_load in conky.
I have a lua file, say clock.lua. I have separated the often used functions in a separate file called helpers.lua. The user settings go in yet another file called settings.lua. Then in clock.lua, I can just use
require 'settings'
require 'helpers'
However, this simple import fails when conky is invoked from a path outside of where these files reside. If we have the path to clock.lua, I can add it to the lua module search path.
Currently, I use debug.getinfo to get this path like so
local p = debug.getinfo(1,'S').source:match("@(.*/).*.lua")
package.path = string.format("%s;%s?.lua", package.path, p)
Is there an easier, more straightforward way to make sure that lua always finds the modules?
Offline
my conky
That's a nice conky.
I'm wondering: Do you usually see some processes named "kworker /1:1" (or similar) and "sh" on the processes top list?
Offline
I'm wondering: Do you usually see some processes named "kworker /1:1" (or similar) and "sh" on the processes top list?
AFAIK kworker is a kernel process thread. sh refers to your shell, which if you're using Debian (or derivatives) is linked to dash. Both kworker and dash are lightweight and you'd see them on process list if you don't have anything much running. kworker can sometimes use resources whenever kernel needs such resources, but that shouldn't be often.
Offline
How can I get the path to the lua script loaded in the conky?
^ I'm not sure I understand...
I have a mistake in lua at the moment. Therefore after @wlourf
>snip 1.10
lua_load = '~/path_to_easysid/helpers.lua ~/path_to_easysid/settings.lua',
lua_draw_hook_pre = 'main', --or post = 'main',
conky.text = [[
${texeci 1800 sh -c '/path_to_system_easysid/LUA-script.sh'}
<snip
or in the clock.lua
...
dofile (usrhome .. "/path_to_easysid/helpers.lua")
dofile (usrhome .. "/path_to_easysid/settings.lua")
..
conkyrc
...
lua_load = '~/path_to_easysid/clock.lua
lua_draw_hook_pre = 'main', --or post = 'main',
conky.text = [[
${texeci 1800 sh -c '/path_to_system_easysid/LUA-script.sh'}
..
I have no idea ?
nevertheless https://forum.ubuntu-fr.org/viewtopic.p … 9#p3948329
Last edited by unklar (2018-01-20 20:47:02)
Offline
>snip 1.10 lua_load = '~/path_to_easysid/helpers.lua ~/path_to_easysid/settings.lua', lua_draw_hook_pre = 'main', --or post = 'main', conky.text = [[ ${texeci 1800 sh -c '/path_to_system_easysid/LUA-script.sh'} <snip
or in the clock.lua
... dofile (usrhome .. "/path_to_easysid/helpers.lua") dofile (usrhome .. "/path_to_easysid/settings.lua") ..
conkyrc
... lua_load = '~/path_to_easysid/clock.lua lua_draw_hook_pre = 'main', --or post = 'main', conky.text = [[ ${texeci 1800 sh -c '/path_to_system_easysid/LUA-script.sh'} ..
These hardcoded paths are what I am looking to avoid.
Say I have a folder hierarchy like so
conky_folder
|
|__SomeConky
|
|__images/
|__conky.conf
|__someconky.lua
|__settings.lua
|__helpers.lua
The only place where the user should change the path is in the conky.conf, to load one lua file (someconky.lua). All other paths like images, and helper scripts should be taken care of by that lua script itself, using its own path.
Maybe I am all wrong, and there is just an easier way to achieve all this.
Offline
There are multiple files, and icons. So you'd have to download the archive from deviantart
Offline
martix wrote:I'm wondering: Do you usually see some processes named "kworker /1:1" (or similar) and "sh" on the processes top list?
AFAIK kworker is a kernel process thread. sh refers to your shell, which if you're using Debian (or derivatives) is linked to dash. Both kworker and dash are lightweight and you'd see them on process list if you don't have anything much running. kworker can sometimes use resources whenever kernel needs such resources, but that shouldn't be often.
Thank you for the details. Actually I just - accidentaly - discovered something that makes me perplex. This line
Volume:$color${exec amixer -c 0 get Master | grep Mono: | cut -d " " -f6}
was responsible for the process called sh in the process list on conky!
It was there All THE TIME and for the life of me I could not figure out why. Once I commented out this line in conkyrc, it just disappeared from the process list, I NEVER saw it again. Does someone maybe have an idea or explanation what is going on with that line showing the volume level? (btw which worked without issues in conky)
And let me add: Since I commented out that line I saw processes called "bash" and "sudo", which I hardly saw before. And I'd like to also add that I had conky-crashes from time to time (not very often, not at every session, but sometimes the conky just disappeared from the desktop, had to start it again).
As for kworker: I have always - several - kworker processes on the list like kworker/u8:10 or kworker/2:2 or kworker/3:1, which are changing constantly. Isn't that normal?
Last edited by martix (2018-01-22 21:54:24)
Offline
exec is starting the sh process to run the amixer command.
Offline
^Yeah, it looks like that. It's a bit surprising though that the process for this simple command was in the top ten almost all the time. Btw it's also works in terminal, but in that case I do not get an sh process shown but instead of that there is bash after opening the terminal. I never saw bash on the list while using the terminal before.
Btw did anyone maybe manage to show e.g. the top 15 processes in conky (i.e. more than 10)?
Offline
Offline
Thanks, although if you recall - you actually cleaned up the code for it when it was my rainbow conky on the #! forums.
Here's the code for the blue-whie-gray one:
Enjoy.
thanks, here I've began to tweak it to fit my computer needs, (is my first conky tweak yes)
I just have a question:
how can I average the running processes in the same way that one averages the cpu in the lines ?:
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 8
I set it to refresh each 0.1 secs, I love the real time feeling, but the processes keep bouncing so fast that is useless to have that info there really...
and I commented the last parts because for some reason they didnt work.
here is my conky:
# Create own window instead of using desktop
own_window yes
own_window_hints undecorated,below,sticky,skip_pager,skip_taskbar
# normal, desktop, override
own_window_type normal
# Use pseudo transparency with own_window?
own_window_transparent yes
# If own_window_transparent is set to no, you can set the background colour here
#own_window_colour black
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer yes
# Use Xft?
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
#minimum_size 200 5
maximum_width 260
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
draw_graph_borders yes
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 1
# border margins
#border_margin 10 ########################## NO
border_inner_margin 10
# border width
border_width 1
# Set conky on the bottom of all other applications
####################################################### own_window_hints below
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
override_utf8_locale yes
xftfont Liberation Mono:bold:size=8
xftalpha 0.5
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Subtract file system buffers from used memory?
no_buffers yes
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 1
##########
# Colors #
##########
color0 B0E0E6 # PowderBlue
color1 6E7F80 # Light Blue Gray
color2 536872 # Blue-ish
color3 007777 # Aqua
color4 536878 # Mist
color5 CCCCCC # Gray80
color6 543F9F # Dark Blue
color7 777777 # Greyish
color8 888888 # Steel Grey
color9 708090 # Hex Slate Gray
# Default colors and also border colors, grey90 == #e5e5e5
default_color 808080
default_shade_color gray
default_outline_color gray
TEXT
#########
# Clock #
#########
${alignc 13}${color3}${font Mono:size=12}${time %I:%M %p}${font}
${alignc 13}${color1}${font Mono:size=10}${time %A, %B %d %Y}${font}
${font Mono:size=10}${goto 51}${color}SU MO ${color0}${time %b %Y}${color} FR SA
${goto 51}${color0}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color0}/' | sed ':a;N;$!ba;s/\n/\n${goto 51}/g'}${color}${font}
#################
# MISC SYS INFO #
#################
${color3}${alignc}${font Mono:size=10} ${pre_exec cat /etc/issue.net}${font}
${color8}Kernel: ${color5}$kernel${color8}
Uptime: ${color5}$uptime${color}
${color8}Battery:${color5} ${battery}
${color8}Time Rem:${color5}${battery_time} ${battery_bar 6,75} ${color}
##########
#CPU TEMP#
##########
${color6}CPU Usage ${hr 2}${color}
${color8}CPU: ${color5}Intel Core i5 M520 @ 2.4GHz${color}
${color8}Frequency: ${color5}${alignr}$freq_g GHz${color}
${color8}CPU Fan Speed: ${color5}${execi 2 cat /sys/devices/platform/thinkpad_hwmon/fan1_input}${color} RPM
${cpugraph cpu1 18,260 999999 777777}
${voffset -22}${goto 60}${color0}CORE 0: ${color2}${cpubar cpu1 9,77} ${color4} ${execi 1 sensors | grep "Core 0:" | cut -d+ -f2 | cut -c1-2}${color7}°C @ ${color3}${cpu cpu1}%${color}
${cpugraph cpu2 18,260 999999 777777}
${voffset -22}${goto 60}${color0}CORE 1: ${color2}${cpubar cpu2 8,77} ${color4} ${execi 1 sensors | grep "Core 0:" | cut -d+ -f2 | cut -c1-2}${color7}°C @ ${color3}${cpu cpu2}%${color}
${cpugraph cpu3 18,260 999999 777777}
${voffset -22}${goto 60}${color0}CORE 2: ${color2}${cpubar cpu3 8,77} ${color4} ${execi 1 sensors | grep "Core 2:" | cut -d+ -f2 | cut -c1-2}${color7}°C @ ${color3}${cpu cpu3}%${color}
${cpugraph cpu4 18,260 999999 777777}
${voffset -22}${goto 60}${color0}CORE 3: ${color2}${cpubar cpu4 8,77} ${color4} ${execi 1 sensors | grep "Core 2:" | cut -d+ -f2 | cut -c1-2}${color7}°C @ ${color3}${cpu cpu4}%${color}
#####################
# DRIVES AND MEMORY #
#####################
${color6}RAM & Disk Usage ${hr 2}
${color8}RAM:${color0}${alignc}${offset 25}$mem${color4} | ${color3}$memmax${alignr}$memperc%${color}
${membar 5,260}
Linux${color0}${alignc}${offset 32}${fs_used /boot}${color4} | ${color3}${fs_size /boot} ${alignr} ${fs_free_perc /boot}%${color}
${fs_bar 3,260 /boot}
# Windows${color0}${alignc}${offset 20}${fs_used /media/mike/EVO}${color4} | ${color3}${fs_size /media/mike/EVO}${alignr}${fs_free_perc /media/mike/EVO}%${color}
# ${fs_bar 3,260 /media/mike/EVO}
SD Card${color0}${alignc}${offset 20}${fs_used /media/temetka/CHIP}${color4} | ${color3}${fs_size /media/temetka/CHIP}${alignr}${fs_free_perc /media/temetka/CHIP}%${color}
${fs_bar 3,260 /media/temetka/CHIP}
###########################
# Top 5 Running Processes #
###########################
${color6}Top 5 Processes ${hr 2}
${offset -11}${color0}${top cpu 1}%${alignc}${offset 30}${top name 1}$alignr${top pid 1}
${offset -11}${color2}${top cpu 2}%${alignc}${offset 30}${top name 2}$alignr${top pid 2}
${offset -11}${color4}${top cpu 3}%${alignc}${offset 30}${top name 3}$alignr${top pid 3}
${offset -11}${color7}${top cpu 4}%${alignc}${offset 30}${top name 4}$alignr${top pid 4}
${offset -11}${color3}${top cpu 5}%${alignc}${offset 30}${top name 5}$alignr${top pid 5}
################
# Network Info #
################
${color6}Network Analysis ${hr 2}
${if_existing /proc/net/route wlan0}${color0}IP Address ${color}${alignr}${color0}${addr wlan0}
${color2}SSID ${color2}${alignr}${wireless_essid wlan0}
${color4}Signal Strength ${color4}${alignr}${wireless_link_qual_perc wlan0}% ${wireless_link_bar 8,75 wlan0}
${color0}Incoming:${alignc}${color2}${offset 30}${downspeedf wlan0}$alignr${color7}KB/s${color}
${color8}${downspeedgraph wlan0 15,260 999999 777777}${color}
${color3}${voffset -17}${alignc}${totaldown wlan0}${color}
${color0}Outgoing:${alignc}${color2}${offset 30}${upspeedf wlan0}$alignr${color7}KB/s${color}
${color8}${upspeedgraph wlan0 15,260 999999 777777}${color}
${color3}${voffset -17}${alignc}${totalup wlan0}${color}
################
# WEATHER INFO #
################
# This weather info uses the 1a weather script found on the Crunchbang forums
## ${execi 600 bash $HOME/1a_accuweather_conkyweather_font/1a}
${font conkyweather:size=35}${execi 600 sed -n '2p' ~/1a_accuweather_conkyweather_font/curr_cond}${font}
${voffset -38}${goto 70}${color2}CURRENTLY ${execpi 600 sed -n '4p' $HOME/1a_accuweather_conkyweather_font/curr_cond}°F${color}
${goto 70}${color3}${execpi 600 sed -n '3p' $HOME/1a_accuweather_conkyweather_font/curr_cond}${color}
${font conkyweather:size=35}${execi 600 sed -n '2p' ~/1a_accuweather_conkyweather_font/tod_ton}${font}
${voffset -38}${color2}${goto 70}${execpi 600 sed -n '1p' $HOME/1a_accuweather_conkyweather_font/tod_ton} \
${execpi 600 sed -n '4p' $HOME/1a_accuweather_conkyweather_font/tod_ton}°F / \
${execpi 600 sed -n '5p' $HOME/1a_accuweather_conkyweather_font/tod_ton}°F${color2}
${goto 70}${color3}${execpi 600 sed -n '3p' $HOME/1a_accuweather_conkyweather_font/tod_ton}${color}
${font conkyweather:size=35}${execi 600 sed -n '7p' ~/1a_accuweather_conkyweather_font/tod_ton}${font}
${voffset -38}${color2}${goto 70}${execpi 600 sed -n '6p' $HOME/1a_accuweather_conkyweather_font/tod_ton} \
${execpi 600 sed -n '9p' $HOME/1a_accuweather_conkyweather_font/tod_ton}°F / \
${execpi 600 sed -n '10p' $HOME/1a_accuweather_conkyweather_font/tod_ton}°F${color2}
${goto 70}${color3}${execpi 600 sed -n '8p' $HOME/1a_accuweather_conkyweather_font/tod_ton}${color}
And if something I would enjoy more than a blowjob and a couple of cocain lines right now is to be able to make a radial graqph with the use of the 12 cpus, i really find no understandable tut for making that happen... so if someone can ilustrate, ill be more than greatfull!!
But why would you do that!?
Because Black Metal, Thats why!
Offline
Hello
@ easysid
i transform you calendar & i would have any space between
JanvierFévier
MardiMercredii don't found it
http://pix.tdct.org/upload/thumb/1516707476.png
tanks
&
@+
post your settings_t2 table here, specifically the
names = {}
most probaly these spaces are in your names table.
Last edited by easysid (2018-01-23 15:55:38)
Offline
Ok here
settings_t2 = { -- This table draws the horizontal text - day, and month
{
arg='%m', -- month in decimal format. See man date, or strftime
max=12,
x = 238,
y = 180,
size = 16,
trail = 24,
left_pad = 76, -- left side padding to make space for date
-- translate the following table for your own language
names = {" Janvier "," Février "," Mars "," Avril "," Mai "," Juin "," Juillet ",
" Aout "," Septembre "," Octobre " ," Novembre "," Décembre "}
},
{
arg='%u', -- day of the week. See man date, or strftime
max=7,
x = 240,
y = 200,
size = 14,
trail = 26,
left_pad = 76, -- left side padding to make space for date
-- translate the following table for your own language
names = {" Lundi ", " Mardi ", " Mercredi ",
" Jeudi ", " Vendredi ", " Samedi ", " Dimanche "}
}
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
names = {" Janvier "," Février "," Mars "," Avril "," Mai "," Juin "," Juillet ",
" Aout "," Septembre "," Octobre " ," Novembre "," Décembre "}
:
:
names = {" Lundi ", " Mardi ", " Mercredi ",
" Jeudi ", " Vendredi ", " Samedi ", " Dimanche "}
Remove the spaces around the names.
names = {"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet",
"Aout", "Septembre", "Octobre", "Novembre", "Décembre"}
:
:
names = {"Lundi", "Mardi", "Mercredi",
"Jeudi", "Vendredi", "Samedi", "Dimanche"}
Also it would be better if you used upper case letters. Although I'll fix this in the script.
Last edited by easysid (2018-01-23 16:35:10)
Offline
ok but yet i have no spaces everywhere & i want any spaces i think it looks better
if it does not work, it does not matter
Last edited by loutch (2018-01-23 16:50:01)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
ok but yet i have no spaces everywhere & i want any spaces i think it looks better
if it does not work, it does not matter
Having spaces is trivial, but would probaly require a change in code, if having those spaces in the names didn't do it. FWIW, all of this manipulation with the array is required because we didn't want spaces, and wanted one long continuous string.
Offline
OK, Thanks
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
https://forums.bunsenlabs.org/viewtopic … 086#p67086
@easysid,
I have these 2 mistakes in the terminal
conky: llua_do_call: function conky_main execution failed: /home/unklarer/duo/helpers.lua:160: bad argument #1 to 'match' (string expected, got nil)
conky: llua_do_call: function conky_main execution failed: /home/unklarer/duo/duo.lua:77: attempt to index global 'conditions' (a nil value)
...
...
starting point
..
]]
weather_url = "http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
--weather_url = "https://www.accuweather.com/en/in/delhi/202396/current-weather/202396"
weather_update_time = 600
...
Offline