You are not logged in.

#726 2017-09-02 13:19:37

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Show us your conky

Sector11 wrote:

OOPS!

Conky: failed to handle template 'template9' with args '(null)'
Conky: failed to handle template 'template9' with args '(null)'
Conky: failed to handle template 'template9' with args '(null)'
Conky: failed to handle template 'template9' with args '(null)'
Conky: failed to handle template 'template9' with args '(null)'
Conky: failed to handle template 'template9' with args '(null)'

template9 please.  wink

damo wrote:

^ What happens if you just remove the LANG= and LC_TIME= ?

There are also many unnecessary ${font} calls.

Actually I don't know about code hehe..
I just took codes from some example and use it. At least it works I'm quite happy :')
I will try to correct it. Thanks for the heads up!!


If it ain't broke, then tweak it until it breaks.

Offline

#727 2017-09-02 14:05:38

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,396

Re: Show us your conky

Addy wrote:

Actually I don't know about code hehe..
I just took codes from some example and use it. At least it works I'm quite happy :')
I will try to correct it. Thanks for the heads up!!

Ahhhhhhhhhhhh the light.  And since I already have it tweaked ...

OLD code:

${font Roboto:Light:size=72}$alignr${time %H}${color0}:${time %M}${font}${color}
${font Roboto:Light:size=24}${voffset 12}$alignr${color0}${execi 300 LANG=${template9} LC_TIME=${template9} date +"%A"}${color},\
 ${execi 300 LANG=${template9} LC_TIME=${template9} date +"%d"}\
${color0} ${execi 300 LANG=${template9} LC_TIME=${template9} date +"%B"}${font}${voffset 2}
${hr}${color}${voffset 4}

change the lines to use "time" vs execi and date:
NEW code:

${font Roboto:Light:size=72}${alignr}${time %H}${color0}:${time %M}${font}
${font Roboto:Light:size=24}${voffset 12}${alignr}${time %A}${color},\
 ${time %d}\
 ${color0}${time %B}${font}${voffset 2}
${hr}${color}${voffset 4}

Uses the proper conky syntax and since there are no template, zero changes to the displayed conky.

=== and as mentioned earlier in the thread ===
A BunsenLabs version:
2017-09-02_110012_Scrot11.th.jpg

## pkill -xf "conky -c /media/5/Conky/InformantConky.conky" &

## Informant Conky
## By Addy
## https://plus.google.com/+AdhiPambudi
## http://addy-dclxvi.deviantart.com/
## https://github.com/addy-dclxvi

## Tweaked: for BunsenLabs Cv1.9
## by: Sector11
## 2017-08-25

## ---------- Begin Window Settings

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,below,undecorated
own_window_colour 000000
own_window_class Conky
own_window_title Informant Conky

#minimum_size 400 200
#maximum_width 400

gap_x 20	# l|r
gap_y 0		# u|d

alignment tr

## ---------- End Window Settings
## ---------- Font Settings

override_utf8_locale yes
use_xft yes
######## xftfont Roboto:size=10
#xftfont Liberation Mono:bold:size=10
#xftfont Fantasque Sans Mono:bold:size=9
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10
#xftfont Fira Mono:bold:size=9
xftalpha 1.0

## --------- End Font Settings
## --------- Color Settings

draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color 40e0d0 #Cyan #DCDCDC #Gainsboro
color0 ffffff #white C0C0C0 #Silver
color1 777777 #Gray
color2 FAEBD7 #AntiqueWhite
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 CD5C5C #IndianRed

## ---------- End Color Settings
## ---------- Begin Borders Section

draw_borders no
stippled_borders 5
border_inner_margin 0
border_outer_margin 0
border_width 2

## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section

background no
use_spacer none
no_buffers yes
short_units yes
imlib_cache_size 0
double_buffer yes
short_units yes
pad_percents 2

## ---------- End Miscellaneous Section

update_interval 1
TEXT
${image /home/sector11/.config/conky/images/bl-flame-ellipses-grey.png -p 0,12 -s 91x120}\
${font Roboto:Light:size=72}${alignr}${time %H}${color0}:${time %M}${font}
${font Roboto:Light:size=24}${voffset 12}${alignr}${time %A}${color},\
 ${time %d}\
 ${color0}${time %B}${font}${voffset 2}
${hr}${color}${voffset 4}
${font Fira Mono:bold:size=8}${alignr}USER: ${color0}${execi 5000 whoami} ${color1}|${color} MACHINE: ${color0}${nodename} ${color1}|${color} UPTIME: ${color0}${uptime_short}${color}
${alignr}DISTRIBUTION: ${color0}${pre_exec lsb_release -is} ${color1}|${color} VERSION: ${color0}${pre_exec cat /etc/debian_version}${color}
${alignr}ARCHITECTURE: ${color0}${machine} ${color1}|${color} KERNEL: ${color0}${kernel}${color}
${alignr}ROOT: ${color0}${fs_used /} ${color}/${color0} ${fs_size /} ${color1}|${color} HOME: ${color0}${fs_used /home}${color} / ${color0}${fs_size /home}${color}
${alignr}CPU: ${color0}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}% ${color1}|${color} RAM: ${color0}${mem} ${color}/${color0} ${memmax}${color} HD: ${color0}${fs_used_perc}%${color}
${alignr}SWAP: ${color0}${swap} ${color}/${color0} ${swapmax} ${color1}|${color} SYS TEMP: ${color0}${hwmon temp 1}°C${color}
${alignr}YOU CAN INSTALL ${color0}${execpi 60 list-updates}${color} UPDATE(S)

EDIT: Drop shadows on the text - sorry damo.  smile

Last edited by Sector11 (2017-09-02 14:10:49)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#728 2017-09-02 15:03:30

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,396

Re: Show us your conky

unklar wrote:

^... I must have it! Brilliant! cool

Thanks for the summary. Up to now, I've only ever had "fragments".  smile

You should already have it.  wink
With my compliments.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#729 2017-09-02 18:15:41

unklar
Member
Registered: 2015-10-31
Posts: 1,245

Re: Show us your conky

^I have this mistake.
fehlerpidoff.th.jpg

If I remove this comment in Teo's script, everything is ok  big_smile

## kill -STOP $(pidof conky)
...
...
## kill -CONT $(pidof conky)

that was because wget ?

Offline

#730 2017-09-02 19:04:38

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,396

Re: Show us your conky

unklar wrote:

^I have this mistake.
{snip}
that was because wget ?

You should also remove:

killall wget

in the script.

Yes those lines are for wget.

NOTE - If you are running any other Teo weather script and it has those lines in to stop "all" conkys they could stop this conky in the middle of wget updating and getting data.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#731 2017-09-09 18:14:06

unklar
Member
Registered: 2015-10-31
Posts: 1,245

Re: Show us your conky

^^I have a problem with Teo's weather script majorcities here, which does not update the data. sad

majorcities

#!/bin/bash
# TeoBigusGeekus - 20130915
# for use with Map_Time_Weather.conky

kill -STOP $(pidof conky)
killall wget

wget -O /media/DATEN/francescoPC/Conky/Scripte/WTD/MC_data http://www.hko.gov.hk/wxinfo/worldwx/majorcities.htm

sed -i -e 's/^.*font\x27>//g' -e 's/^.*99;\x27>//g' -e 's/^.*D70000;\x27>//g' -e 's/^.*000000;\x27>//g' /media/DATEN/francescoPC/Conky/Scripte/WTD/MC_data
sed -i -e '/Updated/s/<\/span>.*$//g' -e 's/^.*<strong>//g' -e 's/<\/strong>.*$//g' -e 's/<\/span>.*$//g' -e '/<\|>\|{\|\r\|\*/d' /media/DATEN/francescoPC/Conky/Scripte/WTD/MC_data
#sed -i '2,4d' /media/5/Conky/ragamatrix_Map/MC_data

kill -CONT $(pidof conky)

They're always from the MC_data "Updated at 12:15 HKT 18 May 2017"

Updated at 12:15 HKT 18 May 2017
City
Weather Forecast
Climate
Asia
Bandar Seri Begawan
25
32
Thunderstorms
Bangkok
25
30
Thunderstorms
Beijing
21
36
Cloudy
Chengdu
15
31
Rain
Guangzhou
24
29
Showers
Hanoi
20
27
Drizzle
Ho Chi Minh City
26
34
Thunderstorms
Jakarta
26
33
Cloudy
Jerusalem
21
31
Cloudy
Karachi
28
36
Dry
Kuala Lumpur
25
34
Thunderstorms
Kunming
13
24
Cloudy
Macao
24
30
Bright
Manila
27
34
Thunderstorms
Mumbai
28
33
Fine
Muscat
31
43
Fine
New Delhi
27
39
Cloudy
Seoul
14
27
Fine
Shanghai
19
27
Cloudy
Shenyang
21
33
Fine
Singapore
25
33
Thunderstorms
Taibei/Taipei
24
29
Overcast
Tehran
16
32
Bright
Tokyo
15
21
Cloudy
Urumqi
12
15
Rain
Xi'an
18
30
Rain
Xiamen
21
29
Overcast
Africa
Cairo
21
33
Cloudy
Cape Town
11
20
Fine
Johannesburg
7
21
Fine
Australia &amp; South Pacific
Auckland
14
17
Showers
Brisbane
16
24
Showers
Geelong
9
19
Cloudy
Horsham
8
19
Rain
Melbourne
10
20
Cloudy
Mildura
11
20
Rain
Sydney
13
22
Showers
Wellington
6
14
Showers
Europe
Amsterdam
15
17
Thunderstorms
Ankara
10
22
Thunderstorms
Athens
13
19
Thunderstorms
Belgrade
14
25
Fine
Berlin
14
27
Fine
Copenhagen
11
17
Cloudy
Dublin
4
15
Showers
Frankfurt
15
25
Cloudy
Geneva
14
22
Showers
Leeds
8
16
Bright
Lisbon
13
20
Fine
London
11
18
Cloudy
Madrid
13
19
Showers
Milano
17
25
Overcast
Moskva
5
18
Rain
Newcastle
7
13
Bright
Nice
17
23
Fine
Paris
13
19
Hail
Roma
15
28
Cloudy
Vienna
13
26
Fine
Warsaw
9
24
Fine
Zurich
14
23
Fine
North &amp; Central America
Atlanta
20
31
Thunderstorms
Boston
21
34
Fine
Calgary
1
18
Thunderstorms
Chicago
23
26
Fine
Cleveland
22
28
Thunderstorms
Dallas
22
31
Thunderstorms
Denver
4
7
Showers
Detroit
22
30
Thunderstorms
Edmonton
3
19
Thunderstorms
Honolulu
22
29
Showers
Houston
24
31
Cloudy
Kansas City
16
26
Thunderstorms
Las Vegas
14
27
Fine
Los Angeles
13
24
Fog
Mexico City
17
31
Drizzle
Miami
26
29
Showers
Montreal
20
29
Thunderstorms
New Orleans
24
29
Thunderstorms
New York
21
32
Fine
Oklahoma City
18
30
Thunderstorms
Ottawa
19
28
Thunderstorms
Phoenix
19
30
Fine
Quebec City
13
27
Thunderstorms
San Francisco
10
21
Fine
Seattle
9
19
Fine
Toronto
19
28
Cloudy
Vancouver
10
15
Cloudy
Washington
22
34
Fine
Winnipeg
2
13
Fine
South America
Brasilia
18
27
Showers
Buenos Aires
12
17
Rain
Caracas
27
32
Drizzle
Lima
18
23
Drizzle
Rio De Janeiro
16
27
Cloudy
Santiago
9
13
Showers

At Irma on the pictures you can see it clearly
irma.th.jpg Two days later irma1.th.jpg

the decisive lines in the conky

...
update_interval 1


TEXT
${execi 86400 ~/bin/daylight.sh}\
${execi 86400 bash /media/DATEN/francescoPC/Conky/Sector11/Map/S11world/majorcities}\
${image /media/DATEN/francescoPC/Conky/images/world_1600.jpg}
${alignc}${font monofur:bold:size=14}${tztime %a %d %b %Y} «--${color1}|${color6}--» ${tztime NZ %a %d %b %Y}${color}${font}

Sector11, is the mistake with me or can you confirm it?  smile

Last edited by unklar (2017-09-09 18:16:44)

Offline

#732 2017-09-09 19:29:27

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,396

Re: Show us your conky

^  Sharp eye unklar - I have the sane data ... and it is wrong according to:

http://www.hko.gov.hk/wxinfo/worldwx/majorcities.htm

sad  Must talk with Teo and see if he can help.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#733 2017-09-09 20:43:57

unklar
Member
Registered: 2015-10-31
Posts: 1,245

Re: Show us your conky

Sector11 wrote:

^  Sharp eye unklar..

I feel honoured, my friend. Thank you very much. If we didn't have Teo...    cool

Offline

#734 2017-10-13 01:36:16

manuel-909
Member
Registered: 2017-10-09
Posts: 93

Re: Show us your conky

Ok so far my Desktop it looks like this chears....


2017-10-12-21-16-52_scrot.th.png

Offline

#735 2017-10-14 00:19:41

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

^Great, looks nice! Is that a dock on the top? It even shows that tomorrow(/today) is Friday the 13th! A couple of years ago it was a dreaded day for computer users... there were even people saying it's best NOT to turn on the machine at all...  lol

Last edited by martix (2017-10-14 00:46:54)

Offline

#736 2017-10-14 03:06:04

manuel-909
Member
Registered: 2017-10-09
Posts: 93

Re: Show us your conky

Thank you , the dock is adeskbar 0.5-1 and i use remind for reminders....

Offline

#737 2017-10-14 09:26:28

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Show us your conky

manuel-909, what reminder software do you use?


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#738 2017-10-14 13:56:54

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,396

Re: Show us your conky

@  manuel-909
- I thought I recognized you, but wasn't 100% sure.   You changed your number  smile

¿Como estas amigo?  Espero que todo bien con vos y su familia.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#739 2017-10-14 16:56:51

manuel-909
Member
Registered: 2017-10-09
Posts: 93

Re: Show us your conky

Hey my friend sector11 how you and family are doing? Long time gone but i'm back , i now i need to replace the number.
sudo apt-get install remind , and create a .reminders on home folder . on conky add this.
${execi 3600 remind -q -g ~/.reminders | fold -sw65 | sed -e :a -e 's/^.\{1,50\}$/ &/;ta' -e '/^$/d'}
with the {1.50} you can move it to the right.
chears.   : - )

Offline

#740 2017-10-14 17:39:43

manuel-909
Member
Registered: 2017-10-09
Posts: 93

Re: Show us your conky

Here is an example of .reminders...... ohnonot .


#############################################################################
# 									    #
# DEFS.REM								    #
# 									    #
# This file is a reminder script, which contains a few handy definitions.   #
# Cut and paste as desired!  Also, near the end, there are a bunch of	    #
# holiday definitions for the U.S.					    #
# 									    #
# Some examples provided by George M. Sipe <gsipe@pyratl.ga.pyramid.com>    #
# 									    #
# U.S. holidays provided by Dave Rickel <drickel@sjc.mentorg.com>	    #
# 									    #
# Use your text editor to search for:					    #
#  "#USHOLS" for U.S. holidays						    #
#  "#JHOLS"  for Jewish holidays					    #
#  "#PSSTUFF" for nifty PostScript examples				    #
#  "#COLORS" for examples of ANSI color escape sequences.                   #
# 									    #
# This file is part of REMIND.						    #
# Copyright (C) 1992-1997 David F. Skoll                                    #
# Copyright (C) 1999-2000 Roaring Penguin Software Inc.                     #
# 									    #
#############################################################################

#
# $Id: defs.rem,v 1.4 2000/02/18 03:45:36 dfs Exp $
#

RUN OFF

################################################
# Ensure required version of remind is used... #
################################################
IF version() < "03.00.19"
   ERRMSG This file requires at least version 03.00.19 of Remind.%
   ERRMSG This version is version [version()].
   EXIT
ENDIF

######################################
# Symbolic constants for weekdays... #
######################################
SET Sunday    0
SET Monday    1
SET Tuesday   2
SET Wednesday 3
SET Thursday  4
SET Friday    5
SET Saturday  6

SET Sun 0
SET Mon 1
SET Tue 2
SET Wed 3
SET Thu 4
SET Fri 5
SET Sat 6

#########################################
# Symbolic constants for month names... #
#########################################

SET Jan 1
SET Feb 2
SET Mar 3
SET Apr 4
SET May 5
SET Jun 6
SET Jul 7
SET Aug 8
SET Sep 9
SET Oct 10
SET Nov 11
SET Dec 12

SET January   1
SET February  2
SET March     3
SET April     4
SET May       5
SET June      6
SET July      7
SET August    8
SET September 9
SET October   10
SET November  11
SET December  12

###########################################################
# Other symbolic constants and functions for "pasting"... #
###########################################################

SET Quote CHAR(34)

# Handy constants/function for specifing week of month...
SET  Week_1		 1
SET  Week_2		 8
SET  Week_3		15
SET  Week_4		22
FSET _last(mo)		"1 " + MON((mo%12)+1)+" --7"

# Shorthand for commonly used expression...
FSET _trig()		TRIGGER(TRIGDATE())

# Handy function to provide SCANFROM dates...
FSET _back(days)	TRIGGER(TODAY()-days)

###########################################################
# On MS-DOS systems, the standard C library functions are #
# not reliable for computing offsets from local time to   #
# UTC.  The following provides a work-around for the      #
# sunrise() and sunset() functions.  Note, however, that  #
# if Daylight Savings Time is in effect for today(), the  #
# sun functions return times in DST even for dates on     #
# which DST is not in effect; the converse can also occur.#
#                                                         #
# Change the timezone to your timezone - the default is   #
# for EST which is 5 hours (300 minutes) behind UTC.      #
# The code is correct for places in which Daylight Savings#
# Time begins on the last Sunday in April and ends on the #
# last Sunday in October.                                 #
###########################################################

IF OSTYPE() == "MSDOS"
    # Eastern Standard Time
    SET TimeZone -300

    # Use --8 rather than --7 because we want the last day BEFORE
    # the time switch occurs.
    REM Sun 1 May --8 SATISFY 1
    SET BegDst TRIGDATE()

    REM Sun 1 Nov --8 SATISFY 1
    SET EndDst TRIGDATE()

    SET $CalcUTC 0

    # Check out the following IF statement and figure out why it works!
    IF EndDst < BegDst
        # Daylight Savings Time
        SET $MinsFromUTC TimeZone+60
    ELSE
        # Standard Time
        SET $MinsFromUTC TimeZone
    ENDIF
ENDIF

###########################################################
# Function which returns a string in "am/pm" format based #
# on the time.  For example, set a am_pm(NOW())...        #
###########################################################

FSET _am_pm(tm)	IIF(tm<01:00, tm+12*60+"am", \
                    tm<12:00, tm+"am", \
                    tm<13:00, tm+"pm", \
                              tm-12*60+"pm")

#################################################################
# Function which removes a single leading zero from a string... #
#################################################################

FSET _no_lz(s) IIF(SUBSTR(s, 1, 1)=="0", SUBSTR(s, 2), s)

#################################################################
# Return the length of the daylight/night portion of a date,    #
# in minutes.                                                   #
#################################################################

FSET _light_len(date) MAX(SUNSET(date)-SUNRISE(date), 0)
FSET _dark_len(date) 1440-_light_len(date)

############################################################
# Function to calculate number of years since a given year #
# or number of months since a given month and year...      #
############################################################

FSET _yr_num(yr)		ORD(YEAR(TRIGDATE()) - yr)
FSET _mo_num(mo, yr)		ORD(12 * (YEAR(TRIGDATE()) - yr) + \
					MONNUM(TRIGDATE()) - mo)

# Here's an example of how to use them:
#REM 1 Nov ++12 MSG %"Dean's [_yr_num(1984)] birthday%" is %b.
#REM 1 MSG Dean's [_mo_num(11, 1984)] 'monthly' anniversary

###########################################################
# Function to send mail via elm's "fastmail" (by GMS!)... #
###########################################################

#FSET _mail(from, subj)	"mailx -s " + \
#				Quote + from + " : " + subj + Quote \
#				GETENV("LOGNAME") + " < /dev/null 1>&0"
FSET _mail(from, subj)	"fastmail -f " + \
				Quote + from + Quote + \
				" -s " + Quote + subj + Quote + \
				" /dev/null " + GETENV("LOGNAME")

#############################################################################
# Here's a tricky problem:  The 4th of July is a holiday in the U.S.
# However, if it falls on a Saturday, the previous Friday is a holiday.
# If it falls on a Sunday, the next Monday is a holiday.  Here's how
# to do it.  NOTE that the following procedure makes the OMIT context
# dependent upon the current date.  SInce it only depends on the current
# year, which is not likely to change while producing a calendar, we
# are fairly safe.  However, reminders with huge DELTA or BACK components
# may not operate as expected.  In general, any time you make OMIT
# dependent upon the current date, it's tricky and results may not be
# what you expect.  You should try to make sure that the OMIT context
# "near" any current reminders will not change during a calendar run.
# The SCANFROM clause should help make these OMITs very safe.
############################################################################

# Calculate the weekday of the holiday.
REM 4 July SCANFROM [_back(7)] SATISFY 1

IF WKDAYNUM(TRIGDATE()) == Sat
	REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
	OMIT [TRIGGER(TRIGDATE()-1)] MSG Independence day (observed)
ELSE
	IF WKDAYNUM(TRIGDATE()) == Sun
		REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
		OMIT [TRIGGER(TRIGDATE()+1)] MSG Independence day (observed)
	ELSE
		OMIT [TRIGGER(TRIGDATE())] MSG Independence day
	ENDIF
ENDIF

############################################################################
#									   #
# A meeting on the first Monday of every month which is moved to the       #
# second Monday in the event of a holiday.                                 #
#									   #
############################################################################

# First, the normal meeting.  However, the SKIP keyword means this
# one won't be triggered if the first Monday is a holiday
#REM Mon 1 SKIP MSG Meeting

# Now, calculate the "potential" delayed meeting
##REM Mon 8 SATISFY 1

# But only actually trigger the delayed meeting if the previous
# Monday was a holiday
#IF ISOMITTED(TRIGDATE()-7)
   #REM [TRIGGER(TRIGDATE())] MSG Delayed meeting
#ENDIF

############################################################################
#									   #
# A very complicated reminder sent in by a Remind user.			   #
# This person gets paid every two weeks, starting from 8 January 2013.	   #
# If a pay date occurs before the twelfth of a month, then that		   #
# he pays his mortgage on that pay date.  Otherwise, he pays the mortgage  #
# on the previous pay date.  Furthermore, he has to schedule his	   #
# mortgage payment six days before it is due.  He wants to be reminded	   #
# a further four days before the scheduling deadline.  He also		   #
# wants to be mailed a notice two weeks before the scheduling deadline.	   #
#									   #
# Here's the solution - if you can follow this, consider yourself a	   #
# Remind programmer extraordinaire!					   #
#									   #
############################################################################

# A function to determine whether or not a pay-date is a mortgage-date.

FSET _IsMortDate(x) DAY(x) < 12 || (DAY(x+14) >= 12 && DAY(x+14) <= 14)

# Paydays - for reference

#REM 8 Jan 2013 *14 MSG Payday

# Calculate the mortgage payment six days ahead of time.  Note that this
# is done "implicitly" by subtracting 6 from the starting date - we start
# on 2 Jan rather than 8 Jan.  We add 6 to TRIGDATE() in _IsMortDate to
# compensate.

#REM 29 May 2013 *14 ++4 SATISFY [_IsMortDate(TRIGDATE()+6)] \
	MSG %"Schedule mortgage payment%" for %a.

# Now the mail reminder two weeks before the payment date - because two
# weeks before a payment date is also a payment date, no pre-compensation
# in the starting date of 8 Jan is necessary - convince yourself of this!
# This uses the _mail() function defined earlier.

#REM ONCE 8 Jan 2013 *14 SATISFY [_IsMortDate(TRIGDATE()+14)] \
	RUN [_mail("Decatur Federal", \
		"Pay mortgage by the " + ORD(DAY(TRIGDATE()+14)))]

# Make an entry on the calendar when the mortgage should be paid

#REM 8 Jan 2013 *14 SATISFY [_IsMortDate(TRIGDATE())] \
	CAL Mortgage payment

##########################################################################
#								         #
# On our UNIX system, I run a program which queries the university       #
# library and creates a file called ".booksdue".  This file is           #
# a REMIND script to tell me when my library books are due.  Here's      #
# an example from my reminder file - it shows the use of filedate().     #
# When the .booksdue file is at least 7 days old, I create a new version #
# by querying the library computer.  Note the use of realtoday() rather  #
# than today.   						         #
#								         #
##########################################################################

IF !$RunOff && !$CalMode && !$SimpleCal
   IF REALTODAY()-FILEDATE("/home/dfs/.booksdue") >= 7
      REM RUN /home/dfs/bilge/library/getbooks
   ENDIF
ENDIF

#PSSTUFF1
##########################################################################
#								         #
# This portion of the file contains some cute examples of the new        #
# PS-type reminders.  You need a PostScript printer or viewer to         #
# appreciate these.  To use them, pipe the output of remind -p into the  #
# rem2ps program.  More examples are in the PSSTUFF2 section, below.     #
#								         #
##########################################################################

# The following reminder will shade the Saturday and Sunday calendar
# entries.
REM Sat Sun SPECIAL SHADE 220

#USHOLS
#############################################################################
#       								    #
# The following holidays were provided by Dave Rickel			    #
# Modified by D. Skoll to give safe OMITs for moveable holidays		    #
#									    #
#############################################################################

SET SaveTrig $NumTrig
SET easter EASTERDATE(YEAR(TODAY()))
REM  [TRIGGER(easter-46)] MSG %"Ash Wednesday%"
REM  [TRIGGER(easter-7)]  MSG %"Palm Sunday%"
OMIT [TRIGGER(easter-2)]  MSG %"Good Friday%"
OMIT [TRIGGER(easter)]    MSG %"Easter%" Sunday
REM  [TRIGGER(easter+39)] MSG %"Ascension Day%"
REM  [TRIGGER(easter+49)] MSG %"Pentecost%"

# Some holidays are omitted, some are not.  You may want to change
# which ones are omitted - use the general forms shown below.
# You'll need the _back() function and the Week_n variables defined
# way up in the file.

OMIT     Jan  1		MSG %"New Year's%" Day
REM  Mon Jan [Week_3]	MSG Martin Luther King - %"MLK Day%"
REM      Feb  2		MSG %"Ground Hog Day%"
REM      Feb 14		MSG %"Valentine's%" Day
REM  Mon Feb [Week_3]	SCANFROM [_back(7)] SATISFY 1
			OMIT [_trig()] MSG %"President's Day%"
REM      Mar 17		MSG %"St. Patrick's%" Day
REM Sun Mar 8 ++2 MSG Daylight Savings Time starts in the USA %b%
REM  Sun Apr  1 ++2	MSG Daylight Savings Time - %"DST starts%" %b
REM      Apr  1		MSG %"April Fool's%" Day
REM  Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
REM      May  5		MSG %"Cinco de Mayo%"
REM  Sat May [Week_1]	MSG %"Kentucky Derby%"
REM  Sun May [Week_2]	MSG %"Mother's Day%"
REM  Sat May [Week_3]	MSG %"Armed Forces Day%"
REM  Mon [_last(May)]	SCANFROM [_back(7)] SATISFY 1
#REM July 4 +2 MSG Independence Day in the USA is %b%
REM      Jun 14		MSG %"Flag Day%"
REM  Sun Jun [Week_3]	MSG %"Father's Day%"

REM  Mon Sep [Week_1]	SCANFROM [_back(7)] SATISFY 1
			OMIT [_trig()] MSG %"Labor Day%"
REM  Mon Oct [Week_2]	MSG %"Columbus Day%"
REM SUN Nov 1 ++2 MSG Daylight Savings Time ends in the USA %b%
REM      Nov 11		MSG %"Veterans Day%"
REM  Sun [_last(Oct)]	MSG Daylight Savings Time - %"DST over%"
REM      Oct 30		MSG %"Mischief Night%"
REM      Oct 31		MSG %"Halloween%"
REM  Tue Nov  2		SCANFROM [_back(7)] \
	SATISFY [(YEAR(TRIGDATE()) % 4) == 0] \
	MSG %"Election%" Day
REM  Thu Nov [Week_4]	SCANFROM [_back(7)] SATISFY 1
			OMIT [_trig()] MSG %"Thanksgiving%" Day
REM  Fri Nov [Week_4+1]	SCANFROM [_back(7)] SATISFY 1
			OMIT [_trig()] MSG %"Thanksgiving%" (cont.)
OMIT     Dec 24		MSG %"Christmas Eve%"
OMIT     Dec 25		MSG %"Christmas%" Day

##########################################################################
#								         #
# If any US holidays were triggered above, shade in the calendar         #
# entry in PostScript.  This is not quite correct, as it blots out any   #
# other PostScript stuff above.  I was too lazy to do it properly :-)    #
#								         #
##########################################################################
if $NumTrig > SaveTrig
	REM SPECIAL SHADE 220
endif

# Seasons (valid from 1992 to 2000)...
REM Mar 20 MSG %"Spring%" begins
REM Jun [IIF(YEAR(TODAY())%4, 21, 20)] MSG %"Summer%" begins
REM Sep [CHOOSE(YEAR(TODAY())-1991, 22,22,23,23,22,22,22,23,22)] \
	MSG %"Fall%" begins
REM Dec [IIF((YEAR(TODAY())+1)%4, 21, 22)] MSG %"Winter%" begins

#PSSTUFF2
##########################################################################
#									 #
# Since the SHADE special blots out any previous PostScript		 #
# reminders for a date, these examples need to follow the US Holidays	 #
# section, which uses SHADE.                                             #
#									 #
##########################################################################

# The following will fill in the Hebrew dates on the calendar.  For this
# example, I recommend that you use the -sd 10 option for Rem2PS.
REM PS Border Border moveto \
   /DayFont findfont DaySize scalefont setfont \
   ([hebday(today())] [hebmon(today())]) show

# Fill in the phases of the moon on the PostScript calendar
[trigger(moondate(0))] SPECIAL MOON 0
[trigger(moondate(1))] SPECIAL MOON 1
[trigger(moondate(2))] SPECIAL MOON 2
[trigger(moondate(3))] SPECIAL MOON 3

# The following example puts sunrise and sunset times in PostScript in the
# calendar - the sizes are hard-coded, however, and work best in landscape.
REM PS Border Border 5 sub moveto \
	/SmallFont findfont 4 scalefont setfont \
	(Sunrise: [sunrise(trigdate())] Sunset: [sunset(trigdate())]) show

# The next one puts the day number (1-366) and days left in the year at the
# bottom of the post-script calendar.  Again, the hard-coded sizes work best
# in landscape.
FSET _DayOfYear(x) x-(date(year(x),1,1) - 1)
REM PS BoxWidth 3 mul 4 div Border 5 sub moveto \
	/SmallFont findfont 4 scalefont setfont \
	([_DayOfYear(today())]([365+isleap(today())-_DayOfYear(today())])) show

###########################################################
# Banner #
###########################################################
#BANNER Hi Manuel - here are your reminders for %y-%t-%r:

 # Create a default sortbanner function if it hasn't already
            # been defined
            #if args("sortbanner") != 1
                 #fset sortbanner(x) "--- Things to do %b ---"
            #endif


# Switch off the normal banner
            BANNER %
            #REM 24 May 2013 ++1 MSG Not so important
            #REM 25 May 2013 ++7 MSG Way in the future
            #REM 26 May 2013 MSG Important Reminder
            #REM 24 May 2013 ++1 MSG Not so important - B
            FSET sortbanner(x) iif(x == today(), \
                 "***** THINGS TO DO TODAY *****", \
                 "----- Things to do %b -----")

#####TODO########
; prettify the sunrise/sunset/moon data
fset _srtd() coerce("STRING", _no_lz(_am_pm(sunrise(today()))))
fset _sstd() coerce("STRING", _no_lz(_am_pm(sunset(today()))))
fset _srtm() coerce("STRING", _no_lz(_am_pm(sunrise(today()+1))))
fset _sstm() coerce("STRING", _no_lz(_am_pm(sunset(today()+1))))
#MSG Sun is up today from [_srtd()] to [_sstd()].%"%"%
#MSG Next full moon: [mon(moondate(2))] [day(moondate(2))], [year(moondate(2))].%"%"%
#TV SCHEDULE#
#REM 1 --1 MSG Send MINUTE-MENU Don't forget !!
REM Thu +1 MSG Chicago Fire (10:00 pm) is %b
###############################################################
#NASCAR SCHEDULE##
REM Feb 18 +2 MSG Nascar Daytona (Qualifyng) (8:00 pm) is %b.
REM Feb 23 +2 MSG Nascar Daytona (Duels) (7:00 pm) is %b.
REM Feb 26 +2 MSG Nascar Daytona (2:00 pm) is %b.
REM Mar 5 +2 MSG Nascar Atlanta (2:30 pm) is %b.
REM Mar 12 +2 MSG Nascar Las Vegas (3:30 pm) is %b.
REM Mar 19 +2 MSG Nascar Phoenix (3:30 pm) is %b.
REM Mar 26 +2 MSG Nascar Auto Club Speedway (3:30 pm) is %b.
REM April 2 +2 MSG Nascar Martinsville (2:00 pm) is %b.
REM April 9 +2 MSG Nascar Texas (1:30 pm) is %b.
REM April 23 +2 MSG Nascar Bristol (2:00 pm) is %b.
REM April 30 +2 MSG Nascar Richmond (2:00 pm) is %b.
REM May 7 +2 MSG Nascar Talladega (2:00 pm) is %b.
REM May 13 +2 MSG Nascar Kansas Speedway (7:30 pm) is %b.
REM May 19 +2 MSG NASCAR Sprint Showdown (6:00 pm) is %b.
REM May 20 +2 MSG  NASCAR Sprint All-Star Race (6:00 pm) is %b.
REM May 28 +2 MSG  NASCAR Charlotte (6:00 pm) is %b
REM Jun 4 +2 MSG Nascar Dover (1:00 pm) is %b.
REM Jun 11 +2 MSG Nascar Pocono (3:00 pm) is %b.
REM Jun 18 +2 MSG Nascar Michigan (3:00 pm) is %b.
REM Jun 25 +2 MSG Nascar Sonoma (3:00 pm) is %b.
REM Jul 1 +2 MSG Nascar Daytona (7:30 pm) is %b.
REM Jul 8 +2 MSG Nascar Kentuky (7:30 pm) is %b.
REM Jul 16 +2 MSG Nascar New Hampshire (3:00 pm) is %b.
REM Jul 23 +2 MSG Nascar Indianapolis (3:00 pm) is %b.
REM Jul 30 +2 MSG Nascar Pocono (3:00 pm) is %b.
REM Aug 6 +2 MSG Nascar Watkins (3:00 pm) is %b.
REM Aug 13 +2 MSG Nascar Michigan (3:00 pm) is %b.
REM Aug 19 +2 MSG Nascar Bristol (7:30 pm) is %b.
REM Sep 3 +2 MSG Nascar Darlington (6:00 pm) is %b.
REM Sep 9 +2 MSG Nascar Richmond (7:30 pm) is %b.
REM Sep 17 +2 MSG Nascar Chicago (3:00 pm) is %b.
REM Sep 24 +2 MSG Nascar New Hampshire (2:00 pm) is %b.
REM Oct 1 +2 MSG Dover International Speedway (2:00 pm) is %b.
REM Oct 7 +2 MSG Charlotte Motor Speedway (7:00 pm) is %b.
REM Oct 15 +2 MSG Talladega Superspeedway (2:00 pm) is %b.
REM Oct 22 +2 MSG Kansas (3:00 pm) is %b.
REM Oct 29 +2 MSG Martinsville Speedway (1:00 pm) is %b.
REM Nov 5 +2 MSG Texas Motor Speedway (2:00 pm) is %b.
REM Nov 12 +2 MSG Phoenix International Raceway (2:30 pm) is %b.
REM Nov 19 +2 MSG Homestead-Miami Speedway (2:30 pm) is %b.
REM April 8 +7 MSG Mom's Birthday is %b.

##redskings schedule
REM Oct 2 +2 MSG Redskings VS Chiefs (ESPN 8:30} is %b.
REM Oct 15 +2 MSG Redskings VS 49ERS (FOX 1:00} is %b.
REM Oct 23 +2 MSG Redskings VS EAGLES (ESPN 8:30} is %b.
REM Oct 29 +2 MSG Redskings VS COWBOYS (FOX 4:25} is %b.
REM Nov 5 +2 MSG Redskings VS SEAHAWKS (FOX 4:05} is %b.
REM Nov 12 +2 MSG Redskings VS VIKINGS (FOX 1:00} is %b.
REM Nov 19 +2 MSG Redskings VS Saits (FOX 1:00} is %b.
REM Nov 23 +2 MSG Redskings VS Giants (NBC 8:30} is %b.
REM Nov 30 +2 MSG Redskings VS COWBOYS (NBC 8:25} is %b.
REM Dec 10 +2 MSG Redskings VS CHARGERS (NBC 4:05} is %b.
##############################################################
#friday 13 carfull#
#REM 13 SATISFY wkdaynum(trigdate()) == 5
            #IF trigvalid()
                 #REM [trigdate()] +2 MSG \
                 #Friday the 13th is %b.
            #ENDIF
REM 13 +2 SATISFY [wkdaynum(trigdate()) == 5] \
                 MSG Friday the 13th is %b.
################################################################
#Bithdays#
FSET _yr_num(yr) ORD(YEAR(TRIGDATE()) - yr)
REM July 3 +7 MSG Charlotte's [_yr_num(1959)] birthday%" is %b.
##################################################################

Offline

#741 2017-10-15 07:10:03

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Show us your conky

^ thanks, manuel-909.
looks like BASIC yikes


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#742 2017-10-16 11:04:42

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Show us your conky

Just a simple bar conky i thought i would share.

Screenshot---161017---220045.md.png

# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on VSIDO
times_in_seconds yes
# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
 
# fiddle with window
#user_spacer right

# Use Xft?
use_xft yes
xftfont cousine:size=10
xftalpha 0.9
# xftalpha 0.5
text_buffer_size 2048, file-manager

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 1024 0
maximum_width 1366

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_argb_visual yes
own_window_argb_value 100
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent no
own_window_class conky-semi

# Stippled borders?
stippled_borders 0

# border margins
#border_margin 1

# border width
border_width 1

# Default colors and also border colors
default_color BDBDBD
#color2=blue
#color3=grey
#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
# alignment top_left
# alignment top_right
alignment bottom_left
# alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 2
minimum_size 1366 0
maximum_width 1366
# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer yes

short_units yes

# lua_load ~/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
# ${color 7D8C93}Wyatt ${color 55688A} ${execi 600 inxi -W63882 | cut -c31-34}°
# ${color 32CD32}${time %I:%M%P}

# lua_load ~/conky/scripts/conky_lua_scripts.lua

# ${voffset 0}${color 73AEB4}K ${color 7D8C93}$kernel${color 73AEB4}${goto 140}C ${color 7D8C93}${cpu cpu0}%${color 73AEB4}${goto 198}M ${color 7D8C93}${memperc}%  ${mem} / ${memmax}${color 73AEB4}${goto 350}H${color 7D8C93} /h ${fs_used_perc /home}%${color 73AEB4}${goto 430}N${color 7D8C93}  ${if_up eth0}eth0  d ${downspeedgraph eth0 12,65 000000 ff0000} u ${upspeedgraph 12,65 000000 00ff00}${else}${if_up wlan0}wlan0 d ${downspeedgraph wlan0 12,65 000000 ff0000} u ${upspeedgraph wlan0 12,65 000000 00ff00}${endif}${endif}${goto 625}${if_existing /sys/class/power_supply/BAT0/}${color 73AEB4}  B ${color 7D8C93}${execi 1 ~/bin/conky/battery.sh}${endif}
# ${voffset 0}${color 73AEB4}K ${color 7D8C93}$kernel${color 73AEB4}${goto 140}C ${color 7D8C93}${cpu cpu0}%${color 73AEB4}${goto 198}M ${color 7D8C93}${memperc}%  ${mem} / ${memmax}${color 73AEB4}${goto 350}H${color 7D8C93} /h ${fs_used_perc /home}%${color 73AEB4}${goto 430}N${color 7D8C93}  ${if_up eth0}eth0  d ${downspeedgraph eth0 12,65 000000 ff0000} u ${upspeedgraph 12,65 000000 00ff00}${else}${if_up wlan0}wlan0 d ${downspeedgraph wlan0 12,65 000000 ff0000} u ${upspeedgraph wlan0 12,65 000000 00ff00}${endif}${endif}${goto 655}${if_existing /sys/class/power_supply/BAT0/}${color 73AEB4}  B ${color 7D8C93}${execi 1 ~/bin/conky/battery.sh}${endif}
TEXT
${goto 10}${color 73AEB4}Cpu:${color}${cpu cpu0}%${color 0A338A} | \
${goto 80}${color}${color 73AEB4}Mem:${color}${mem}/${memmax}${color 0A338A} | \
${goto 220}${color}${color 73AEB4}Root:${color}${fs_used /}/${fs_free /}${color 0A338A} | \
${goto 370}${color}${color 73AEB4}Home:${color}${fs_used /home}/${fs_free /home}${color 0A338A}| \
${goto 510}${color}${color 73AEB4}T/Up:${color}${totalup usb0} ${color 73AEB4}U/S=${color}${upspeed usb0}${upspeedgraph usb0 12,65 000000 00ff00}${color 0A338A} | \
${goto 755}${color}${color 73AEB4}T/Down:${color}${totaldown usb0} ${color 73AEB4}D/S=${color} ${downspeed usb0}${downspeedgraph usb0 12,65 000000 ff0000}${color 0A338A} | \
${goto 1025}${color}${color 73AEB4}Uptime:${color 32CD32}${format_time $uptime_short "\hh\mm"}${color 0A338A} | \
${goto 1260}${color 718CC0} ${time %a %d/%m/%y}

Offline

#743 2017-10-22 07:48:32

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 512

Re: Show us your conky

Open window list for panel-less desktop. OB client list to the right for comparison.
wlist.th.png
Conky:

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
	default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 5,
    gap_y = 60,
    minimum_height = 5,
	minimum_width = 400,
	maximum_width = 400,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    own_window_transparent = true,
    stippled_borders = 0,
    update_interval = 5.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${exec "/home/nore/bin/list_open_windows.sh"}
]]

list_open_windows.sh: (edited)

wmctrl -l -x | awk '{print $3}' | awk -F'.' '{print $2}' | sed '/Xfdesktop/d; /Xfce4-panel/d; /Conky/d'
  • wmctrl -l lists all windows opened by window manager

  • option -x shows WM_CLASS

  • awk prints third column, window class

  • awk -F cuts class string and prints only second part

  • sed excludes desktop, panel and conky (combined, upper case for class names)

Before shutting computer down I want to know if I have unfinished tasks like unsaved documents open. I tried to use tint2 in background with panel_layer=bottom, but icons and text appeared on top of windows when I switched desktops.

I still have to find out, how to cut out first part before "." in window class. I'd like to see just "Firefox" instead of "navigator.Firefox". Suggestions are welcome. (Solved)

Wmctrl lists window in order in which they were opened. It would be cool to have them in order by desktop, but this is acceptable so far. It saves me for unnecessarily pressing Super-tab for client list.

Last edited by nore (2017-10-23 06:02:10)

Offline

#744 2017-10-22 08:20:39

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 512

Re: Show us your conky

nore wrote:

I still have to find out, how to cut out first part before "." in window class. I'd like to see just "Firefox" instead of "navigator.Firefox". Suggestions are welcome.

Solved, added awk -F.

wmctrl -l -x | awk '{print $3}' | awk -F'.' '{print $2}' | sed '/xfdesktop/d' | sed '/xfce4-panel/d' | sed '/conky/d'

New scrot.

Last edited by nore (2017-10-22 08:25:01)

Offline

#745 2017-10-22 19:31:56

ohnonot
...again
Registered: 2015-09-29
Posts: 4,877
Website

Re: Show us your conky

nore wrote:
wmctrl -l -x | awk '{print $3}' | awk -F'.' '{print $2}' | sed '/xfdesktop/d' | sed '/xfce4-panel/d' | sed '/conky/d'

i believe the 3 sed's can be shortened to 1:

sed '/xfdesktop/d; /xfce4-panel/d; /conky/d'

also, don't you want to remove conky? shouldn't that be 'Conky/d' instead of 'conky/d'?


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#746 2017-10-23 05:58:51

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 512

Re: Show us your conky

^Correct, lower case names were left from earlier version that printed out window names instead of classes. I tried putting all /d string in separate quotes with no avail, so easy and idiotic workaround was piping them all. monkey I'll update original post.

Last edited by nore (2017-10-23 06:09:34)

Offline

#747 2017-10-23 16:21:46

misko_2083
Member
Registered: 2016-05-24
Posts: 371

Re: Show us your conky

nore wrote:
nore wrote:

I still have to find out, how to cut out first part before "." in window class. I'd like to see just "Firefox" instead of "navigator.Firefox". Suggestions are welcome.

Solved, added awk -F.

wmctrl -l -x | awk '{print $3}' | awk -F'.' '{print $2}' | sed '/xfdesktop/d' | sed '/xfce4-panel/d' | sed '/conky/d'

New scrot.

I have Gmusicbrowser which starts minimized in the tray on system boot.
Gmusic has a desktop widget plugin to play music, as you can see here.
https://i.imgur.com/FlHJsw7.png
So using wmctrl -l -x | awk '{print $3}' | awk -F'.' '{print $2}' | sed '/xfdesktop/d' | sed '/xfce4-panel/d' | sed '/conky/d' prints out Gmusicbrowser twice.
I've checked the wmctrl manual

-l  ...
The second column always contains the desktop number (a -1 is used to identify  a  sticky window)
...

If all the sticky windows are excluded, there is no need for sed.

 wmctrl -l -x | awk '{if ($2=="-1") {$3=""}else{print $3}}' | awk -F'.' '{print $2}'

edit:
Works until you make window stick on all workspaces. roll

Last edited by misko_2083 (2017-10-23 16:36:27)


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#748 2017-10-23 17:42:50

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 512

Re: Show us your conky

^Clever! I have to test that too, thanks.

Offline

#749 2017-10-23 21:48:45

misko_2083
Member
Registered: 2016-05-24
Posts: 371

Re: Show us your conky

After reading the freedesktop specifications
I came up with this:

#!/bin/bash

while read -r win_id <&3
  do
     if xprop -id $win_id | grep -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL" \
                                 -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG" &>/dev/null
     then
         wm_class=$(xprop -id $win_id | grep "^WM_CLASS(STRING)" | awk -F '"' '{print $4}')

         if [[ "${wm_class}" == "Wrapper" ]]
         then
             xprop -id $win_id | grep "^_NET_WM_NAME(UTF8_STRING)" | awk -F '"' '{print $2}'
         else
             echo "$wm_class"
         fi
     fi
done 3< <(wmctrl -l -x | awk '{print $1}')

exec 3<&-

Probably needs more testing and/or work.
wmctrl -l prints all windows so we filter out these two atoms:
_NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE_DIALOG
They are most likely to display in window list.


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#750 2017-10-24 06:26:38

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Show us your conky

^ No need for grep if you're already using awk smile

So this:

wm_class=$(xprop -id $win_id | grep "^WM_CLASS(STRING)" | awk -F '"' '{print $4}')

Can be replaced with:

wm_class=$(xprop -id $win_id | awk -F'"' '/^WM_CLASS\(STRING\)/{print $4}')

This also seems to work:

wm_class=$(xprop -id $win_id | awk -F'"' '/WM_CLASS/{print $4}')

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

Board footer

Powered by FluxBB