140
submitted 11 months ago* (last edited 11 months ago) by macallik@kbin.social to c/linux@lemmy.ml

From bash to zsh and everywhere in between, show me yours and I'll show you mines. Inspire others or get some feedback.

Simply copy & paste the output of alias in your terminal or add some comments to explain things for others.

Edit: Kbin users, click 'More' on a comment and use the fediverse link to read responses that have funky formatting

you are viewing a single comment's thread
view the rest of the comments
[-] Pantherina@feddit.de 6 points 11 months ago* (last edited 11 months ago)

I alias most of my flatpaks to autorun, made a tool for that called flatalias.

https://github.com/trytomakeyouprivate/flatalias

Also

set fish_greeting

alias update='flatpak update -y && notify-send -a Updater "Flatpaks ready" && rpm-ostree update && notify-send -a Updater "rpm-ostree ready"'

alias upfin='flatpak update -y && rpm-ostree update && shutdown -h now''

alias flatrm='flatpak remove --delete-data'

alias ls="ls --color=auto -GF"

alias reload="source ~/.config/fish/config.fish && echo 'Fish-config updated'"

abbr conf "kate ~/.config/fish/config.fish && source ~/.config/fish/config.fish && echo 'Fish-config updated'"

### NETWORKING
abbr myip 'curl ifconfig.co'
abbr netlisten 'netstat -plntu'
abbr pingtest 'ping -c 2 wikipedia.de'

abbr rpmq "distrobox enter -n fedora -- dnf search"
abbr rstat "rpm-ostree status"

abbr rpmfind "rpm -qa | grep"

abbr flatinst 'flatpak install -y'

abbr flatfind "flatpak list | grep"

abbr history-off 'set +o history'

abbr sshcloud "ssh -i /home/user/.local/share/Cryptomator/mnt/SSH-keys/KEYNAME -p PORTNUMBER root@IP
# and others

abbr httpcode "curl --head --silent --output /dev/null --write-out '%{http_code}' "

abbr "pin-this" "ostree admin pin 0"
abbr "q" "exit"
abbr c "clear"

abbr errors-boot "journalctl -b"
abbr errors-last-boot "journalctl -b -1"

function copy
    if test -f $argv[1]
        cat $argv[1] | wl-copy
        echo "Copied to clipboard."
    else
        echo "Error: '$argv[1]' is not a file!"
    end
end

abbr off "shutdown -h now"

function findmod
    set mod_path (whereis $argv[1] | cut -d' ' -f2)
    kate $mod_path;
end

function mdtopdf -a filename
  set -x name (basename $filename .md)
  pandoc $filename -o $name.pdf | tee $name.pdf
end

function mdtoodt -a filename
  set -x name (basename $filename .md)
  pandoc $filename -o $name.odt | tee $name.odt
end

function mdtotex -a filename
  set -x name (basename $filename .md)
  pandoc $filename -s -o $name.tex | tee $name.tex
end

abbr rootfish "sudo -i fish"

abbr eng "export LANG=en_US.UTF-8"
abbr english "export LANG=en_US.UTF-8"
alias conf='nano ~/.config/fish/config.fish'
alias reload='. ~/.config/fish/config.fish'

alias pipwire-restart="systemctl --user restart pipewire.service"

function tarbrot #not yet fully working I think
    if test -z $argv[1]
        echo "Usage: tarbrot "
        return 1
    end

    set folder $argv[1]
    set tarball (basename $folder).tar
    set brotli_file $tarball.br

    # Start the timer
    set start_time (date +%s)

    # Create a tarball without compression
    tar -cf $tarball $folder

    # Display the time elapsed
    set end_time (date +%s)
    set elapsed_time (math $end_time - $start_time)

    # Compress the tarball with Brotli
    brotli $tarball && rm -f "$tarball"

    echo "Folder '$folder' has been tarred and Brotli compressed as '$brotli_file'"
    echo "Time elapsed: $elapsed_time seconds"
    echo "Size of compressed file: (du -h $brotli_file | awk '{print $1}')"
end

I use fish btw, nice shell.

this post was submitted on 20 Sep 2023
140 points (97.9% liked)

Linux

47233 readers
797 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS