Closed NetMan134 closed 2 years ago
Can you paste the output of the command if you also add -v --debug
?
Also, can you run this and paste the output:
pactl list sinks | grep -A 15 "Sink #0"
pactl list sinks | grep -A 15 "Sink #0" | grep "^[[:space:]]Mute:" | cut -f 2 -d ':' | tr -d ' '
Can you paste the output of the command if you also add
-v --debug
?
Hi, Thanks for your response, here it is:
./git/lemontify/lemontify: 93: eval: 2: parameter not set
Platform: Linux
Options:
debug: 1
verbose: 1
duration: 1.5
provider: audio
command: NULL
empty: 1
ramp: 0
line: 0
step: 5
text: WithEmptyRects
Functions:
Linux_audio_set() = 1
Linux_audio_get() =
Linux_audio_status() =
audio_icon() = %{c}%{O-50}%{l}
critical error: unable to determine platform|provider icon & level
Also, can you run this and paste the output:
pactl list sinks | grep -A 15 "Sink #0" pactl list sinks | grep -A 15 "Sink #0" | grep "^[[:space:]]Mute:" | cut -f 2 -d ':' | tr -d ' '
When I list sinks, I have Sink #50, #53 and #54, and searching #0 with grep is blank. I would also like to clarify, I'm using Sharkoon SGH2 USB headphones, and they are visible as Sink #50, so I ran these commands modifying Sink #0 to #50:
First command:
Sink #50
State: IDLE
Name: alsa_output.usb-Sharkoon_Technologies._Skiller_SGH2_3rd_Jun_2017-00.analog-stereo
Description: Audio Adapter (Unitek Y-247A) Analog Stereo
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 30419 / 46% / -20,00 dB, front-right: 30419 / 46% / -20,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: alsa_output.usb-Sharkoon_Technologies._Skiller_SGH2_3rd_Jun_2017-00.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
Second command:
no
Again, thank you for the response, Oskar
Can you try editing the script and changing the 2 locations where it uses sink #0
to sink #50
and run it again?
Unfortunately I left my house and so my PC, but I've got my laptop (same OS, but slightly newer kernel - 5.18.9_1), installed lemonbar and lemontify, pactl list sinks
shows Sink #0
on here, so there should be no problems ther-
A blank instance of lemonbar launches at the top for a second, and lemontify throws this message onto my screen:
The geometry specified doesn't fit the screen!
Though it's a good thing we've got another error, am I right?
Thanks, Oskar
Can you run it with -v --debug
so we can see the output (should include the geometry)?
Yep! Here it is:
netman@ARISTO git/lemontify (master) » ./lemontify -p audio --text WithEmptyRects -e -v --debug 2 ↵
Platform: Linux
Options:
debug: 1
verbose: 1
duration: 1.5
provider: audio
command: NULL
empty: 1
ramp: 0
line: 0
step: 5
text: WithEmptyRects
Functions:
Linux_audio_set() = 1
Linux_audio_get() = 60
Linux_audio_status() = no
audio_icon() = %{c}%{O-50}%{T2}%{T1}%{l}
Lemonbar:
text: %%{c}%%{O-50}%%{T2}%%{T1}%%{l} %%{l} %%{T4} ▉▉▉▉▉▉▉▉▉▉▉▉%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T3}□%%{T1}%%{T1}%%{l} %%{c}%%{T1}WithEmptyRects%%{T1}%%{l}
cmd: lemonbar -m -d -g 400x350+483+431 -F#87FFAF -B#64000000 -o -215 -f DejaVuSans:style:Bold:size=14 -o -20 -f InputMonoNerdFont:pixelsize=180:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold
The geometry specified doesn't fit the screen!
What is your screen resolution? The attempted geometry seems quite small 400x350+483+431
, I have no idea why the error message would appear.
This project was never meant to be working as is on many systems, as you’ve noticed it has hard coded audio sink, hard coded fonts and probably other very specific adjustments to my systems, if you wish to further debug this what you can do is work backwards without the script and then figure out what went wrong.
Lemonbar is very simple, it takes piped text displays it, I.e. echo text | lemonbar …
, try and figure out the program first and see how to make it work on your machine, what geometry works and what doesn’t and then you can adjust the script (which just builds the text that will get piped into lemonbar).
My screen on this laptop a 15-inch panel with 1366x768 resolution set
My screen on this laptop a 15-inch panel with 1366x768 resolution set
Confirming this geometry should be contained within the screen.
Try running echo text | lemonbar -g …
with different numbers and figure out what values it’s willing to accept.
I took the:
lemonbar -m -d -g 400x350+483+431 -F#87FFAF -B#64000000 -o -215 -f DejaVuSans:style:Bold:size=14 -o -20 -f InputMonoNerdFont:pixelsize=180:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold
command and changed 400x350+483+431 to 300x300, and I've got a transparent black square at top left of my screen with no text, nor icon
Max value lemonbar accepts is: 400x400+966+368
And when I did this again:
I took the:
lemonbar -m -d -g 400x350+483+431 -F#87FFAF -B#64000000 -o -215 -f DejaVuSans:style:Bold:size=14 -o -20 -f InputMonoNerdFont:pixelsize=180:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold -o 40 -f InputMonoNerdFont:pixelsize=26:Style:Bold
command and changed 400x350+483+431 to 300x300, and I've got a transparent black square at top left of my screen with no text, nor icon
But with the -g 400x400+966+368
, it does appear in the bottom right corner, as suppose to the top left
I managed to somewhat place it in the center with
200x200+483+184
(launched a white program to show lemonbar because this wallpaper is dark at just the center) ![image] (https://user-images.githubusercontent.com/46296255/179367365-a33a2997-f5b8-476e-9155-947775b5c7a6.png)
Edit: To not create new comments about the same thing, I'm doing an edit to the pre-existing one: I managed to figure out how this geometry works and it's in the center! But still, unfortunately no icon, no text, indicator. I've got all necessery dependencies and fonts installed.
This is the part of the script that determines the geometry based on screen dimensions: https://github.com/ibhagwan/lemontify/blob/ab1f6c100d00948e6d89a7bff75067c7cdc287fb/lemontify#L621-L629
Maybe you can try hard coding the center geometry you found at line 629 and try running the script like that?
Yeah, I'm just looking at it, will give an update in a sec
Yeah, I'm just looking at it, will give an update in a sec
Don’t worry, if you’re dedicated enough we’ll make it work :)
It works! Still though, everything else is missing :I
I don't know why the screen recorder didn't record the switch to another workspace? Nonetheless it works.
I don't know why the screen recorder didn't record the switch to another workspace? Nonetheless it works.
So does it work now or are the icons missing?
Icons are missing, sorry for misunderstanding
Did you adjust the fonts in the script to ones that exist in your machine?
Use fc-match
to see if you have the right fonts or change the fonts (top of the script) to the ones you have installed:
# fc-match InputMonoNerdFont:pixelsize=26:Style:Bold
InputMono Bold Nerd Font Complete.ttf: "InputMono Nerd Font" "Bold"
# fc-match DejaVuSans:style:Bold:size=14
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
Also try running without the multi line support just to see if this is the issue:
lemontify -p audio -l -v --debug
It looks like I don't have a "Input Mono Nerd Font", cause the output says DejaVuSans, but all of the other Nerd Fonts appear in the gucharmap though
It looks like I don't have a "Input Mono Nerd Font", cause the output says DejaVuSans, but all of the other Nerd Fonts appear in the gucharmap though
Why don’t you change line 24 to any random nerd font that’s installed on your laptop?
icon_font="JetBrainsMonoNerdFont"
I just did that, modified the muted icon, changed temporarily to MaterialIcons font I use with polybar, and yet here it is!
I just did that, modified the muted icon, changed temporarily to MaterialIcons font I use with polybar, and yet here it is!
Wohoo! :)
Does it control the volume levels properly? Do the empty/full level squares show up as well? Did you also try controlling the brightness/backlight?
1 - I guess I have to add it to my media keys bind in i3 config, because I didn't try that yet Edit: and this (probably, i guess?), has the connection to control audio/brightness?
2 - No (not yet) 3 - Adnotation to 1
1 - I guess I have to add it to my media keys bind in i3 config, because I didn't try that yet Edit: and this (probably, i guess?), has the connection to control audio/brightness?
Before you add this to your keybinds, make sure it works from the command line with debug prints and that the correct popup shows when you mute/unmute and increase/decrease volume
When I do lemontify -p audio --inc 10
or --dec 10
or with -i/-d, i get error: unrecgonized option
Oh nevermind, I had to put -s
in the middle of --dec [here -s] <value>
It did bring my audio level from 85% to 75% so it's working! Brightness also works
It did bring my audio level from 85% to 75% so it's working! Brightness also works
Great :)
I'm gonna have a break for now, I'll be back in a while
I managed to achieve this: Edit: I'm going to tweak it more later, midnight's coming, so that's it for today!
Oh, and also you can use @DEFAULT_SINK@
in pactl instead of manually hard-coding sinks, you know - if in the meantime you're gonna change your output to speakers/headphones, and to make this piece of script work in a bit more obscure environments with external USB, or PCI audio cards
Thanks for the amazing help, Oskar
I managed to achieve this:
Beautiful work!
Oh, and also you can use
@DEFAULT_SINK@
in pactl instead of manually hard-coding sinks.
Good find! I never needed much modifications as long as it worked on my system and this isn’t really one of my most used projects.
Happy we managed achieved your goal.
@ibhagwan
Sorry to bother again, at line 570 echo "" | lemonbar -m 2>&1 | grep invalid
verifying if your fork of lemonbar is installed, causes lemonbar to appear for a split second at the top of the screen, which in result arranges my bar and windows a bit, adding -d
to lemonbar arguments there resolves this.
Edit: Also, are you considering adding a license? For this use case you can use primarily MIT or WTFPL, check out https://choosealicense.com/
Thank you, Oskar
@ibhagwan Sorry to bother again, at line 570
echo "" | lemonbar -m 2>&1 | grep invalid
verifying if your fork of lemonbar is installed, causes lemonbar to appear for a split second at the top of the screen, which in result arranges my bar and windows a bit, adding-d
to lemonbar arguments there resolves this.
Good catch, doesn’t happen on AwesomeWM.
Edit: Also, are you considering adding a license? For this use case you can use primarily MIT or WTFPL, check out https://choosealicense.com/
Thank you, Oskar
I don’t think it’s needed, it’s been up for over 2 years you’re probably the only one who used it :)
Ah, alright then!
@ibhagwan Just one more thing, I forked this project and want to ask you if you permit me distributing it and changing the code, you know - I don't want to steal your property.
Thank you, Oskar
@ibhagwan Just one more thing, I forked this project and want to ask you if you permit me distributing it and changing the code, you know - I don't want to steal your property.
Thank you, Oskar
Have at it @NetMan134, it’s all yours!
Hi, I'm trying to run
./lemontify -p audio --text WithEmptyRects -e
for example to see how this works, and I get following message:I've installed the
bar
repository from your github (https://github.com/ibhagwan/bar) and I don't know what might be wrong? I would love to use this because it looks fantastic. I stumbled upon this by accident, but was earlier searching for similar solutions (volnoti for example) but they didn't appeal to me. This - does (or will, when it's going to work).Using: Pipewire with PulseAudio server OS: Void Linux x86_64 Kernel: 5.10.128_1
Thanks for your response, Oskar