Zsh pastebin upload function

A simple zsh function to upload pictures or other files to a free image hosting service.

In example the https://0x0.st pastebin service is used. For syntax example visit the website:

user % lynx https://0x0.st
THE NULL POINTER
================

HTTP POST files here:
    curl -F'file=@yourfile.png' http://0x0.st
You can also POST remote URLs:
    curl -F'url=http://example.com/image.jpg' http://0x0.st

...

Edit the ~/.zshrc file and a function called 0x0, to upload a file to the picture hosting service.

function 0x0(){
        # syntax for calling function without mandatory file
        readonly file=${1:?" Syntax: 0x0 picture.png"}
        # upload the file
        echo "Uploading file to 0x0.st..."
        curl -F'file=@'$1'' https://0x0.st
}

After adding the function to the .zshrc file in $HOME, source the .zshrc file to load its new settings:

user % source ~/.zshrc

Testing new function usage by uploading a file called gentoo-larry.png:

user % 0x0 gentoo-larry.png

Uploading picture to 0x0.st... https://0x0.st/oORV.png

irssi GUI design like HexChat or weechat

Update 2023-08-31

Approach described is NOT a GUI. This is a set of irssi plugins applied form scratch, that makes irssi look like in depicted screenshots below. It might not work if other plugins are already used. This will work only if configuring irssi from scratch. Once THIS works additional plugins should be applied carefully. Now have fun.


Configure irssi to look like weechat or XChat or Hexchat GUI design. This configuration works only using tmux, it will not work with GNU/screen. The initial idea is to have a GUI nowadays this window layout interface is also used in weechat IRC client, using the same default window positions. Left side the Channel/Network list,IRC Buffer in the middle, on the right side a Nicklist. On the bottom prompt with IRC channels and activity indicators.

Below the default window layout found in IRC applications like f.e.: HexChat or/and WeeChat:

click for more