Improved an applet. Care to test?

About programming and getting involved with Linux Mint development
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Improved an applet. Care to test?

Post by Drugwash »

First of all I don't understand why there's no specific section on this board for generic code talk. No idea where to ask certain code-related questions or publish things like this one here.

Practically I felt bored one day and since I had just installed a new applet that does what the built-in commands should do but don't some ideas popped to mind. Someone on its specific page was asking ironically what this does that an older similar one doesn't. Well, for starters it doesn't ask the user to install an extra mandatory library. I like that.

Before continuing someone might ask why not go to github and interact directly with the developer/maintainer. Hell no. That place - besides belonging to Micro$oft - is so weirdly structured that I just can't understand it. And even if I took one week or one month to try and grasp its concepts I'd forget everything within a couple days due to my bad memory. Not to mention the whole login procedure, which is unacceptable in either variant. So no github. If the current maintainer @cardsurf happens to be passing by I'll gladly have a chat.

OK, so the applet is called Brightness and Gamma Applet. Its official Spices page is here.
What have I done? First of all added a tooltip. I hate it when a tray icon doesn't tell me what it's doing there, more so when its icon is ugly-symbolic and ambiguous. So now it displays a nice tooltip with details on the screen and displays it's enabled for, the Mode (talk about that right away), and the percentual levels for Brightness and RGB. Tooltip gets updated in real time when scrolling mouse wheel over icon to adjust brightness.

Then I added a Mode switch upon middle-click that cycles through three different modes: Day, Night and Custom. For now only Brightness can be set to different values for each mode. It's more like a proof of concept, a test. If/when I feel again like messing with code I may improve it even further. Oh and there's also a brief popup notification when cycling through modes so the user knows exactly what was chosen since the tray icon does not (yet?) reflect current mode.

There are many other things to do, like saving/loading all custom values for all modes; for now they are hardcoded (for brightness only). Or options to choose specific icons for the popup notifications (and tray icon maybe, at some point). Other ideas would be welcome.

This mod has only been tested in Mint Cinnamon 19.2. Hopefully it works in other older or newer versions but that's for you to test and report back, if you want to.
Installation is as simple as unpacking the contents of the archive (folder included) in ~/.local/share/cinnamon/applets.
If already installed choose to overwrite all files. Of course, backup the existing applet's folder before overwriting, just in case.
a) If applet is already enabled and running, open Looking Glass (right-click panel > Troubleshoot > Looking Glass), select the Extensions tab,
find Brightness and gamma applet in the list, right-click it and choose Reload Code.
If it doesn't show back up in the tray switch to the Log tab and look at the bottom for any related error messages. Then please copy/paste here hoping it can be fixed. But hopefully there won't be any errors.
b) If applet was not previously installed you will have to open the Applets GUI (Main Menu > Preferences > Applets) and enable it there.
At the same place it can later on be disabled or uninstalled if so desired.

LATER EDIT:
Please read through the rest of the topic,there is now a fork of this B&G mod called Applet PYE sporting more features.
A download link for the latest version is placed here for convenience but it is advisable for you to read through as there may be useful hints and advices posted along. Most important advice is to first disable or uninstall all similar applets (B&G, B&G mod, Redshift, qRedshift etc) before installing and enabling Applet PYE - otherwise there will be conflicts that could even hang or crash Cinnamon.
applet-pye@drugwash_0.0.6.2.zip
(150.77 KiB) Downloaded 9 times

The following remains here for historical purposes.
applet-pye@drugwash_0.0.6.0.zip
(159.05 KiB) Downloaded 3 times
Here you are v1.1.2.1 based on official v1.1.2: (latest version of the mod, v1.1.3.1, can be found a few comments below) Enjoy! 8)
Last edited by Drugwash on Sat Jun 05, 2021 10:44 am, edited 3 times in total.
dorsetUK
Level 5
Level 5
Posts: 598
Joined: Thu Sep 19, 2019 4:40 am

Re: Improved an applet. Care to test?

Post by dorsetUK »

Drugwash wrote:
Mon Feb 01, 2021 5:15 pm
OK, so the applet is called Brightness and Gamma Applet.
Hi Drugwash.

I've been using the original applet for ages and have now updated to your version and it's great - it does what you say it does.

Thanks.
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Thank you so much for your feedback! I was really wondering if anyone would ever say something, anything, after all downloads.

I already have a slightly improved version here which changes tray icon to reflect current mode but have been waiting for some feedback on a Panel/Cinnamon issue with tooltips that I posted about on GitHub recently. No feedback there either. :?

There is also something else I've been working on separately with the intent of implementing the idea here in this applet. It's about a fourth mode, automatic, that gradually decreases/increases brightness/gamma based on current geographical location and time of the day. Large part of the code is done but still needs to be worked on. Currently I'm a bit sidetracked by a Pale Moon add-on but hopefully will manage to fix it this week, then get back to this applet.

Here's the slightly improved version, in the mean time: If you need to modify the brightness defaults for Day and Night there are two values in applet.js that can be changed:

Code: Select all

this.brightness_day = 95;
this.brightness_night = 60; 
Values should be in the maximum range of [0-100] theoretically but a value below 50 or 40 would already be unusable.
After modifying and saving the file, code should be reloaded as explained above.
User avatar
Burning Desires 69
Level 2
Level 2
Posts: 93
Joined: Mon Feb 15, 2021 6:30 pm
Location: Your Backyard!
Contact:

Re: Improved an applet. Care to test?

Post by Burning Desires 69 »

Does this in any way work like it does on Windows?

Day Time = Bright Screen & Bright Backlighting & Full Color
Night Time = Less Bright & A More Orange Hugh or Tint Color

That was how it was on Windows. It Dynamically Adjusted Over Time
To Help Those Who Had Issues Adjusting To Light Conditions & Such.
There was also an Indication for a "Clock", so that we can decide when
Night & Day Starts.

Such as a Condition where it's sorta light outside, but it's cloudy & rainy
& not so bright & sunny... Some might have a hard time adjusting to
these light Conditions.

-----------------------------

If your Improved Applet can work & do this? Then i'll be sure to take a look at it myself. =D

My Linux Mint does not appear to do this currently. So if this works, it'd be great.
I Loved World = 80's & 90's
World Hates Me = 2016 to 2019
I Hate World = 2020 & ^
They want us to Suffer, then lets speed it up, just burn our Sanity away. Else, Shut It!
A "Scar" Means? Yur About To Find Out, The Hard Way!
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Hi, thank you for your comment.

For now this version of the applet does not yet do what you're asking for. However, my intention is to implement those features and I'm working on it, but having no previous experience with manipulating screen gamma, color temperature and all that makes it a little difficult. On top of that, finding useful details on the Cinnamon API is hard, and some things appear to not be fully developed - or maybe I didn't search deep enough. Such as creating Sliders in a menu with a fixed, user-defined step instead of percent, and adding certain value markers.

What this can do for the time being is define brightness for day time, night time and an additional custom mode where the user can freely adjust the value at any time with a simple turn of the mouse wheel over applet's tray icon. Actually the latter was the only feature of the original version. The RGB settings in the menu act like a sort of complicated color temperature + gamma changer. It so happens that last night I've implemented an imperfect color temperature control which doesn't yet play nice with the overall gamma set by the individual RGB sliders. It's a work in progress.

The automatic adjustment of brightness and color temperature based on current time is a feature that I've worked on separately, for testing purposes. Unfortunately no feedback from users on whether it works correctly or not in different parts of the world. The idea is to not have fixed points of separation between day and night, because we know the duration of day and night time changes everyday by nature and is different in different corners of the world, but continuously shifting points based on twilight and geolocation data retrieved from online services. This way the user would always have the smoothest and most accurate transition of brightness and color temperature at any time, in any corner of the world - even while traveling - while the only condition would be an Internet connection for a few seconds at least once a day.
Of course, this could be approximated locally in the code with a lot of work but it wouldn't be as accurate, and for travelling people it would become even more inaccurate. However I'll consider this possibility for people with scarce or no Internet access, see if I can implement it in a resonable manner. Until then, if you would like to test the twilight and geolocation script and provide feedback, you can find it here as a Desklet (incidentally it was easier to build on an existing script, just as with this one, but differences between applets and desklets are minimal on the code side).

If you have other requirements, ideas, observations, or bug reports please feel free to explain them here in detail.
Removed attachment, had a bug that prevented it from loading. Bugfix version below.

P.S. I'd be interested in the Windows feature you mentioned - is it a built-in feature (of Win10, I presume) or a downloadable application or app? Might be useful to look at it but I can only use a virtual XP here, no room for installing Win10 or anything.

Also, in all fairness you might wanna try the qRedshift applet from the Spices repository with the right settings, maybe it does at least part of what you need for now, until I manage to put together all features in this B & G applet.
Last edited by Drugwash on Sat Mar 27, 2021 9:35 pm, edited 1 time in total.
User avatar
Burning Desires 69
Level 2
Level 2
Posts: 93
Joined: Mon Feb 15, 2021 6:30 pm
Location: Your Backyard!
Contact:

Re: Improved an applet. Care to test?

Post by Burning Desires 69 »

Few things I wanted to Point out:
For now this version of the applet does not yet do what you're asking for. However, my intention is to implement those features and I'm working on it, but having no previous experience with manipulating screen gamma, color temperature and all that makes it a little difficult.
My Reply: This is Perfect.

Explanation Of It Working?

My Reply: Seems you know quite well what your looking for, & what you wanna do with this.
Your Explanation was fairly therough, & well put together.

In Conclusion: Maybe you could At least add a #N Space for Keyboard input would be great,
so in case if someone messed up the slider, they can use this to put it right back to where it
was before the mess up, such as accidentally clicking the slider. 1 Issue I found on Windows
was that the color & brightness Option was 1 thing instead of 2 Separate things.

So for Example:

The lower the brightness got, the more the screen became Overly Orange, & the brighter the
screen got, the more the Overly Orange went away. But say I wanted a small bit of Orange
where I wanted an even lower brightness, or say I just wanted only a tint of Orange to show...
I was not able to do that on Windows. The issue was not being able to Control how strong
the Orange Coloring was appearing on my Desktop when it became Night. It wasn't an
issue on my Desktop at all, but it did seem to effect how I was able to run & setup my
Games from my in-Game Settings sometimes when I played Games.

Bugs Reports: New Version Exists With Color & Temp Bugs Between CT & RGB.

Got It. It didn't come Pre-Installed With Windows 10, but I can find a way to
Demonstrate how it works. If this Forum lets me. I can check out qRedShift,
but for now...

I'm gonna check out your Applet, & i'll let you know some Feedback on it, =D
I Loved World = 80's & 90's
World Hates Me = 2016 to 2019
I Hate World = 2020 & ^
They want us to Suffer, then lets speed it up, just burn our Sanity away. Else, Shut It!
A "Scar" Means? Yur About To Find Out, The Hard Way!
User avatar
Burning Desires 69
Level 2
Level 2
Posts: 93
Joined: Mon Feb 15, 2021 6:30 pm
Location: Your Backyard!
Contact:

Re: Improved an applet. Care to test?

Post by Burning Desires 69 »

These Are The Settings Before They Are Applied:

https://imodtoy.com/wp-content/uploads/ ... -img-6.jpg


This Is What It Looks Like After It's Applied:

http://www.removeithow.com/removewindow ... ero-01.jpg


Was that helpful at all? Btw, I found the best balance in the Yellow Area or 50% Area, the
first Picture Above seems to show exactly where I would place my slider, but they didn't
turn on the Option to indicate how it looks, however going past that point just made the
screen look like a really bad case of Hot Orange Color. Which gets even worst the further
you move the slider to the left, =D

My Desktop is from some point around 2017, I don't know if it's still the same way Today.
Again, it Dynamically adjusts over time, so it doesn't just jump straight to it.
I Loved World = 80's & 90's
World Hates Me = 2016 to 2019
I Hate World = 2020 & ^
They want us to Suffer, then lets speed it up, just burn our Sanity away. Else, Shut It!
A "Scar" Means? Yur About To Find Out, The Hard Way!
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

OK, thanks for all the details. The "orange thing" is the color temperature that sets the day/night appearance of the screen. Theoretically its value can go from 1,000K to 40,000K but for all intents and purposes a range of 4,500 to 9,500 should be enough. Daylight point is at 6,500K, lower values go into the orange spectrum for the night time.

The B&G applet sets the color temperature in real time while moving the slider, so that could be considered a preview for later on when all features will be implemented and linked. The Settings panel (right-click icon > Configure) allows setting the minimum and maximum values for the color temperature range, so with a careful setting - as in a narrower range, say 5,000K to 7,000K - the slider action may improve.

Noted the request for a numeric input field. Hopefully I would be able to find a way to change how sliders work in order to increase precision.

I'd be interested in feedback from people using a multi-monitor environment. Right now I don't quite like how this situation is handled but can't perform much testing either because my 19.2 Mint behaves badly when switching back and forth between one and two monitors, and it would be too frustrating to keep logging off/on or rebooting after every switch.

Here's a bugfix version, previous one had a missing dependency that I had forgotten to delete from the code. Sorry for that. :oops:
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Still working on this. It's become a full fork now. A few interesting - and hopefully useful - additional options. Online auto-updating implemented and functional.

Still no developer to talk to, and I do have quite a few delicate questions to ask. Such as:
- how to interact with the Settings dialog from the main code in order to have said dialog always open at a specific position and/or size? solved
- why doesn't the list widget in Settings display icons other than the system-standard ones in /usr/share/icons?
- why is the show_buttons list property in settings-schema ignored in Cinnamon 4.2?
- why is there no dedicated Time widget in Settings while there is a Date widget?
- is it me or certain Settings widgets (such as switches or comboboxes) ignore changes performed upon their values by the code until dialog is closed and reopened?
- is there a way to add an interactive text item in a popup menu?
- is there any kind of system-wide broadcast message when an Internet connection goes online/offline, that an xlet could hook and act upon?
- is there any way in javascript, particularly in Cinnamon where apparently xlet code is running in strict mode, to retrieve the name of the currently running function/method from within that very function/method? Obviously caller/callee won't work. Would be extremely helpful in debugging the workflow without having to manually type in the names in logger functions.

Wasted a whole lotta time searching for answers on the web, to no avail. Any hints, pointers, or downright answers would be appreciated. Thank you.
Last edited by Drugwash on Sun May 09, 2021 1:11 am, edited 1 time in total.
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Finally an almost working version. Still a few minor bugs and shortcomings but it's been long enough and my nerves are stretched to the max. Should be good enough for daily usage, I hope, unless someone discovers some huge issue.

Here's Applet PYE for you. A (hopefully) improved version of cardsurf's Brightness and gamma applet.
Not gonna waste much of your time with presentation and whatnot - there's a readme in the package, also accessible through applet's context menu after installation. If you already have a Markdown reader configured on your system it'll automatically show you a nicer version of the text file.

The tooltip, already present in the above improved versions of B & A. Now it can do bold text as well as larger fonts.

Image

The notification popup, also present in above versions. No improvements here other than the option to disable it if so desired.

Image

The main controls AKA the sliders. Two basic versions: symbolic icons with no decorations, or colored icons with decorations. Text size follows icon size, useful for accessibility purposes or when system doesn't play well with high DPI. Directly connected to tooltip font size.

Image

The context menu (right-click on panel icon) offers a few extra options that may or may not prove useful at times.
Follows the sliders menu in regard to icon and font size.

Image

The settings dialog. May appear overwhelming at first, but usually there's no need to fiddle with it for too long - just until the closest-to-perfection values and settings are reached, then forget about it. Anyway, it's better to have choices than no choice at all (it's such a dangerous act to swim against the current these days). Choose wisely!

Image

One last word: I really really wanted to implement a way to control each monitor separately when in multi-monitor mode, but my machine is acting up very badly with an external monitor enabled - it crashed and locked up Cinnamon and the entire machine merely for changing position of monitor 2, after completely screwing up the icons on the desktop - so I'm afraid such feature may have to wait for quite some time, if I ever get to fix or work around this issue. Sorry about that.
Here's the package, just unpack it in ~/.local/share/cinnamon/applets/ and enable in the Applets dialog:
applet-pye@drugwash_0.0.3.3.zip
First public version of Applet PYE
(149.61 KiB) Downloaded 12 times
That's it. Hopefully nothing bad will happen from using this applet, but either way remember: you're on your own. Feedback would still be appreciated though, and if possible bugs may get fixed.

Good luck, may you be happy and bring happiness to those around you! 8)

P.S. Please remember to disable (or uninstall) any existing version of Brightness and gamma applet (or any other similar applets such as Redshift, qRedshift etc) before installing and enabling this one, otherwise there may be conflicts in the settings and/or issues with Cinnamon.

P.P.S. Darn it, seems lately I paid too much attention to visual gimmicks and somehow functionality got screwed up. There are a few bugs I just noticed only after posting - just my luck:
- context menu applet reload is non-functional (fixed offline, will be in next version)
- auto mode won't kick in when switching modes, only starts timer when day/night value is modified in Settings for the offline mode
- slider marks don't get updated when min/max values are changed in Settings

Will try to address these issues as soon as possible after I get some sleep (haven't slept in 28 hours). Sorry for the mess folks. :oops:

EDIT: Here you go. Maybe I can really go to sleep now after 32 hours...
applet-pye@drugwash_0.0.3.4.zip
Bugfix version
(146.75 KiB) Downloaded 18 times
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

New version 0.0.3.5. Download:
applet-pye@drugwash_0.0.3.5.zip
(147.48 KiB) Downloaded 10 times
Change log:
- Settings dialog has become shy: opens shrinked at the top-left corner of the screen, and dissapears upon applet reboot

Thank you WWW for your help...
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

No feedback so far so at least a major bug got carried through a few releases. Used to test it in place with settings file already present didn't realise it wouldn't even start without it. My bad. :oops: Now hopefully it will at least start up.

Changes are in the tooltip - it all started with it, remember? - and under the hood in the way connected/enabled monitors are detected. Still far from perfect but hopefully a step forward towards correctly managing a multi-monitor environment. I even set up an external HDD with a 20.1 Cinnamon for testing purposes.

Calculations are still imperfect, and it seems whenever I fix something another thing breaks. Just my luck. So don't wonder too much when sliders/values go about on their own. Shouldn't be too much of a problem though.

Anyway, here's the latest. Would like to hear from you, be it good or bad news.
applet-pye@drugwash_0.0.4.1.zip
(153.32 KiB) Downloaded 10 times
P.S. The testing mode accidentally remained enabled so you'll see a couple extra things in the menus. :D
User avatar
Themero
Level 1
Level 1
Posts: 17
Joined: Fri May 21, 2021 11:57 am
Location: UK

Re: Improved an applet. Care to test?

Post by Themero »

Hello @Drugwash :D

Just gave 0.4.1 a test on cinnamon , i,m sensitive to bright light and have been looking for something to help dim the screen from the desktop , cant be bothered changing the brightness on the monitor lol .

Anyway i'll give you some specs ... Linux Mint 20.1 Cinnamon - Cinnamon 4.8.6 - kernel 5.4.0-73-generic - intel i5-6500T + HD 530 gpu ( nonfree driver ) - 16gb Ram - 500gb ssd.
1st thing there's no icon appearing in task bar at all , if you scroll along a small vertical column can be found , installed into correct folder and no other version of any brightness app on the system . lets see if i can get these screenshots to upload ..
Screenshot from 2021-05-21 17-30-51.png
view after installing ..
Screenshot from 2021-05-21 17-31-07.png
view when scrolling to find the app

apart from that it works great , no crashes or warnings and adjusts brightness perfectly .. nice job :)
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Thank you very much for testing and for offering feedback.

This issue used to happen due to a slight mismatch between the settings schema and the main script in regard to icon location. Should get fixed after cycling modes at least once. Just middle-click on the tiny empty space where the icon should be and then Ctrl+middle-click to get back to previous mode.
I thought it was fixed, maybe it's in a more recent, not-yet-released version. Sorry for that. :oops: Please report back if the click trick worked.

Currently I'm working on redesigning the Settings dialog but it will take some time before it gets finished - it's not easy to learn a couple programming languages from scratch in a few weeks.
In the mean time here's a newer version that should hopefully fix the icon issue. It has a few minor changes to the code, not sure how beneficial.
applet-pye@drugwash_0.0.4.3.zip
(155.71 KiB) Downloaded 10 times
Please note that since you already installed a previous version the wrong icon path will still be in the configuration file (unless it gets fixed by the middle-click trick). If it doesn't get fixed then you'll have to manually delete the configuration file after updating to this new version.
Config file is here: ~/.cinnamon/configs/applet-pye@drugwash/applet-pye@drugwash.json
User avatar
Themero
Level 1
Level 1
Posts: 17
Joined: Fri May 21, 2021 11:57 am
Location: UK

Re: Improved an applet. Care to test?

Post by Themero »

No problem , i'll give it a go and get right back to ya with the results :D
User avatar
Themero
Level 1
Level 1
Posts: 17
Joined: Fri May 21, 2021 11:57 am
Location: UK

Re: Improved an applet. Care to test?

Post by Themero »

ok and the results are in :D

clicks worked , middle click cycles through the presets on v 0.4.1. , full system restart and still the same , layout hasn't changed .
cleared the previous version and tried 0.4.3 .. same results , no icon appearing in the panel , clicks work fine but now the menu randomly pops up from time to time .
just out of interest I also tried cardsurfs version which also had no icon in the panel either , but was able to assign an svg i downloaded to it and its working ok so far , here's the link to the one i used , might be any help :)

https://www.svgrepo.com/svg/14464/half-moon
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

Hm, this is quite strange. One reason could be that you're installing the applet as root instead of user. In such case the path to the icons wouldn't match since the script expects a user path. I'll have to check this possibility out.
Could you please confirm whether the applet folder is placed in ~/.local/share/cinnamon/applets or in /usr/share/cinnamon/applets ?

The menu popping up is a new one; never happened here. Is it the sliders menu or the context menu? Either way none of them should come up out of the blue except when changing certain options in the Settings panel - there is a short (4.5sec) preview for both sliders menu and context menu, and also for the tooltip when switching between normal text and bold text.

Oh and there is (or was?) a bug in Cinnamon that in certain situations keeps a previous instance running after reloading an applet so there can be clashes; this can be seen in the Settings panel at the Extra tab when changing certain options - duplicate tooltips or menus appear shortly, usually at the top-left corner of the screen. In that case a Cinnamon restart is required (the context menu provides such option as a convenience).
User avatar
Themero
Level 1
Level 1
Posts: 17
Joined: Fri May 21, 2021 11:57 am
Location: UK

Re: Improved an applet. Care to test?

Post by Themero »

yes its installed in /usr/share/cinnamon/applets .

And the pop up is the context menu . I've noticed it happen with a cpu monitoring applet before as well , it basically locked up the desktop and the only way out of it was to power off the pc and start again . must be something with cinnamon applets :|

i'll install in local and see what happens :)
User avatar
Themero
Level 1
Level 1
Posts: 17
Joined: Fri May 21, 2021 11:57 am
Location: UK

Re: Improved an applet. Care to test?

Post by Themero »

yesssssssss local/ share does the trick :D

on the panel
Screenshot from 2021-05-21 22-09-19.png
right click
Screenshot from 2021-05-21 22-09-34.png
and move over the menu
Screenshot from 2021-05-21 22-09-48.png
middle click toggles modes and scroll wheel changing brightness levels

we have lift off lol
User avatar
Drugwash
Level 4
Level 4
Posts: 271
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Improved an applet. Care to test?

Post by Drugwash »

You have no idea how p-ed off I am because of these languages; they basically cut off all access to useful functions. In Python at least one can easily get the path to the currently running script so a path to subfolders can then be derived, but so far couldn't find out how to do this in javascript where it's mostly needed (in main applet.js in order to build a path to the icons subfolder). All scripts I checked out so far assume they are installed in the user home path so they'd all fail miserably if they were installed as root and need to get files from home-relative subfolders. In AutoHotkey it'd be as easy as getting A_ScriptDir and combining it with the relative path. Darn, when I ever get this to a final usable state I will do a Windows version in AutoHotkey runnable under Wine. Provided I survive that long.

Anyway, glad it works now at least as user, but it still has a problem that only recently came to mind: the symbolic icons are all black and therefore invisible in a dark theme, as proven by your screenshots. I would've used system's own icons but there are too many missing. Not sure how to detect if/when a dark theme is active in order to switch to light icons - if I could find any, or maybe I'll have to create them.
Post Reply