You are not logged in.

#3426 2020-11-21 19:51:50

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,125

Re: Post your handy self made command line utilities

Oops, now I see, I need a good night rest I think..
Yeah, you're right I use a menu, my rationale was; why 'remember' if I can let the script do it for me tongue

Offline

#3427 2020-11-28 22:08:08

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,445

Re: Post your handy self made command line utilities

Systray Bluetooth Profile Switcher

https://github.com/ugjka/bt_profile

Offline

#3428 2020-11-30 19:23:00

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,033
Website

Re: Post your handy self made command line utilities

Since I'm using multiple kernel flavors but no boot manager with a visible menu, I wrote a hook to display the currently booting kernel version:

$ cat /etc/initcpio/hooks/uname 
#!/usr/bin/ash

run_hook() {
    echo -n "   "  # Align uname output with hook header.
    uname -r
}
$ cat /etc/initcpio/install/uname 
#!/bin/bash

build() {
    add_binary "uname"
    add_runscript
}

help() {
    cat <<HELPEOF
This hook prints the current kernel version during the initramfs phase.
HELPEOF
}

Offline

Board footer

Powered by FluxBB