midek

I get asked about what kind of hardware i have on midov.pl, so here is the whole list of computers currently hosting the services:

Primary VM server (Kyouko): * OS: Proxmox * Motherboard: B450 TOMAHAWK MAX * CPU: AMD Ryzen 7 3700X * RAM: 64GB * Storage: 2x 1TB SSD drives (zfs mirror), 5x 10TB HDD drives (zraid1) * Network: Built in 1GBit network card + 2port PCIe 10Gbit (LAN) Notes: she is doing her best!

Database server (Hartmann): * OS: Proxmox * Motherboard: MAG B550 TOMAHAWK * CPU: AMD Ryzen 5 5600G * RAM: 64GB * Storage: 2x 2TB NVME Kingston KC2500 (zfs mirror) * Network: Built in 1GBit network card + 2port PCIe 10Gbit (LAN) Notes: postgresql on nvme is the only way to get synapse not to lag

Backups (Yui): * OS: Archlinux * Motherboard: E35M1-M PRO * CPU: AMD E-350 * RAM: 8GB * Storage: 5x 4TB HDD (zraid1) * Network: Single 1GBit Notes: fugg im running out of backup space

Router (Sakamoto): * OS: Debian * Motherboard: M5A99X EVO R2.0 * CPU: AMD FX-8350 (also heats up the room in cold winter nights) * RAM: 64GB * Storage: Some random old 128GB ssd * Network: Built in 1GBit (acts as WAN) + 4port PCIe 10gbit (LAN) Notes: used to be primary (and only) server hosting everything before, now she loves fail2bannig ddos attacks

Email (Midomail) * OS: Raspbian * Raspberry Pi 2 * CPU: ARMv7 Processor rev 5 * RAM: 1GB Notes: does postfix with dovecot and rspamd, has been running same sd card for many years now without any issues, honestly i am surprised myself that its still alive.

Rofi comes with modi for your open windows, ssh connections, binaries in path, and desktop files.
There are also multiple projects that use Rofi as a general UI like rofi-pass.

All those nice features already make it super useful by default, but why not make your life even easier by adding more modi?

Since we can already search all ssh connections, it works nicely when you also add all the other connection types, such as VNC connections or even RDP connections that you make frequently.

A simple modi that lists files in a directory and executes them will look like this:

#!/usr/bin/sh
remote_files=$(ls -1 ~/remote/)

if [ "$@" ]
then
	coproc ( xterm -e ~/remote/"$@" > /dev/null 2>&1 )
	exit;
else
	for remote_file_scripts in $remote_files
	do
		echo "$remote_file_scripts"
	done
fi
exit 0

Add this to your rofi modi and combi in ~/.Xresources with:

rofi.modi: combi,run,window,drun,ssh,remote:~/.config/rofi/remote.sh
rofi.combi-modi: window,run,ssh,remote

and put your VNC shell scripts in the ~/remote/ dir. My connection files usually look like this:

#!/bin/bash
vncviewer 10.0.0.22 -passwd <(vncpasswd -f <<<$(pass show devices/kvm-stahl | head -n1))

(yes, it takes passwords directly from pass, isn't it comfy?)

Now when you search your rofi combi, it will also show all the scripts from that directory.


Another thing i am doing, is tightly integrating rofi with my browser and bookmarks manager.
Fortunately, vimb stores all its browsing history in ~/.config/vimb/history so its as simple as cat'ing it out.
For bookmarks i use shiori in json mode to get the urls. I used to parse it with shiori print -j | jq '.[] .url' | tr -d '"' but turns out jq is slow as shit and its way better to just do some grepping and seding.

So, rofi script to integrate with a browser would look like this:


#!/usr/bin/sh
mybookmarks="$(shiori print -j  | grep '\"url\"' | tr -d '[:blank:]' | sed -e s/\"url\":\"/\/g -e s/\",//g)"

myhistory="$(tac ~/.config/"$BROWSER"/history | cut -f 1 | uniq)"


if [ "$@" ]
then
	coproc ( "$BROWSER" "$@" > /dev/null 2>&1 )
	exit;
else
	echo "$myhistory" "$mybookmarks"
fi

exit 0

After adding it to modi and combi:

rofi.modi: combi,run,browse:~./config/vimb/vimb.sh,window,drun,ssh,remote:~/.config/rofi/remote.sh
rofi.combi-modi: window,run,ssh,remote,browse

not only can you now directly search your entire browsing history and bookmarks, you can also select the browse modi and enter a URL or query to launch the browser immediately.

With qutebrowser, it was slightly harder to get the browsing history, but its still possible by querying its sqlite database sqlite3 ~/.local/share/qutebrowser/history.sqlite .dump – everything is pretty much the same from there.

Software in the same categories are sorted by how often i use it or how much i like it.

Webshit

Bookmark Manager

Web Browser

Email

Reading

Sending

Downloading

Notifications

Matrix Client

RSS

Downloading

Torrenting

Personal Information Management

Calendar

Contacts

Tasks

Server

  • Nextcloud

Synchronization

Universal stuff

Filesystem

  • zfs

VPN

Terminal Emulator

  • urxvt
  • alacritty
  • st
  • konsole

Shell

  • Zsh
  • Bash

File Manager

Password Manager

Application Launcher

Window Manager

  • bspwm
  • awesome

Text Editor

  • vim

Music Playback

Server

  • mpd

Client

Video Playback

Server

Client

PDF Reader

Servers

Virtualisation

Deployment Atomisation

  • Ansible

Video Hosting

Media Manager

Communication

Email

  • Postfix+Dovecot+Spamassassin+postgrey

Chat