Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Latest commit

 

History

History
70 lines (56 loc) · 2.22 KB

File metadata and controls

70 lines (56 loc) · 2.22 KB

Rofi Launcher

Install

Arch Linux

rofi-lbonn-wayland-git latest aur
rofi-emoji-git latest aur
wtype

Add theme to chezmoi

I need to find some easy way how to download files to chezmoi to install later.

mkdir -p ~/.local/share/chezmoi/dot_local/share/rofi/themes/
curl --silent --location https://gitlab.com/jordiorlando/base16-rofi/-/raw/master/themes/base16-solarized-dark.rasi > ~/.local/share/chezmoi/dot_local/share/rofi/themes/base16-solarized-dark.rasi

Rasi Config

I’m using Wayland version of Rofi which is based on Rofi#next with new rasi config format.

configuration {
  modi: "run,drun,ssh,keys,window";
  show-icons: true;
  terminal: "/usr/bin/alacritty";
  ssh-command: "{terminal} -e {{ .chezmoi.homeDir }}/bin/sshr {host}";
  sort: true;
  parse-hosts: false;
  parse-known-hosts: true;
  m: "-4";
}
@theme "base16-solarized-dark.rasi"

sshr helper

sshr is small script which simply connects to server over SSH and join to predefined root //tmux// session. Or create one if there is none running.

readonly SESSION="${USER}"
readonly SCRIPT_NAME=$(basename "$0")
readonly SOCKET_NAME="{{ .sshr_socket_name }}"

SSH_HOST="$1"

TMUX="tmux -L '${SOCKET_NAME}'"

if [[ "$SCRIPT_NAME" == "sshr" ]]; then
    TMUX="sudo -i $TMUX"
elif [[ "$SCRIPT_NAME" == "yivo" ]]; then
        TMUX="sudo -u ansible -i $TMUX"
        SSH_HOST="yivo"
        CD_DIR=" -c 'ansible-${USER}'"
fi

ssh "${SSH_HOST}" -t "$TMUX at -t '${SESSION}' || $TMUX new-session -s '${SESSION}' ${CD_DIR}"

You can also create symlink from sshr to i.e. sshu to use without sudo.

sshr

Tweaks and tasks

Rofi Org

Take a look at GitHub - wakatara/rofi-org-todo: A rofi script to allow easy hotkey adding of…