Bash alias launcher

Non release banter
Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#1 by Vic » 18 Jun 2024, 02:22

I have been attempting to create an application launcher that does not need any special program, including the operating system.

After taking the KDE start menu to the end of my limits I dove into 9menu and expanded it as far as I could. I also looked at what Firefox could do. Alot. Add an html file and you have great capabilities, but you are relying on Firefox, and the same with 9menu and KDE.

I have been using bash aliases for a long time but not happy with the access. Type "alias" and there is a long list. So I decided to make a .bashrc file with only the text

echo " aliases "

where " aliases " are columns of aliases to copy n paste.

It took a while to get it all to line up in Kwrite but on a 1366 x 768 laptop display I now can see a 14 column menu with 20 to 30 items in each column. A double click , paste and enter gives whatever I want. The use of scripts expand the bash menu to do much more.

If anyone is interested here are screenshots and files

https://drive.google.com/drive/folders/ ... drive_link

Hope someone finds this useful and / or ridiculous.

Vic
Last edited by Vic on 16 Jul 2024, 23:49, edited 1 time in total.

User avatar
M. Eerie
Moderator
Moderator
Posts: 650
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

Bash alias launcher

Post#2 by M. Eerie » 18 Jun 2024, 08:50

Vic wrote:
18 Jun 2024, 02:22
Type "alias" and there is a long list
Did you try

Code: Select all

alias | fzf
B)

Also, I think it is a good practice to have all the aliases in a file, let's call it ".bash_aliases", and invoke them by including the following line in your .bashrc

Code: Select all

source ~/.bash_aliases
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#3 by Vic » 18 Jun 2024, 11:07

Hi M. Eerie

Thanks for replying.

My goal is still to use only programs that are included by default, just like my other post about schematics-2-text.
fzf is not present on my Porteux so that one is out. Plus it would have no way to know how I want the aliases to be presented.

I agree with you about dedicated alias files, which is why I made a 23 KiB file named .bashrc-01.
I reference it with the alias "01" so it is easy to type on the numpad.

Vic

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#4 by Vic » 25 Jun 2024, 12:58

I am continuing with my idea of a terminal based launcher.

Still using the numpad starting at 00 for the table of contents on up to 04. Am trying different approaches to get a feel for ease of use.

Here is the link --- https://drive.google.com/drive/folders/ ... drive_link

As usual, if anyone is interested for more info just ask.

Vic

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#5 by Vic » 04 Jul 2024, 19:16

I have updated the G-Drive share. with two files.

Place them with your .bashrc and add


. /root/.bashrc-MAIN-ROOT

alias 06='/root/.bashrc-06'


to your .bashrc file.


I use KDE with Dolphin and Kwrite, so if you use another DE the pointers will need to be changed.


Vic
Last edited by Vic on 16 Jul 2024, 23:54, edited 1 time in total.

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#6 by Vic » 16 Jul 2024, 23:53

I have updated the GDrive link in my first post and included the files I am using at this point in time.

Vic

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#7 by Vic » 10 Aug 2024, 05:06

Once again I have updated the GDrive link in my first post and included the files I am using at this point in time.

I really like the freedom of not depending on an OS with any desktop.

Am working to change all the pointers for dedicated programs and use "xdg-open" to let the OS determine the default program.

This is so cool.

Vic

nanZor
Shogun
Shogun
Posts: 406
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Bash alias launcher

Post#8 by nanZor » 12 Aug 2024, 00:53

Just a tip about bypassing an alias temporarily. Backslash it!

For example, the default alias for LS produces a listing in color. If however I don't want color temporarily, and just want to go with the default:

Code: Select all

\ls
Backslash has come in handy during scripting without me having to muck about with changing the alias, or the use of commandline switches if the default with no alias serves my purpose. Just a hint in case this comes in handy.
That's a UNIX book - cool. -Garth

Mel1974
White ninja
White ninja
Posts: 13
Joined: 02 Aug 2017, 16:09
Distribution: porteus mate 3.2.2

Bash alias launcher

Post#9 by Mel1974 » 15 Aug 2024, 14:10

Vic wrote:
18 Jun 2024, 02:22
I have been attempting to create an application launcher that does not need any special program, including the operating system.

After taking the KDE start menu to the end of my limits I dove into 9menu and expanded it as far as I could. I also looked at what Firefox could do. Alot. Add an html file and you have great capabilities, but you are relying on Firefox, and the same with 9menu and KDE.

I have been using bash aliases for a long time but not happy with the access. Type "alias" and there is a long list. So I decided to make a .bashrc file with only the text

echo " aliases "

where " aliases " are columns of aliases to copy n paste.

It took a while to get it all to line up in Kwrite but on a 1366 x 768 laptop display I now can see a 14 column menu with 20 to 30 items in each column. A double click , paste and enter gives whatever I want. The use of scripts expand the bash menu to do much more.

If anyone is interested here are screenshots and files

https://drive.google.com/drive/folders/ ... drive_link

Hope someone finds this useful and / or ridiculous.

Vic
Hey Vic, that's a creative approach to building an application launcher! Using a .bashrc file with a formatted list of aliases is a clever way to create a menu system without relying on any specific program or OS.

I can see how it would be useful to have a quick way to access your frequently used commands and scripts. The fact that you can expand it with scripts to do more complex tasks is a big plus.

tulek
White ninja
White ninja
Posts: 6
Joined: 09 Mar 2018, 11:13
Distribution: Porteus Kiosk

Bash alias launcher

Post#10 by tulek » 19 Aug 2024, 19:09

Love the creativity behind Vic's bash alias launcher! Using a .bashrc file to create a menu system is genius. And the fact that it can be expanded with scripts to do more complex tasks is a huge bonus.

Vic
Samurai
Samurai
Posts: 143
Joined: 10 Aug 2016, 05:36
Distribution: Porteux V-0.1 64 KDE
Location: Utopia in Tampa, Florida, USA

Bash alias launcher

Post#11 by Vic » 21 Aug 2024, 03:19

Hi everybody

I have added some things and changed others.

Here is the link... again.

https://drive.google.com/drive/folders/ ... sp=sharing

Remember to have fun,

Vic

Post Reply