First commit

This commit is contained in:
Roberto Alsina 2023-05-02 18:22:52 -03:00
parent d190bdb3ec
commit 3339db3da9
3 changed files with 30 additions and 1 deletions

View File

@ -1,2 +1,13 @@
# rofi-base16
Script to choose a base16 color scheme using rofi
Script to choose your [base16 color scheme](https://github.com/chriskempson/base16) using [rofi](https://github.com/davatorium/rofi) and [flavours](https://github.com/Misterio77/flavours)
![rofi choosing a color scheme](https://pbs.twimg.com/media/FvIOgrnWwAEA_ie?format=jpg&name=medium)
# Installation and Usage
Assuming you have flavours running and you can successfully run something like `flavours apply atelier-cave`:
* Put `rofi-base16` in your path and run it.
* Optionally, put `rofi-base16.desktop` in `~/.local/share/applications` so you can use it with graphical launchers such as rofi.

10
rofi-base16 Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh -x
LAST_SCHEME=$(cat ~/.local/share/flavours/lastscheme)
SELECTED=$(flavours list | sed 's/\s/\n/g' | grep -n "^$LAST_SCHEME\$" |cut -d: -f1)
SELECTED=$(($SELECTED-1))
SELECTED=$(flavours list| sed 's/\s/\n/g' | rofi -dmenu -selected-row $SELECTED)
if [ ! -z "$SELECTED" ]
then
flavours apply $SELECTED
fi

8
rofi-base16.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Version=1.0
Name=Choose Color Scheme
Comment=Choose a base16 color scheme using flavours
Exec=rofi-base16
Icon=color-picker
Terminal=false
Type=Application