This Conky Config that I like a lot had a couple of issues when I tried to run it :
Old Syntax: downloaded Conky converter and changed some variable names by hand as well which fixed it
Missing some endif: I managed to find where it is, put it in there and fixed
Now Conky doesn't complain about anything but I still don't see it rendering anything, any help with figuring out what is the issue would be much appreciated.
The new config after the 2 steps mentioned above:
conky.config = {
-- By Jesse_Avalos , See me on Eye Candy Linux_ on Google +
background = true,
use_xft = true,
font = 'Roboto:size=9',
xftalpha = 0.8,
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
stippled_borders = 0,
border_inner_margin = 5,
border_width = 1,
default_color = '#000000',
default_shade_color = '#000000',
default_outline_color = '#000000',
minimum_width = 800, minimum_height = 800,
maximum_width = 800,
gap_x = 1060,
gap_y = 70,
alignment = 'top_right',
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
short_units = true,
text_buffer_size = 2048,
use_spacer = 'none',
override_utf8_locale = true,
--lua_load rings-v1.2.1.lua
lua_draw_hook_pre = 'ring_stats',
--lua_load lilas_rings.lua
lua_draw_hook_post = 'main',
-- Text settings #
use_xft = true,
xftalpha = 0,
font = 'TheNautiGal:bold:size=10',
override_utf8_locale = true,
--lua_load time.lua
-- Color scheme #
default_color = 'white',
color1 = '#212021',
color2 = '#B5B5B5',--E8E1E6
color3 = '#FFFFFF',
own_window_argb_value = 0,
own_window_argb_visual = true,
own_window_colour = '#000000',
};
conky.text = [[
${offset 110}${color2}${font Aliquam:size=74}${time %I}${color3}
${offset 110}${voffset -20}${font Aliquam:bold:size=74}${time %M}${font Aliquam::UltraLight:bold:size=12}${color2}
${offset 88}${voffset 10}${time %p - %A %B, %d}${font Aliquam:bold:size=65}${color3}
${image line.png -p 65,230 -s 2x330}
${offset 87}${voffset -225}${font Aliquam:bold:size=18}--- Weather ---
# --- Weather --- #
###################
\
# --- WOEID (Location id) --- #
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=1095209&u=c" -o ~/.cache/weather.xml}\
\
# --- Location name (city and country) --- #
############################################
\
${font Aliquam::UltraLight:bold:slsize=15}${offset 80}${voffset -15}${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} , ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
# --- Textual condition (e.g. Partly cloudy) --- #
##################################################
\
${font Aliquam::UltraLight:bold:slsize=15}${offset 80}${voffset -25}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
${offset 80}${voffset -5}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font Aliquam::UltraLight:bold:size=10} celsius
${offset 87}${voffset }${font Aliquam:bold:size=18}---- Spotify ----
${if_running spotify}${voffset -2}${font Aliquam::UltraLight:bold:slsize=15}
${voffset -35}${goto 80}Title : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset 2}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }${color4}${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset 2}Artist : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset -20}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$ }${color4}${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}Album : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset -18}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "album"|egrep -v "album"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }${color}${endif}
]];
I recommend that you run conky with your config on the command line in a terminal. If conky is encountering any errors in the config, something should be displayed in the terminal that may give a hint as to what's causing the issue.
Related
I want to search for multiple clauses with grep - and I know that one can use a pipe | to OR the clauses; so here is a test I'm trying on MSYS2, Windows 10:
$ uname -s
MSYS_NT-10.0-18363
$ git --version
git version 2.25.2
$ grep --version | head -1
grep (GNU grep) 3.0
$ git clone https://github.com/xythobuz/avrSerial.git
...
$ cd avrSerial/
$ grep -r 'SERIALDATA\|UART_INTERRUPT_MASK' . --include='*.[ch]'
./serial.c:#define SERIALDATA 0
./serial.c: rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
./serial.c: *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
./serial.c: *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
./serial.c: serialRegisters[uart]->CTRLA &= ~(UART_INTERRUPT_MASK << 2); // TXCINTLVL
./serial_device.h:#define UART_INTERRUPT_MASK 0x03
So, just grep works fine here, with multiple clauses with pipe.
However, I'd like to know in which C functions do the clauses/keyword matches occur, so I try to use git grep with the -p switch:
$ git grep -p 'SERIALDATA\|UART_INTERRUPT_MASK' -- '*.[ch]'
$
... and absolutely nothing is returned, for the same clause.
However, if I repeat this test on Ubuntu:
$ echo `uname -s` `cat /etc/issue | head -1`
Linux Ubuntu 18.04.4 LTS \n \l
$ git --version
git version 2.17.1
$ grep --version | head -1
grep (GNU grep) 3.1
# same procedure with git clone, cd ... grep -r works the same too; but git grep -p is different:
$ git grep -p 'SERIALDATA\|UART_INTERRUPT_MASK' -- '*.[ch]'
serial.c:#define SERIALDATA 0
serial.c=static void serialReceiveInterrupt(uint8_t uart) {
serial.c: rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
serial.c=static void serialTransmitInterrupt(uint8_t uart) {
serial.c: *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
serial.c: *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
serial.c: serialRegisters[uart]->CTRLA &= ~(UART_INTERRUPT_MASK << 2); // TXCINTLVL
serial_device.h=uint8_t const serialBits[UART_COUNT][UART_BITS] = {{
serial_device.h:#define UART_INTERRUPT_MASK 0x03
... here it works?!
Does anyone know why the different behavior in regards to git grep on these systems? Is there a git config setting I have to enable, or is it a regression in git, or maybe there are some shell escaping problems on MSYS2?
Or in general - how can I get the same kind of git grep response on MSYS2, as I get it on Ubuntu?
I'll post this as an answer - after looking into git help grep, and brute forcing some switches, found that this works on MSYS2:
$ git grep -p --extended-regexp 'UART_INTERRUPT_MASK|SERIALDATA' -- '*.[ch]'
serial.c:#define SERIALDATA 0
serial.c=static void serialReceiveInterrupt(uint8_t uart) {
serial.c: rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
serial.c=static void serialTransmitInterrupt(uint8_t uart) {
serial.c: *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
serial.c: *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
serial.c: serialRegisters[uart]->CTRLA &= ~(UART_INTERRUPT_MASK << 2); // TXCINTLVL
serial_device.h=uint8_t const serialBits[UART_COUNT][UART_BITS] = {{
serial_device.h:#define UART_INTERRUPT_MASK 0x03
and also this:
$ git grep -p --perl-regexp 'UART_INTERRUPT_MASK|SERIALDATA' -- '*.[ch]'
serial.c:#define SERIALDATA 0
serial.c=static void serialReceiveInterrupt(uint8_t uart) {
serial.c: rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
serial.c=static void serialTransmitInterrupt(uint8_t uart) {
serial.c: *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
serial.c: *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
serial.c: serialRegisters[uart]->CTRLA &= ~(UART_INTERRUPT_MASK << 2); // TXCINTLVL
serial_device.h=uint8_t const serialBits[UART_COUNT][UART_BITS] = {{
serial_device.h:#define UART_INTERRUPT_MASK 0x03
So, use either --perl-regexp or --extended-regexp - and do not escape the pipe | with a backslash \, as one needs to do for usual grep.
On the command line, I'm able to get this rolling with no problem:
java weka.Run weka.classifiers.timeseries.WekaForecaster -W
"weka.classifiers.functions.MultilayerPerceptron -L 0.01 -M 0.2 -N 500 -V 0 -S 0 -E 20 -H 20 " -t "C:\MyFile.arff" -F DirectionNumeric -L 1 -M 3 -prime 3 -horizon 6 -holdout 100 -G TradeDay -dayofweek -weekend -future
But once I try to put the skip list, I start to get errors saying that it's missing a date that is not in the skip list even though the date is in fact on it:
java weka.Run weka.classifiers.timeseries.WekaForecaster -W "weka.classifiers.functions.MultilayerPerceptron -L 0.01 -M 0.2 -N 500 -V 0 -S 0 -E 20 -H 20 " -t "C:\MyFile.arff" -F DirectionNumeric -L 1 -M 3 -prime 3 -horizon 6 -holdout 100 -G TradeDay -dayofweek -weekend -future -skip ""2014-06-07#yyyy-MM-dd, 2014-06-12"
Does anybody knows how to get this working? Weka is low on documentation as far as I know.
Thank's in advance!
Forget it. I got it, the problem was the 's' must be in capital letters:
-Skip
instead of
-skip.
I try to execute command:
# service jail start myjail
I debug the /etc/rc.d/jail and dump that really command is:
/usr/sbin/jail -l -U root -i -f /var/run/jail.myjail.conf -c myjail
The output is:
usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]
-[cmr] param=value ... [command=command ...]
jail [-dqv] [-f file] -[cmr] [jail]
jail [-qv] [-f file] -[rR] ['*' | jail ...]
jail [-dhilqv] [-J jid_file] [-u username] [-U username]
[-n jailname] [-s securelevel]
path hostname [ip[,...]] command ...
The file /var/run/jail.myjail.conf is autogenrated by rc jail script based on variables of previously worked jail from rc.conf
The content is:
myjail {
host.hostname = "myjail.example.com";
path = "/var/jail/myjail.root";
ip4.addr += "192.168.0.150/32";
allow.raw_sockets = 0;
exec.clean;
exec.system_user = "root";
exec.jail_user = "root";
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_myjail_console.log";
mount.devfs;
allow.set_hostname = 0;
allow.sysvipc = 0;
}
What is wrong?
The problem solved by replace old style configuration variables in rc.conf by one line:
jail_myjail_conf="/var/run/jail.myjail.conf"
Let's say git add command.When I input man git add,I get its page.
SYNOPSIS
git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
[--] [<pathspec>...]
I have two quesions:
git add --verbose is same as git add -v?
for other command such as git,python , --fullNameA is same as -A? (fullNameA is abbreviated to A)
Each option in [--xxx | -x] characters are the same, so [--verbose | -v] means that --verbose will do the same as -v. This is true for all the man pages.
I have "cvs diff" output (for all files in project) in unified diff format.
Format could be like this:
Index: somefile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/somefile.cpp,v
retrieving revision 1.19
diff -r1.19 somefile.cpp
31c31
< return "Read line four times";
---
> return "Read line five times";
36c36
< return "Make a bad thing";
---
> return "Make a good thing";
Index: otherfile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/otherfile.cpp,v
retrieving revision 1.19
< ........
---
> ........
or even like this:
Index: somefile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/somefile.cpp,v
retrieving revision 1.19
diff -u -r1.19 somefile.cpp
--- somefile.cpp 13 Mar 2013 08:45:18 -0000 1.19
+++ somefile.cpp 26 Mar 2013 08:10:33 -0000
## -28,12 +28,12 ##
//---------------------------------------------------------------------------
extern "C" char *FuncGetSomeText()
{
- return "Read line four times";
+ return "Read line five times";
}
//---------------------------------------------------------------------------
extern "C" char *FuncGetAwesomeText()
{
- return "Make a bad thing";
+ return "Make a good thing";
}
//---------------------------------------------------------------------------
Index: otherfile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/otherfile.cpp,v
retrieving revision 1.19
diff -u -r1.19 otherfile.cpp
--- otherfile.cpp 13 Mar 2013 08:45:18 -0000 1.19
+++ otherfile.cpp 26 Mar 2013 08:10:33 -0000
## -28,12 +28,12 ##
//---------------------------------------------------------------------------
extern "C" char *Func()
{
- .......
+ .......
}
//---------------------------------------------------------------------------
Is there any way to view this text side-by-side with vim?
Or maybe it's possible to change default diff tool in cvs to vimdiff?
Some sed magic help me:
\cvs -n diff -u > ~diff.tmp; vim -O <(sed -r -e 's/^\+[^\+]+.*$//g;s/^\+$//g' ~diff.tmp) <(sed -r -e 's/^-[^-]+.*$//g;s/^-$//g' ~diff.tmp) +'set scb | set nowrap | wincmd w | set scb | set nowrap'
It is not perfect solution, but better then nothing. Here what this script doing:
\cvs -n diff -u > ~diff.tmp;
Write CVS diff output in unified format (-u option) to temp file ~diff.tmp. '\' char prevent from taking alias of "cvs" command.
(sed -r -e 's/^\+[^\+]+.*$//g;s/^\+$//g' ~diff.tmp)
(sed -r -e 's/^-[^-]+.*$//g;s/^-$//g' ~diff.tmp)
This commands output text from ~diff.tmp, replace lines beginning with '+' and '-' symbols with empty line.
vim -O <(sed...) <(sed...) +'set scb | set nowrap | wincmd w | set scb | set nowrap'
Open two windows (-O option) with sed's output in each. Command followed '+' set srollbind on and nowrap for first window, then switch to second window (with 'wincmd w') and do same things