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.
wmstickynotes
- fabrice_035
- Posts: 765
- Joined: Mon 28 Apr 2014, 17:54
- Location: Bretagne / France
wmstickynotes
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752
Hello fabrice,
A workaround to change the font can be running wmstickynotes with a gtkrc file, for example:
EDIT: added #!/bin/bash on top
Fred
A workaround to change the font can be running wmstickynotes with a gtkrc file, for example:
Code: Select all
#!/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
Fred
Last edited by fredx181 on Thu 14 May 2020, 11:19, edited 1 time in total.
- fabrice_035
- Posts: 765
- Joined: Mon 28 Apr 2014, 17:54
- Location: Bretagne / France
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.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 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
- fabrice_035
- Posts: 765
- Joined: Mon 28 Apr 2014, 17:54
- Location: Bretagne / France
I just figured it out and yeah, it's working great. Your tip, thank you!
My code (in startup dir)
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
[/img]
My code (in startup dir)
Code: Select all
#!/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
Or create a file named 1 in ./wmstickynotes
[/img]
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752