This commit is contained in:
Stephan Raabe
2023-12-23 17:12:53 +01:00
parent 3c62620385
commit fa5536e1f1
33 changed files with 220 additions and 34 deletions

View File

@@ -134,11 +134,13 @@ _getConfSelector() {
echo "In use: ${cur##*/}"
echo ""
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
sel=$(gum file $installFolder/conf/$2)
echo ""
sel=$(gum choose $(ls $installFolder/conf/$2))
if [ -z $sel ] ;then
_goBack
fi
echo "File ${sel##*/} selected."
echo "File $sel selected."
echo ""
}
@@ -146,10 +148,10 @@ _getConfEditor() {
selected=$(gum choose "EXECUTE" "EDIT" "COPY" "DELETE" "CANCEL")
case $selected in
EXECUTE)
_writeConf $1 $2
_writeConf $1 $2 $3
break;;
EDIT)
vim $sel
vim $installFolder/conf/$3/$2
sleep 1
_reloadModule
break;;
@@ -165,19 +167,19 @@ _getConfEditor() {
if [ -f $(dirname $sel)/$filename ] ;then
echo "ERROR: File already exists."
else
cp $sel $(dirname $sel)/$filename
cp $installFolder/conf/$3/$sel $installFolder/conf/$3/$filename
_reloadModule
fi
fi
fi
_getConfEditor $1 $2
_getConfEditor $1 $2 $3
break;;
DELETE)
if gum confirm "Do you really want to delete the file ${sel##*/}?" ;then
rm $sel
if gum confirm "Do you really want to delete the file $sel?" ;then
rm $installFolder/conf/$3/$sel
_reloadModule
else
_getConfEditor $1 $2
_getConfEditor $1 $2 $3
fi
break;;
* )
@@ -188,8 +190,8 @@ _getConfEditor() {
# _writeConf conf/monitor.conf $sel
_writeConf() {
if [ ! -z $2 ] ;then
sel=$(echo "$2" | sed "s+"\/home\/$USER"+~+")
echo "source = $sel" > $installFolder/conf/$1
editsel=$(echo "$installFolder/conf/$3/$2" | sed "s+"\/home\/$USER"+~+")
echo "source = $editsel" > $installFolder/conf/$1
fi
}

View File

@@ -3,5 +3,5 @@ _getHeader "$name" "$author"
sel=""
_getConfSelector animation.conf animations
_getConfEditor animation.conf $sel
_getConfEditor animation.conf $sel animations
_reloadModule

View File

@@ -0,0 +1,3 @@
name="Decorations"
order=1
author="Stephan Raabe ML4W"

View File

@@ -0,0 +1,8 @@
#!/bin/bash
_getHeader "$name" "$author"
sel=""
_getConfSelector decoration.conf decorations
_getConfEditor decoration.conf $sel decorations
setsid $HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1 &
_reloadModule

View File

@@ -0,0 +1,2 @@
name="Wallpaper"
order=1

View File

@@ -0,0 +1,4 @@
#!/bin/bash
_getHeader "$name" "$author"
setsid $HOME/dotfiles/hypr/scripts/wallpaper.sh select 1>/dev/null 2>&1 &
_goBack

View File

@@ -3,5 +3,5 @@ _getHeader "$name" "$author"
sel=""
_getConfSelector window.conf windows
_getConfEditor window.conf $sel
_getConfEditor window.conf $sel windows
_reloadModule

View File

@@ -3,6 +3,6 @@ _getHeader "$name"
sel=""
_getConfSelector keybinding.conf keybindings
_getConfEditor keybinding.conf $sel
_getConfEditor keybinding.conf $sel keybindings
_reloadModule

View File

@@ -3,5 +3,5 @@ _getHeader "$name" "$author"
sel=""
_getConfSelector environment.conf environments
_getConfEditor environment.conf $sel
_getConfEditor environment.conf $sel environments
_reloadModule

View File

@@ -3,5 +3,5 @@ _getHeader "$name" "$author"
sel=""
_getConfSelector monitor.conf monitors
_getConfEditor monitor.conf $sel
_getConfEditor monitor.conf $sel monitors
_reloadModule

View File

@@ -3,5 +3,5 @@ _getHeader "$name" "$author"
sel=""
_getConfSelector windowrule.conf windowrules
_getConfEditor windowrule.conf $sel
_getConfEditor windowrule.conf $sel windowrules
_reloadModule

View File

@@ -0,0 +1,2 @@
name="Themes"
order=1

View File

@@ -0,0 +1,4 @@
#!/bin/bash
_getHeader "$name" "$author"
setsid $HOME/dotfiles/waybar/themeswitcher.sh 1>/dev/null 2>&1 &
_goBack