Step-by-step guides for getting things done on Linux

Setting up Volume and Brightness Keys with Percentage Indicators with a Tiling WM

- Posted in Tutorial by

Hello readers, and welcome to our first actual tutorial! So setting up volume and brightness keys with a tiling WM is pretty much trivial, and may even already be done for you. For reference, the keys you want to use are called XF86AudioRaiseVolume, XF86AudioLowerVolume, XF86AudioMute, XF86MonBrightnessUp, XF86MonBrightnessDown, etc, with the full list of supported keys being at https://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols. I use sxhkd, so you may need to consult your keybind or window manager's documentation for the correct syntax, but the actual commands will be the same. So basically, I just use pamixer and xbacklight like so:

pamixer --increase 5
pamixer --decrease 5
pamixer --toggle-mute
xbacklight -inc 10
xbacklight -dec 10

This gets the job done, but we can go further. Wouldn't it be nice if a little box popped up telling us what the new volume or brightness is whenever we change it? Preferably without spawning a million of them for every time you use the shortcut of course. Thankfully, dunstify has a feature for this, namely notification ID's, which let you overwrite an existing notification by giving them a set ID with the -r [num] flag. To get the current volume, we use pamixer --get-volume-human, which gives us the final command:

dunstify -r 13 $(pamixer --get-volume-human)

For brightness the process is a little more involved, since the max setting in the sysfs file for brightness is often an odd number that doesn't divide nicely, and xbacklight will give the result to the millionths place which is annoying. Fortunately, that's nothing a little awk scripting can't solve, with the command awk '{printf "%.0fn", $1}'. (If you're wondering how it works, well sorry but I don't know awk and I forgot what it said on StackOverflow.) But anyway our final command will be:

dunstify -r 37 $(xbacklight -get | awk '{printf "%.0fn", $1}')%

Now we can just append these commands with an AND operator (the "&&" thing), and depending on your window/shortcut manager you may even be able to use shorthand to condense the commands in your config file. For me the final result is:

{XF86AudioRaiseVolume, XF86AudioLowerVolume, XF86AudioMute}
    pamixer {--increase 5, --decrease 5, --toggle-mute} && dunstify -r 13 $(pamixer --get-volume-human)
{XF86MonBrightnessUp, XF86MonBrightnessDown}
    xbacklight {-inc, -dec} 10 && dunstify -r 37 $(xbacklight -get | awk '{printf "%.0fn", $1}')%

Hope you found this tutorial helpful, if you liked it then please be sure to subscribe to my RSS feed, and until I get email protection setup if you have any questions then please feel free to message me over on Gab.

Get all your video subscriptions in one place with RSS

- Posted in Tutorial by

One feed to rule them all

As we all know, YouTube is becoming increasingly hostile to independent voices, in large part because of extreme political bias but also because they don't want to pay smaller channels who bring them less ad revenue. And if that's how they want to play it, then fine, the smaller channels and their audiences will just move to greener pastures and YouTube will remain the platform of choice for bottom-of-the-barrel normie garbage. Everybody wins! Except for one problem; while it's great that there are now multiple viable competitors to YouTube's dominance, it's also inconvenient having to check multiple different sites just to keep up with all your favorite channels.

Enter RSS, which I wrote about more in my last article but in summary is a simple way to get updates from practically anywhere on the web in a reader of your choosing. As I mentioned toward the end, finding a site's feed isn't always easy, but this article is here to help, at least with the more popular video sites. So let's get started!

YouTube is probably the hardest, but also the most popular so we'll deal with them first. The URL format is https://www.youtube.com/feeds/videos.xml?channel_id=UCzZpgppwC_XQMe8lFiI77-Q and usually the ID is at the end of the URL for the channel's page Sometimes this isn't the case though, so the easiest solution is to use a tool like the one at https://commentpicker.com/youtube-channel-id.php to get it for you. If you want to get technical, you can just search for "channel_id" in the page's source code, which you can see by pressing F12 and searching with Ctrl+F.

For Odysee/LBRY, official RSS support has recently been added! To subscribe, simply click the menu icon at the top right of the channel's banner, and click "Copy RSS URL". The URL format should be something like https://odysee.com/$/rss/@ComputingForever:9

With Gab TV it couldn't be easier, as there are feed buttons just below the normal "Subscribe" button on each channel's page. If you're curious, the URL is something like https://tv.gab.com/channel/thomasmoresoc/feed/rss with the channel ID being the same as in the URL of the channel's page.

It's much the same story for PeerTube instances, as you just click "Subscribe via RSS" at the bottom of the channel's "Subscribe" menu. Again, for those curious this uses a format like https://videos.lukesmith.xyz/feeds/videos.xml?videoChannelId=2 (note that the domain will vary depending on what instance you're using. Also, you'd need to know the channel ID, so this isn't very useful.)

On BitChute (which in lowercase without spacing is the worst domain name ever) the format is https://www.bitchute.com/feeds/rss/channel/corbettreport/ Note that you want the username of the channel's owner, not it's ID.

As for Rumble, well they don't have RSS so you're stuck using a feed generator, though given the absolute boomer-tier content on their homepage I doubt it would actually be of use to most of their users anyway. >_> Well, it looks like they have a decent API so if you wanted to you could scrape https://rumble.com/api/v0/Media.Channels.mrss?_p=APIKey&channel=DineshDsouza&criteria=sort=views and parse whatever is the output of that as needed to generate an RSS feed. Maybe I'll write a script for that; if I do I'll update this post and put it in the Goodies section of this site.

Well there you have it! With a good RSS reader, you're now ready to setup a one-stop spot for all your video needs. Next up, we'll be doing some more in-depth reviews of popular RSS readers and services. If you don't see instructions for your favorite platform, do let me know over on Gab or in the comments once I revamp this blog. Adios!