(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 04 Dec 2020, 07:46
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
wmstickynotes
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
fabrice_035


Joined: 28 Apr 2014
Posts: 768
Location: Bretagne / France

PostPosted: Tue 12 May 2020, 11:36    Post subject:  wmstickynotes
Subject description: enhancement of an existing program
 

Hello, I found a nice program but it lacks some small features and I don't have the knowledge to modify it. Of course I'm looking as always, but maybe if an expert can help me.

https://www.dockapps.net/wmstickynotes

Since the source code is in C
- I wish I could change the font.
- that it's in the systray instead of the taskbar.

Nothing else! I saw that the source code isn't very long.

so far I've found some tricks with "wmctrl" command . but it's not ideal

Thanks!
ps: I've contacted the author by email, maybe he'll give me an answer.

_________________
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4481
Location: holland

PostPosted: Thu 14 May 2020, 01:51    Post subject:  

Hello fabrice,

A workaround to change the font can be running wmstickynotes with a gtkrc file, for example:
Code:
#!/bin/bash

# change font name and size below as preferred
echo 'style "font" { font_name= "DejaVu Sans Mono Bold 13" } class "GtkWidget" style "font"' > /tmp/gtkrc_wmsticky
GTK2_RC_FILES=/tmp/gtkrc_wmsticky wmstickynotes


EDIT: added #!/bin/bash on top

Fred

_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Thu 14 May 2020, 07:19; edited 1 time in total
Back to top
View user's profile Send private message 
fabrice_035


Joined: 28 Apr 2014
Posts: 768
Location: Bretagne / France

PostPosted: Thu 14 May 2020, 06:30    Post subject:  

thank you for this good idea but I don't know what to change in the source code to implement this idea.
_________________
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4481
Location: holland

PostPosted: Thu 14 May 2020, 06:42    Post subject:  

fabrice_035 wrote:
thank you for this good idea but I don't know what to change in the source code to implement this idea.

I have no idea how to implement in the source, above code is meant to run as a wrapper script (bash), not to implement in the source, that's why I called it a workaround.
I think wmstickynotes uses the system wide gtk2 setting by default for font name and size (as set in ~/.gtkrc-2.0), but you can set it only for wmstickynotes by calling it with the GTK2_RC_FILES= env variable.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
fabrice_035


Joined: 28 Apr 2014
Posts: 768
Location: Bretagne / France

PostPosted: Thu 14 May 2020, 12:36    Post subject:  

I just figured it out and yeah, it's working great. Your tip, thank you!

My code (in startup dir)

Code:

#!/bin/sh


echo 'style "font" { font_name= "DejaVu Sans Mono Bold 13" } class "GtkWidget" style "font"' > /tmp/gtkrc_wmsticky
GTK2_RC_FILES=/tmp/gtkrc_wmsticky  wmstickynotes &
pid="$!"
echo "$pid"
sleep 1
window=$(wmctrl -lp | grep -m1 "$pid" | awk -F" " '{print $1}')
echo "$window"
sleep 1
wmctrl -ir "$window" -b toggle,skip_taskbar
wmctrl -ir "$window" -b add,hidden
sleep 1
window=$(wmctrl -lp | grep "$pid" | awk -F" " '{print $1}' | tail -1)
wmctrl -ir "$window" -b toggle,skip_taskbar


Beware you already need a note with text to test because with this code the main application is hidden.
Or create a file named 1 in ./wmstickynotes



Smile[/img]

_________________
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 3.3313s ][ Queries: 11 (2.9957s) ][ GZIP on ]