- This topic has 4 replies, 4 voices, and was last updated Aug 3-6:16 am by blur13.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › New users › New Users and General Questions › exec .sh in Conky
Hi everyone!
This is driving me insane. I want to have the volume displayed in my conky so I wrote a simple bash script:
#!/bin/bash
awk -F”[][]” ‘/Left:/ { print $2 }’ <(amixer sget Master)
named it vol.sh, placed it in $PATH and added it to the .conkyrc by using:
Vol: ${exec vol.sh}
That results in just “Vol:” on my display. Running the script in the terminal results in “65%” or whatever the volume happens to be at. What am I doing wrong here?
Any help appreciated.
Hi @blur13
I tried the following and it works for me. Just add the following to the end of the .conkryc file, or where ever you choose:
Volume: ${exec amixer get Master -M | grep -oE -m1 "[[:digit:]]*%"}
Yes, there were problems with the command…
$ awk -F”[][]” ‘/Left:/ { print $2 }’ <(amixer sget Master)
awk: cmd. line:1: ‘/Left:/
awk: cmd. line:1: ^ invalid char '�' in expression
bobc@XPS15-7559:~
$ amixer get Master -M | grep -oE -m1 "[[:digit:]]*%"
88%
bobc@XPS15-7559:~
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |