add addtheme.sh, updated instructions, make scripts run from outside of themes directory
This commit is contained in:
parent
e943205f93
commit
d41b500117
3 changed files with 50 additions and 3 deletions
33
addtheme.sh
Executable file
33
addtheme.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
currentdir="$(pwd)"
|
||||
rofi_theme_sdir="$(dirname $0)"
|
||||
|
||||
main() {
|
||||
cd "${rofi_theme_dir}"
|
||||
theme=$(rofi -dump-xresources-theme | sed "s/User: $USER/User: $user/g")
|
||||
read -p "Give your Theme a Name: " name
|
||||
echo "Saving current rofi theme..."
|
||||
echo ""
|
||||
echo "Filename: Themes/${name}.theme"
|
||||
echo "User: ${user}"
|
||||
echo ""
|
||||
echo "Theme saved. You can now run 'update.sh' to update this repository"
|
||||
echo "${theme}" > "Themes/${name}.theme"
|
||||
cd "${currentdir}"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--user)
|
||||
user="${2}" main
|
||||
;;
|
||||
--help|-h)
|
||||
echo "This script stores current rofi theme in Themes subfolder"
|
||||
echo ""
|
||||
echo "Arguments:"
|
||||
echo "--user \"USER\" Uses specified Username in theme file. Otherwise uses login name"
|
||||
;;
|
||||
*)
|
||||
user=$USER main
|
||||
esac
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue