Closed jovanlanik closed 2 years ago
Of course I can add some more configuration options to support your modules. Also a playerctl module is a good idea. Great if you find it useful as well. I'll add whatever turns out needed on my side.
I added the necesary changes to gtklock v1.3.4. It can now load multiple modules and loads system-wide modules (located in /usr/lib/gtklock/). The --module option has been replaced by --modules (used as $ gtklock -m first-module -m second-module
). The option can also be set in the config file. See gtklock(1).
There are only two modules available for now:
Both are available on the AUR.
I have no idea on how to use a module. I add the module name as an argument, right? Or the module path? I tried:
gtklock -m userinfo
gtklock -m userinfo-module
gtklock -m /usr/lib/gtklock/userinfo-module
gtklock --module=userinfo
gtklock --module=userinfo-module
...and hell knows what else. Nothing worked. Could you show me the command to use the userinfo module?
All of the following commands should work:
gtklock -m userinfo-module
gtklock -m userinfo-module.so
gtklock -m /usr/lib/gtklock/userinfo-module
gtklock -m /usr/lib/gtklock/userinfo-module.so
Do you get any warning messages?
Sure, like this:
$ gtklock -m userinfo-module
(gtklock:221645): GModule-CRITICAL **: 01:29:49.488: g_module_symbol: assertion 'module != NULL' failed
(gtklock:221645): GModule-CRITICAL **: 01:29:49.488: g_module_symbol: assertion 'module != NULL' failed
(gtklock:221645): GModule-CRITICAL **: 01:29:49.488: g_module_symbol: assertion 'module != NULL' failed
(gtklock:221645): GModule-CRITICAL **: 01:29:49.488: g_module_symbol: assertion 'module != NULL' failed
(gtklock:221645): GModule-CRITICAL **: 01:29:49.488: g_module_symbol: assertion 'module != NULL' failed
** (gtklock:221645): WARNING **: 01:29:49.494: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
What version of gtklock is that? Is it v1.3.4?
Yes. BTW, PKGBUILD specifies the version.
Can you show me the output of $ gtklock --help-all
?
$ gtklock --help-all
Usage:
gtklock [OPTION?] - GTK-based lockscreen for sway
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-config Show options available in the config
--help-debug Show options for debugging and styling
--help-gtk Show GTK+ Options
Config options
-g, --gtk-theme Set GTK theme
-s, --style Load CSS style file
-m, --module Load gtklock module
-b, --background Load background
-t, --time-format Set time format
-H, --idle-hide Hide form when idle
-T, --idle-timeout Idle timeout in seconds
-S, --start-hidden Start with hidden form
-l, --no-layer-shell Don't use wlr-layer-shell
-i, --no-input-inhibit Don't use wlr-input-inhibitor
Debug options
--debug-no-layer-shell Don't use wlr-layer-shell
--debug-no-input-inhibit Don't use wlr-input-inhibitor
GTK+ Options
--class=CLASS Program class as used by the window manager
--name=NAME Program name as used by the window manager
--gtk-module=MODULES Load additional GTK+ modules
--g-fatal-warnings Make all warnings fatal
Application Options:
-d, --daemonize Detach from controlling terminal
-c, --config Load config file
--display=DISPLAY X display to use
I'm pretty sure this is an older version... The --module option has been replaced by --modules in v1.3.3 and later. Check if you have another gtklock binary by running $ which gtklock
or try rebuilding/reinstalling gtklock from the AUR.
It would be of help if you could add the gtklock -v
flag to check the version. Yes, I had a version mismatch, after building it from source some time ago. It works now, thank you.
Probably I should know it, but I don't: where/how do I add the user image? I don't use gdm / sddm / lightdm, but ly, which is a TUI.
I think there is a way to add it using accountservice however I don't know any standalone tools to do that. Luckly it falls back to ~/.face (has to be a 96x96 png image), so I just use that.
Haha, alright. This should be mentioned in docs, however.
Actually I found mugshot just now, might work.
EDIT: mugshot works fine, I'll recommend it in the docs.
Haha, alright. This should be mentioned in docs, however.
Yeah, I'll work on the docs next.
BTW the module also has a few undocumented options available in the config file (~/.config/gtklock/config.ini):
[userinfo]
round-image=true
vertical-layout=true
under-clock=false
.face
does the job.
the module also has a few undocumented options available in the config file (~/.config/gtklock/config.ini)
I'd like to avoid messing with your config file, if possible. I had to do so in the case of swaync, since Erik does not support flags, but actually a GUI to edit your configs should not be on my side, if at all.
I'll see what I can do to make module options available as flags.
Very well.
Let me explain it better: new config keys/values appear in new versions. For the latest swaync I had to add a check against missing config keys, and I'm not really happy about it, as it slows my GUI down a little bit. That's why I prefer flags.
BTW: I think that nwg-shell users should know about the possibility to just edit your config file for better adjustment to their needs.
mugshot does the job as well.
Probably I should know it, but I don't: where/how do I add the user image? I don't use gdm / sddm / lightdm, but ly, which is a TUI.
My SwaySettings package is able to change the profile pick ;)
Good to know, thanks! I'll give it a try immediately. :)
@ErikReider It works well, however pictures seem overcompressed.
What are the specs of that image?
I created some documentation for the module at https://github.com/jovanlanik/gtklock-userinfo-module/wiki.
@ErikReider It works well, however pictures seem overcompressed.
Seems to work for me
Can you open a new issue?
Excellent, thanks. I need to find some place in my crowded GUI to add (a) checkbox(es) for your modules, but hope to do do it before going on vacation. 2 nights left. :)
@ErikReider Later tonight I'll try some other pictures. Possibly it's something wrong about this certain one. If I confirm the problem, will open an issue.
@ErikReider Sorry about the delay. I got stuck in a gtklock-related issue last night.
If it comes to the worse image quality when set with swaysettings, I think I know the reason. Mugshot does not scale pictures at all. It just saves them as ~/.face
and /var/lib/AccountsService/icons/$USER
, with no change.
My original picture was 512x512 @ 72 dpi, and swaysettings scaled it to 96x96 @ 300 dpi. This simply must look worse, especially on a drawing, not a photo. No reason to open an issue.
@nwg-piotr wait, was it the image quality or the lack of blended colors what you were referring to? I though that SwaySettings some how lowered the color depth
Sorry @jovanlanik for filling this PR with unrelated issues :)
LOL, I have deuteranopia. I don't talk about colors.
Done in nwg-shell-config 0.3.9. For now I added a single check box. We may need a more complex form when there are more modules.
Thank you, seems good enough for now considering the userinfo module is the only available one.
LOL, I'd add power menu or buttons (reboot / power off) if I were you. ;)
Not a bad idea...
@nwg-piotr I threw together a module https://github.com/jovanlanik/gtklock-powerbar-module. Should work with gtklock compiled from master... Only did some quick testing so it may not be perfect, let me know if you have any issues or ideas. Also didn't have time to document it, the module has 3 options in the config (these are the defaults):
[powerbar]
show-labels=false
reboot-command=systemctl reboot
poweroff-command=systemctl -i poweroff
Excellent!
I'm just about to release nwg-shell 0.3.0. Will check it out as soon as I can.
I'm getting in trouble while testing the module.
$ gtklock -m powerbar
** (gtklock:6313): WARNING **: 00:58:28.279: Module loading failed: /usr/local/lib/gtklock/powerbar.so: cannot open shared object file: No such file or directory
Try $ gtklock -m powerbar-module
or the full path.
@jovanlanik I've just added the powerbar support to nwg-shell-config. Thanks!
Hi, I've been working on expanding module support in gtklock and ported some of @ErikReider code to implement a user info module: https://github.com/jovanlanik/gtklock-userinfo-module
I'm wondering if a GUI option for selecting modules could be added to nwg-shell-config.
There's still some work left on my side, such as documentation, loading multiple modules at once and system-wide modules that could be installed via package manager but I wanted to discuss with you and see if you're interested.
Maybe even implement music controls as a module and leave input inhibitor enabled this way.
What are your thoughts on this?