Some Bash scripts
Find a file
Einar Mostad aea8634129
Merge with upstream
Merge branch 'main' of codeberg.org:einar/scripts
2025-12-14 15:59:28 +01:00
batteristatus.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
bgshuffle.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
bluetooth.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
dagsrevyen.sh Improved README, fixed a mistake in dagsrevyen where I would miss out the first minute of a live news broadcast and added a script for uploading files to my website. 2024-03-17 14:35:04 +01:00
emoji Added Luke Smith's emoji file. It's GPL3, so no problem redistributing it. 2023-04-23 22:44:24 +02:00
emoji.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
hjemmeside.sh New version of hjemmeside.sh to automate updating my blog. 2025-03-12 23:55:53 +01:00
lastopp.sh Improved README, fixed a mistake in dagsrevyen where I would miss out the first minute of a live news broadcast and added a script for uploading files to my website. 2024-03-17 14:35:04 +01:00
LICENSE Changed the LICENSE file to the actual GPLv3. 2025-07-19 03:01:49 +02:00
mussikk.sh Some small changes to mussikk.sh 2023-11-05 21:52:22 +01:00
nestebg.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
nyttpaanytt.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
radio.sh Changed hardcoded address to reflect where the radiokanaler file is. 2025-03-15 22:11:57 +01:00
radiokanaler Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00
README.org Updated README with emo-play-album function. 2025-12-14 15:59:15 +01:00
ytfeed.sh Changed shebang for compatibility with more distros 2023-08-05 10:24:01 +02:00

Scripts by Einar Mostad

General overview

These are Bash-scripts I use mostly in combination with the Sway window manager on GNU/Linux. I do not use a bar or panel since it wastes space. Therefore, some of these scipts implement functionality that is commonly found in bars like a battery indicator or a script to turn bluetooth on. Other scripts are nice to have functionality like a radio player, an album-based music player and a way to get the latest TV news or satire program. I bind my scripts and other functionality I use often to keyboard shortcuts in Sway and often bind something to stop what the script does to the same keyboard shortcut plus shift.

The file for each script starts with a comment that explains everything you need to know about its use and dependencies which is why I do not go into further deails here. Since Sway is a Wayland-native window manager, I do not use X11-native dependencies. I used to use bemenu in many of my scripts as a Wayland-native dmenu replacement. However, I have opted to use fzf instead lately since this makes it possible to use the same scripts within Sway (launched with "exec foot scriptname.sh" by a keyboard shortcut to have a foot terminal window for fzf) as on the tty, in WSL2, in a terminal inside Emacs (GUI or terminal) etc. Since the lowest common denominator is the tty, it is nice to make scripts runnable there if the nature of their functionality allows it.

On replacing these scripts with Emacs Lisp functions or built-in functionality

I replaced my Bash Shell scripts with functions inside my Emacs configuration or built in functionality in Emacs. I launch my functions with keyboard shortcuts in Sway or Emacs. I no longer clone down this repo in my install scripts. See the table below for what I have replaced with what. I keep this repo as a record of my past Bash scripts. If you prefer Bash scripts over Emacs functions, then have a look and see if you can reuse or remix the code (with a GPLv3 license) or the ideas for your own scripts.

Bash Shell script Superseeded by
batteristatus.sh Battery status in Emacs mode line
bgshuffle.sh Emo-bgshuffle function inside my Emacs config
bluetooth.sh Nothing. I never use bluetooth with my PCs now.
dagsrevyen.sh Nothing. NRK changed their URLs too often and live streams no longer work.
emoji.sh Emoji picker inside Emacs (C-x 8 e e)
hjemmeside.sh Emo-hjemmeside function inside my Emacs configuration
lastopp.sh I changed how I update my website so this script is irrelevant now.
mussikk.sh Emo-play-album function inside Emacs and MPC mode inside Emacs
nestebg.sh Emo-nestebg function inside my Emacs config
nyttpaanytt.sh Nothing. NRK changed their URLs too often and live streams no longer work.
radio.sh Emo-radio function that I run from the inside of Emacs
ytfeed.sh Emo-ytfeed function in my Emacs config

License and copyright

These scripts are shared under the license terms of the GNU General Public License version 3 or later (at your choice). See the License file for more information.

Copyright 2019 - 2025 Einar Mostad