From 679279a02e601f370ee987e3641c2f5e88ed60df Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 14 Oct 2020 14:39:02 -0400 Subject: [PATCH] [rofi] Change rofi theme --- rofi/.config/rofi/config.rasi | 12 +++----- rofi/.config/rofi/pass.sh | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 rofi/.config/rofi/pass.sh diff --git a/rofi/.config/rofi/config.rasi b/rofi/.config/rofi/config.rasi index e5dca51..d897026 100644 --- a/rofi/.config/rofi/config.rasi +++ b/rofi/.config/rofi/config.rasi @@ -1,12 +1,10 @@ configuration { modi: "window,run,ssh,combi"; width: 50; - lines: 5; - font: "Go Mono 9"; - location: 2; - padding: 15; - yoffset: 85; + lines: 7; + terminal-emulator: "kitty"; + font: "JetBrains Mono 10"; show-icons: true; - combi-modi: "window,drun,ssh"; - theme: "android_notification"; + combi-modi: "window,ssh,drun"; + theme: "Monokai"; } diff --git a/rofi/.config/rofi/pass.sh b/rofi/.config/rofi/pass.sh new file mode 100644 index 0000000..df1a635 --- /dev/null +++ b/rofi/.config/rofi/pass.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# ----------------------------------------------------------------------------- +# Info: +# author: Colin Powell +# file: pass.sh +# created: 14.10.2020 +# revision: --- +# version: 1.0 +# ----------------------------------------------------------------------------- +# Requirements: +# rofi +# Description: +# Use rofi to grab password-store passwords +# Usage: +# pass.sh +# ----------------------------------------------------------------------------- +# Script: + +declare -A OPTIONS + +OPTIONS=( + ["set status"]="slack status edit " + ["clear status"]="slack status edit " + ["set away"]="slack presence away" + ["set available"]="slack presence active" +) + +# List for rofi +gen_list() { + for i in "${!OPTIONS[@]}" + do + echo "$i" + done +} + +main() { + # Pass the list to rofi + platform=$( (gen_list) | rofi -dmenu -matching fuzzy -no-custom -location 0 -p "Command -> " ) + + if [[ -n "$platform" ]]; then + query=$( (echo ) | rofi -dmenu -matching fuzzy -location 0 -p "Input -> " ) + + if [[ -n "$query" ]]; then + option=${OPTIONS[$platform]}$query + eval "$option" + else + exit + fi + + else + exit + fi +} + +main + +exit 0