Update
This commit is contained in:
parent
16abb6cdf2
commit
0607296848
@ -1 +1 @@
|
||||
chromium
|
||||
brave
|
||||
|
@ -1,2 +1 @@
|
||||
# nm-connection-editor
|
||||
alacritty -e nmtui
|
@ -1 +1 @@
|
||||
source = ~/dotfiles/hypr/conf/animations/default.conf
|
||||
source = ~/dotfiles/hypr/conf/animations/animations-fast.conf
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -----------------------------------------------------
|
||||
# Animations
|
||||
# name: "Default"
|
||||
# name "Default"
|
||||
# -----------------------------------------------------
|
||||
animations {
|
||||
enabled = true
|
||||
|
@ -1,8 +1,9 @@
|
||||
# -----------------------------------------------------
|
||||
# Keyboard Layout
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
# -----------------------------------------------------
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_layout = de
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
|
@ -1 +1 @@
|
||||
source = ~/dotfiles/hypr/conf/monitors/default.conf
|
||||
source = ~/dotfiles/hypr/conf/monitors/2560x1440@120.conf
|
||||
|
@ -4,3 +4,4 @@
|
||||
# -----------------------------------------------------
|
||||
|
||||
monitor=,1920x1080,auto,1
|
||||
# 122314 lkasldkasl kjd
|
||||
|
@ -5,7 +5,6 @@
|
||||
# |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
|
||||
# |___/|_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------
|
||||
@ -56,4 +55,4 @@ source = ~/dotfiles/hypr/conf/custom.conf
|
||||
# -----------------------------------------------------
|
||||
# Environment for xdg-desktop-portal-hyprland
|
||||
# -----------------------------------------------------
|
||||
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
# exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
2
hypr/scripts/settings.sh
Executable file
2
hypr/scripts/settings.sh
Executable file
@ -0,0 +1,2 @@
|
||||
cd ~/hyprland-settings
|
||||
./settings.sh dotfiles
|
9
hypr/settings/.library/excludes.txt
Normal file
9
hypr/settings/.library/excludes.txt
Normal file
@ -0,0 +1,9 @@
|
||||
.gitignore
|
||||
.git
|
||||
.dev
|
||||
README.md
|
||||
CHANGELOG
|
||||
LICENSE
|
||||
install.sh
|
||||
create.sh
|
||||
.target.sh
|
254
hypr/settings/.library/library.sh
Normal file
254
hypr/settings/.library/library.sh
Normal file
@ -0,0 +1,254 @@
|
||||
# Settings Library
|
||||
|
||||
# Load module
|
||||
_getModules() {
|
||||
clear
|
||||
|
||||
# Get path to parent folder to go back
|
||||
back="$(dirname "$1")"
|
||||
|
||||
# Load module config
|
||||
if [ -f $1/init.sh ]; then
|
||||
source $1/init.sh
|
||||
fi
|
||||
|
||||
# Load module config
|
||||
if [ -f $1/config.sh ]; then
|
||||
source $1/config.sh
|
||||
else
|
||||
echo "ERROR: config.sh doesn't exists in $1"
|
||||
exit
|
||||
fi
|
||||
|
||||
clickArr+=("/")
|
||||
clickArr+=("$name")
|
||||
echo "You are here:" ${clickArr[@]}
|
||||
|
||||
# Load module
|
||||
if [ -f $1/module.sh ]; then
|
||||
source $1/module.sh
|
||||
else
|
||||
echo "ERROR: module.sh doesn't exists in $1"
|
||||
# exit 0
|
||||
fi
|
||||
|
||||
# Read folder
|
||||
modules=$(find $1 -maxdepth 1 -type d)
|
||||
count=0
|
||||
|
||||
# Check if subfolders exists
|
||||
for value in $modules
|
||||
do
|
||||
if [[ ! "$value" == "$1" ]]; then
|
||||
# Check if custom version of module exists and skip original module
|
||||
if [ ! -d "$value-custom" ]; then
|
||||
((count++))
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Create Navigation
|
||||
unset modulesArr
|
||||
if [[ ! $count == 0 ]]; then
|
||||
|
||||
# Get modules folders
|
||||
for value in $modules
|
||||
do
|
||||
if [[ ! "$value" == "$1" ]]; then
|
||||
if [[ ! $value == *"-custom" ]]; then
|
||||
if [ ! -d "$value-custom" ]; then
|
||||
if [ -f $value/config.sh ]; then
|
||||
source $value/config.sh
|
||||
modulesArr+=("$order:$name:$value")
|
||||
else
|
||||
echo "ERROR: config.sh doesn't exists in $value"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if [ -f $value-custom/config.sh ]; then
|
||||
source $value-custom/config.sh
|
||||
modulesArr+=("$order:$name:$value-custom")
|
||||
else
|
||||
echo "ERROR: config.sh doesn't exists in $value-custom"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# Sort array by order
|
||||
IFS=$'\n' modulesArr=($(sort <<<"${modulesArr[*]}"))
|
||||
unset nameList
|
||||
unset pathList
|
||||
|
||||
# Output
|
||||
for value in "${modulesArr[@]}"
|
||||
do
|
||||
name="$(cut -d':' -f2 <<<"$value")"
|
||||
path="$(cut -d':' -f3 <<<"$value")"
|
||||
nameList+=("$name")
|
||||
pathList+=("$path")
|
||||
done
|
||||
if [[ "$back" == "$installFolder/settings" ]]; then
|
||||
nameList+=("EXIT")
|
||||
else
|
||||
nameList+=("BACK")
|
||||
fi
|
||||
echo ""
|
||||
selected=$(gum choose ${nameList[@]})
|
||||
case $selected in
|
||||
BACK)
|
||||
_goBack
|
||||
break;;
|
||||
EXIT)
|
||||
clear
|
||||
exit
|
||||
break;;
|
||||
* )
|
||||
|
||||
;;
|
||||
esac
|
||||
if [ ! -z $selected ] ;then
|
||||
for i in "${!nameList[@]}"; do
|
||||
if [[ "${nameList[$i]}" = "${selected}" ]]; then
|
||||
nameIndex="${i}"
|
||||
fi
|
||||
done
|
||||
current="${pathList[$nameIndex]}"
|
||||
_getModules "$current"
|
||||
else
|
||||
if [[ "$back" == "$installFolder/settings" ]]; then
|
||||
clear
|
||||
exit
|
||||
else
|
||||
_goBack
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# _getConfSelector conf/monitor.conf conf/monitors/
|
||||
_getConfSelector() {
|
||||
cur=$(cat $installFolder/conf/$1)
|
||||
echo "Folder: $installFolder/conf/$2"
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file $installFolder/conf/$2)
|
||||
if [ -z $sel ] ;then
|
||||
_goBack
|
||||
fi
|
||||
echo "File ${sel##*/} selected."
|
||||
echo ""
|
||||
}
|
||||
|
||||
_getConfEditor() {
|
||||
selected=$(gum choose "EXECUTE" "EDIT" "COPY" "DELETE" "CANCEL")
|
||||
case $selected in
|
||||
EXECUTE)
|
||||
_writeConf $1 $2
|
||||
break;;
|
||||
EDIT)
|
||||
vim $sel
|
||||
sleep 1
|
||||
_reloadModule
|
||||
break;;
|
||||
COPY)
|
||||
echo "Define the new file name. Please use [a-zA-Z1-9_-]+.conf"
|
||||
filename=$(gum input --value="custom-${sel##*/}" --placeholder "Enter your filename")
|
||||
if [ -z $filename ] ;then
|
||||
echo "ERROR: No filename specified."
|
||||
else
|
||||
if ! [[ $filename =~ ^[a-zA-Z1-9_-]+.conf ]]; then
|
||||
echo "ERROR: Wrong filename format. Please use [a-zA-Z1-9_-]+.conf"
|
||||
else
|
||||
if [ -f $(dirname $sel)/$filename ] ;then
|
||||
echo "ERROR: File already exists."
|
||||
else
|
||||
cp $sel $(dirname $sel)/$filename
|
||||
_reloadModule
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
_getConfEditor $1 $2
|
||||
break;;
|
||||
DELETE)
|
||||
if gum confirm "Do you really want to delete the file ${sel##*/}?" ;then
|
||||
rm $sel
|
||||
_reloadModule
|
||||
else
|
||||
_getConfEditor $1 $2
|
||||
fi
|
||||
break;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# _writeConf conf/monitor.conf $sel
|
||||
_writeConf() {
|
||||
if [ ! -z $2 ] ;then
|
||||
sel=$(echo "$2" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > $installFolder/conf/$1
|
||||
fi
|
||||
}
|
||||
|
||||
# Return the version of the hyprland-settings script
|
||||
_getVersion() {
|
||||
echo $version
|
||||
}
|
||||
|
||||
# Write the header to a page
|
||||
_getHeader() {
|
||||
figlet "$1"
|
||||
if [ ! -z "$2" ]; then
|
||||
echo "by $2"
|
||||
fi
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Update the breadcrumb and opens parent page
|
||||
_goBack() {
|
||||
unset clickArr[-1]
|
||||
unset clickArr[-1]
|
||||
unset clickArr[-1]
|
||||
unset clickArr[-1]
|
||||
_getModules "$back"
|
||||
}
|
||||
|
||||
_reloadModule() {
|
||||
unset clickArr[-1]
|
||||
unset clickArr[-1]
|
||||
_getModules "$current"
|
||||
}
|
||||
|
||||
# Replace the variables in a template and publish to location
|
||||
_replaceByTemplate() {
|
||||
template=$1
|
||||
variables=$2
|
||||
values=$3
|
||||
publishto=$4
|
||||
}
|
||||
|
||||
# Back Button
|
||||
_getBackBtn() {
|
||||
echo ""
|
||||
gum choose "Back"
|
||||
_goBack
|
||||
}
|
||||
|
||||
_getBackRepeatBtn() {
|
||||
echo ""
|
||||
selected=$(gum choose "REPEAT" "BACK")
|
||||
case $selected in
|
||||
BACK)
|
||||
_goBack
|
||||
break;;
|
||||
REPEAT)
|
||||
_getModules "$current"
|
||||
break;;
|
||||
* )
|
||||
|
||||
;;
|
||||
esac
|
||||
}
|
1
hypr/settings/.library/version.sh
Normal file
1
hypr/settings/.library/version.sh
Normal file
@ -0,0 +1 @@
|
||||
version="2.0"
|
3
hypr/settings/modules/appearance/animations/config.sh
Normal file
3
hypr/settings/modules/appearance/animations/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Animations"
|
||||
order=1
|
||||
author="Stephan Raabe ML4W"
|
7
hypr/settings/modules/appearance/animations/module.sh
Executable file
7
hypr/settings/modules/appearance/animations/module.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
sel=""
|
||||
_getConfSelector animation.conf animations
|
||||
_getConfEditor animation.conf $sel
|
||||
_reloadModule
|
3
hypr/settings/modules/appearance/config.sh
Normal file
3
hypr/settings/modules/appearance/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Appearance"
|
||||
order=2
|
||||
author="Stephan Raabe ML4W"
|
3
hypr/settings/modules/appearance/module.sh
Executable file
3
hypr/settings/modules/appearance/module.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name"
|
||||
|
3
hypr/settings/modules/appearance/windows/config.sh
Normal file
3
hypr/settings/modules/appearance/windows/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Windows"
|
||||
order=1
|
||||
author="Stephan Raabe ML4W"
|
7
hypr/settings/modules/appearance/windows/module.sh
Executable file
7
hypr/settings/modules/appearance/windows/module.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
sel=""
|
||||
_getConfSelector window.conf windows
|
||||
_getConfEditor window.conf $sel
|
||||
_reloadModule
|
6
hypr/settings/modules/config.sh
Normal file
6
hypr/settings/modules/config.sh
Normal file
@ -0,0 +1,6 @@
|
||||
name="Settings"
|
||||
description="The settings script will help you to configure your Hyprland installation."
|
||||
author="Stephan Raabe ML4W"
|
||||
order=1
|
||||
email="mail@ml4w.com"
|
||||
homepage="https://gitlab.com/stephan-raabe/dotfiles"
|
0
hypr/settings/modules/init.sh
Normal file
0
hypr/settings/modules/init.sh
Normal file
4
hypr/settings/modules/keybindings/config.sh
Normal file
4
hypr/settings/modules/keybindings/config.sh
Normal file
@ -0,0 +1,4 @@
|
||||
name="Keybindings"
|
||||
order=2
|
||||
author="Stephan Raabe ML4W"
|
||||
|
0
hypr/settings/modules/keybindings/init.sh
Normal file
0
hypr/settings/modules/keybindings/init.sh
Normal file
8
hypr/settings/modules/keybindings/module.sh
Executable file
8
hypr/settings/modules/keybindings/module.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name"
|
||||
|
||||
sel=""
|
||||
_getConfSelector keybinding.conf keybindings
|
||||
_getConfEditor keybinding.conf $sel
|
||||
_reloadModule
|
||||
|
6
hypr/settings/modules/module.sh
Executable file
6
hypr/settings/modules/module.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
echo "$homepage ($email)"
|
||||
echo "Version" $(_getVersion)
|
||||
echo ""
|
||||
echo $description
|
3
hypr/settings/modules/system/config.sh
Normal file
3
hypr/settings/modules/system/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="System"
|
||||
order=2
|
||||
author="Stephan Raabe ML4W"
|
3
hypr/settings/modules/system/custom/config.sh
Normal file
3
hypr/settings/modules/system/custom/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Custom"
|
||||
order=10
|
||||
author="Stephan Raabe ML4W"
|
6
hypr/settings/modules/system/custom/module.sh
Executable file
6
hypr/settings/modules/system/custom/module.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
vim ~/dotfiles/hypr/conf/custom.conf
|
||||
_goBack
|
||||
|
||||
|
3
hypr/settings/modules/system/environment/config.sh
Normal file
3
hypr/settings/modules/system/environment/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Environment"
|
||||
order=05
|
||||
author="Stephan Raabe ML4W"
|
7
hypr/settings/modules/system/environment/module.sh
Executable file
7
hypr/settings/modules/system/environment/module.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
sel=""
|
||||
_getConfSelector environment.conf environments
|
||||
_getConfEditor environment.conf $sel
|
||||
_reloadModule
|
2
hypr/settings/modules/system/module.sh
Executable file
2
hypr/settings/modules/system/module.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name"
|
3
hypr/settings/modules/system/monitor/config.sh
Normal file
3
hypr/settings/modules/system/monitor/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Monitor"
|
||||
order=01
|
||||
author="Stephan Raabe ML4W"
|
7
hypr/settings/modules/system/monitor/module.sh
Executable file
7
hypr/settings/modules/system/monitor/module.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
sel=""
|
||||
_getConfSelector monitor.conf monitors
|
||||
_getConfEditor monitor.conf $sel
|
||||
_reloadModule
|
4
hypr/settings/modules/system/windowrules/config.sh
Normal file
4
hypr/settings/modules/system/windowrules/config.sh
Normal file
@ -0,0 +1,4 @@
|
||||
name="Windowrules"
|
||||
order=09
|
||||
author="Stephan Raabe ML4W"
|
||||
|
7
hypr/settings/modules/system/windowrules/module.sh
Executable file
7
hypr/settings/modules/system/windowrules/module.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
sel=""
|
||||
_getConfSelector windowrule.conf windowrules
|
||||
_getConfEditor windowrule.conf $sel
|
||||
_reloadModule
|
2
hypr/settings/modules/waybar/appslabel/config.sh
Normal file
2
hypr/settings/modules/waybar/appslabel/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Apps Label"
|
||||
order=1
|
47
hypr/settings/modules/waybar/appslabel/module.sh
Executable file
47
hypr/settings/modules/waybar/appslabel/module.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the label of the Apps Starter"
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/waybar/modules.json"
|
||||
|
||||
# Define Markers
|
||||
startMarker="\/\/ START APPS LABEL"
|
||||
endMarker="\/\/ END APPS LABEL"
|
||||
|
||||
# Define Replacement Template
|
||||
customtemplate="\"format\": \"VALUE\","
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder="Define the Apps label")
|
||||
|
||||
if [ ! -z $customvalue ]; then
|
||||
# Replace in Template
|
||||
customtext="${customtemplate/VALUE/"$customvalue"}"
|
||||
|
||||
# Ensure that markers are in target file
|
||||
if grep -s "$startMarker" $targetFile && grep -s "$endMarker" $targetFile; then
|
||||
echo "Exists"
|
||||
|
||||
# Write into File
|
||||
sed -i '/'"$startMarker"'/,/'"$endMarker"'/ {
|
||||
//!d
|
||||
/'"$startMarker"'/a\
|
||||
'"$customtext"'
|
||||
}' $targetFile
|
||||
|
||||
# Reload Waybar
|
||||
$HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1
|
||||
_goBack
|
||||
|
||||
else
|
||||
echo "ERROR: Marker not found."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Define a value."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
2
hypr/settings/modules/waybar/config.sh
Normal file
2
hypr/settings/modules/waybar/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Waybar"
|
||||
order=1
|
2
hypr/settings/modules/waybar/date/config.sh
Normal file
2
hypr/settings/modules/waybar/date/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Date Format"
|
||||
order=1
|
46
hypr/settings/modules/waybar/date/module.sh
Executable file
46
hypr/settings/modules/waybar/date/module.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the date format for the clock module. Default: {:%Y-%m-%d}"
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/waybar/modules.json"
|
||||
|
||||
# Define Markers
|
||||
startMarker="\/\/ START CLOCK FORMAT"
|
||||
endMarker="\/\/ END CLOCK FORMAT"
|
||||
|
||||
# Define Replacement Template
|
||||
customtemplate="\"format-alt\": \"VALUE\""
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder="Define the date format")
|
||||
|
||||
if [ ! -z $customvalue ]; then
|
||||
# Replace in Template
|
||||
customtext="${customtemplate/VALUE/"$customvalue"}"
|
||||
|
||||
# Ensure that markers are in target file
|
||||
if grep -s "$startMarker" $targetFile && grep -s "$endMarker" $targetFile; then
|
||||
echo "Exists"
|
||||
|
||||
# Write into File
|
||||
sed -i '/'"$startMarker"'/,/'"$endMarker"'/ {
|
||||
//!d
|
||||
/'"$startMarker"'/a\
|
||||
'"$customtext"'
|
||||
}' $targetFile
|
||||
|
||||
# Reload Waybar
|
||||
$HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1
|
||||
_goBack
|
||||
|
||||
else
|
||||
echo "ERROR: Marker not found."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Define a value."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
2
hypr/settings/modules/waybar/defaults/browser/config.sh
Normal file
2
hypr/settings/modules/waybar/defaults/browser/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Browser"
|
||||
order=1
|
23
hypr/settings/modules/waybar/defaults/browser/module.sh
Executable file
23
hypr/settings/modules/waybar/defaults/browser/module.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the start command to start the browser."
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/.settings/browser.sh"
|
||||
|
||||
# Current Value
|
||||
echo "Current Value: $(cat $targetFile)"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder "Command to start")
|
||||
if [ ! -z $customvalue ] ;then
|
||||
# Write into file
|
||||
echo "$customvalue" > $targetFile
|
||||
else
|
||||
echo "Please define a command"
|
||||
sleep 1
|
||||
fi
|
||||
_goBack
|
||||
|
||||
|
3
hypr/settings/modules/waybar/defaults/config.sh
Normal file
3
hypr/settings/modules/waybar/defaults/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
name="Quick Launcher"
|
||||
order=1
|
||||
author="Stephan Raabe ML4W"
|
@ -0,0 +1,2 @@
|
||||
name="Filemanager"
|
||||
order=1
|
23
hypr/settings/modules/waybar/defaults/filemanager/module.sh
Executable file
23
hypr/settings/modules/waybar/defaults/filemanager/module.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the start command to start the filemanager."
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/.settings/filemanager.sh"
|
||||
|
||||
# Current Value
|
||||
echo "Current Value: $(cat $targetFile)"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder "Command to start")
|
||||
if [ ! -z $customvalue ] ;then
|
||||
# Write into file
|
||||
echo "$customvalue" > $targetFile
|
||||
else
|
||||
echo "Please define a command"
|
||||
sleep 1
|
||||
fi
|
||||
_goBack
|
||||
|
||||
|
2
hypr/settings/modules/waybar/defaults/module.sh
Executable file
2
hypr/settings/modules/waybar/defaults/module.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name"
|
@ -0,0 +1,2 @@
|
||||
name="Network"
|
||||
order=1
|
23
hypr/settings/modules/waybar/defaults/networkmanager/module.sh
Executable file
23
hypr/settings/modules/waybar/defaults/networkmanager/module.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the start command to start the networkmanager."
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/.settings/networkmanager.sh"
|
||||
|
||||
# Current Value
|
||||
echo "Current Value: $(cat $targetFile)"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder "Command to start")
|
||||
if [ ! -z $customvalue ] ;then
|
||||
# Write into file
|
||||
echo "$customvalue" > $targetFile
|
||||
else
|
||||
echo "Please define a command"
|
||||
sleep 1
|
||||
fi
|
||||
_goBack
|
||||
|
||||
|
2
hypr/settings/modules/waybar/defaults/software/config.sh
Normal file
2
hypr/settings/modules/waybar/defaults/software/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Software"
|
||||
order=1
|
23
hypr/settings/modules/waybar/defaults/software/module.sh
Executable file
23
hypr/settings/modules/waybar/defaults/software/module.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the start command to start the software manager."
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/.settings/software.sh"
|
||||
|
||||
# Current Value
|
||||
echo "Current Value: $(cat $targetFile)"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum input --placeholder "Command to start")
|
||||
if [ ! -z $customvalue ] ;then
|
||||
# Write into file
|
||||
echo "$customvalue" > $targetFile
|
||||
else
|
||||
echo "Please define a command"
|
||||
sleep 1
|
||||
fi
|
||||
_goBack
|
||||
|
||||
|
6
hypr/settings/modules/waybar/module.sh
Executable file
6
hypr/settings/modules/waybar/module.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
echo "$homepage ($email)"
|
||||
echo "Version" $(_getVersion)
|
||||
echo ""
|
||||
echo $description
|
2
hypr/settings/modules/waybar/workspaces/config.sh
Normal file
2
hypr/settings/modules/waybar/workspaces/config.sh
Normal file
@ -0,0 +1,2 @@
|
||||
name="Workspaces"
|
||||
order=1
|
40
hypr/settings/modules/waybar/workspaces/module.sh
Executable file
40
hypr/settings/modules/waybar/workspaces/module.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/waybar/modules.json"
|
||||
|
||||
# Define Markers
|
||||
startMarker="\/\/ START WORKSPACE"
|
||||
endMarker="\/\/ END WORKSPACES"
|
||||
|
||||
# Define Replacement Template
|
||||
customtemplate="\"*\": VALUE"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum choose 5 6 7 8 9 10)
|
||||
|
||||
# Replace in Template
|
||||
customtext="${customtemplate/VALUE/"$customvalue"}"
|
||||
|
||||
# Ensure that markers are in target file
|
||||
if grep -s "$startMarker" $targetFile && grep -s "$endMarker" $targetFile; then
|
||||
echo "Exists"
|
||||
|
||||
# Write into File
|
||||
sed -i '/'"$startMarker"'/,/'"$endMarker"'/ {
|
||||
//!d
|
||||
/'"$startMarker"'/a\
|
||||
'"$customtext"'
|
||||
}' $targetFile
|
||||
|
||||
# Reload Waybar
|
||||
$HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1
|
||||
_goBack
|
||||
|
||||
else
|
||||
echo "ERROR: Marker not found."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
||||
|
@ -1,244 +1,27 @@
|
||||
#!/bin/bash
|
||||
# ____ _ _ _
|
||||
# / ___| ___| |_| |_(_)_ __ __ _ ___
|
||||
# \___ \ / _ \ __| __| | '_ \ / _` / __|
|
||||
# ___) | __/ |_| |_| | | | | (_| \__ \
|
||||
# |____/ \___|\__|\__|_|_| |_|\__, |___/
|
||||
# |___/
|
||||
# The Hyprland Settings Script
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
_settingsCustom() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _
|
||||
/ ___| _ ___| |_ ___ _ __ ___
|
||||
| | | | | / __| __/ _ \| '_ ` _ \
|
||||
| |__| |_| \__ \ || (_) | | | | | |
|
||||
\____\__,_|___/\__\___/|_| |_| |_|
|
||||
clear
|
||||
installFolder=$(dirname "$(pwd)")
|
||||
|
||||
EOF
|
||||
echo "You can edit here the ~/dotfiles/hypr/conf/custom.conf directly"
|
||||
echo "to add more individual configurations to the hyprland.conf."
|
||||
echo ""
|
||||
echo "Press ESC to proceed."
|
||||
echo ""
|
||||
filevalue=$(gum write --show-line-numbers --height 15 --width 70 --value="$(cat ~/dotfiles/hypr/conf/custom.conf)")
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _
|
||||
/ ___| _ ___| |_ ___ _ __ ___
|
||||
| | | | | / __| __/ _ \| '_ ` _ \
|
||||
| |__| |_| \__ \ || (_) | | | | | |
|
||||
\____\__,_|___/\__\___/|_| |_| |_|
|
||||
# Source files
|
||||
source .library/version.sh
|
||||
source .library/library.sh
|
||||
|
||||
EOF
|
||||
if gum confirm "Do you want to save your changes into ~/dotfiles/hypr/conf/custom.conf?" ;then
|
||||
echo "$filevalue" > ~/dotfiles/hypr/conf/custom.conf
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
# Define global variables
|
||||
modules_path="modules"
|
||||
current=""
|
||||
back=""
|
||||
clickArr=""
|
||||
confDir="conf"
|
||||
|
||||
_settingsDecoration() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _ _
|
||||
| _ \ ___ ___ ___ _ __ __ _| |_(_) ___ _ __ ___
|
||||
| | | |/ _ \/ __/ _ \| '__/ _` | __| |/ _ \| '_ \/ __|
|
||||
| |_| | __/ (_| (_) | | | (_| | |_| | (_) | | | \__ \
|
||||
|____/ \___|\___\___/|_| \__,_|\__|_|\___/|_| |_|___/
|
||||
|
||||
EOF
|
||||
cur=$(cat ~/dotfiles/hypr/conf/decoration.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/decorations/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/decoration.conf
|
||||
_settingsDecoration
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsWindow() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
__ ___ _
|
||||
\ \ / (_)_ __ __| | _____ _____
|
||||
\ \ /\ / /| | '_ \ / _` |/ _ \ \ /\ / / __|
|
||||
\ V V / | | | | | (_| | (_) \ V V /\__ \
|
||||
\_/\_/ |_|_| |_|\__,_|\___/ \_/\_/ |___/
|
||||
|
||||
EOF
|
||||
cur=$(cat ~/dotfiles/hypr/conf/window.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/windows/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/window.conf
|
||||
_settingsWindow
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsAnimation() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
_ _ _ _
|
||||
/ \ _ __ (_)_ __ ___ __ _| |_(_) ___ _ __ ___
|
||||
/ _ \ | '_ \| | '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
|
||||
/ ___ \| | | | | | | | | | (_| | |_| | (_) | | | \__ \
|
||||
/_/ \_\_| |_|_|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
|
||||
|
||||
EOF
|
||||
cur=$(cat ~/dotfiles/hypr/conf/animation.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/animations/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/animation.conf
|
||||
_settingsAnimation
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsMonitor() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
__ __ _ _
|
||||
| \/ | ___ _ __ (_) |_ ___ _ __
|
||||
| |\/| |/ _ \| '_ \| | __/ _ \| '__|
|
||||
| | | | (_) | | | | | || (_) | |
|
||||
|_| |_|\___/|_| |_|_|\__\___/|_|
|
||||
|
||||
EOF
|
||||
cur=$(cat ~/dotfiles/hypr/conf/monitor.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/monitors/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/monitor.conf
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsEnvironment() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
_____ _ _
|
||||
| ____|_ ____ _(_)_ __ ___ _ __ _ __ ___ ___ _ __ | |_
|
||||
| _| | '_ \ \ / / | '__/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
|
||||
| |___| | | \ V /| | | | (_) | | | | | | | | | __/ | | | |_
|
||||
|_____|_| |_|\_/ |_|_| \___/|_| |_|_| |_| |_|\___|_| |_|\__|
|
||||
|
||||
EOF
|
||||
|
||||
cur=$(cat ~/dotfiles/hypr/conf/environment.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Please restart Hyprland after changing the environment."
|
||||
echo "If you select KVM it's recommended to shutdown your system and start again."
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/environments/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/environment.conf
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsKeybinding() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
_ __ _ _ _ _
|
||||
| |/ /___ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
|
||||
| ' // _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
|
||||
| . \ __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
|
||||
|_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
|
||||
|___/ |___/
|
||||
|
||||
EOF
|
||||
cur=$(cat ~/dotfiles/hypr/conf/keybinding.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/keybindings/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/keybinding.conf
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsWindowrule() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
__ ___ _ _
|
||||
\ \ / (_)_ __ __| | _____ ___ __ _ _| | ___ ___
|
||||
\ \ /\ / /| | '_ \ / _` |/ _ \ \ /\ / / '__| | | | |/ _ \/ __|
|
||||
\ V V / | | | | | (_| | (_) \ V V /| | | |_| | | __/\__ \
|
||||
\_/\_/ |_|_| |_|\__,_|\___/ \_/\_/ |_| \__,_|_|\___||___/
|
||||
|
||||
EOF
|
||||
|
||||
cur=$(cat ~/dotfiles/hypr/conf/windowrule.conf)
|
||||
echo "In use: ${cur##*/}"
|
||||
echo ""
|
||||
echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):"
|
||||
sel=$(gum file ~/dotfiles/hypr/conf/windowrules/)
|
||||
if [ ! -z $sel ] ;then
|
||||
sel=$(echo "$sel" | sed "s+"\/home\/$USER"+~+")
|
||||
echo "source = $sel" > ~/dotfiles/hypr/conf/windowrule.conf
|
||||
fi
|
||||
_settingsMenu
|
||||
}
|
||||
|
||||
_settingsMenu() {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _ _ _
|
||||
/ ___| ___| |_| |_(_)_ __ __ _ ___
|
||||
\___ \ / _ \ __| __| | '_ \ / _` / __|
|
||||
___) | __/ |_| |_| | | | | (_| \__ \
|
||||
|____/ \___|\__|\__|_|_| |_|\__, |___/
|
||||
|___/
|
||||
|
||||
EOF
|
||||
if [ -f ~/dotfiles/version ] ;then
|
||||
echo "Version: $(cat ~/dotfiles/version)"
|
||||
echo ""
|
||||
fi
|
||||
menu=$(gum choose "Decorations" "Windows" "Animations" "Monitors" "Environments" "Keybindings" "Windowrules" "Custom" "EXIT")
|
||||
case $menu in
|
||||
Decorations)
|
||||
_settingsDecoration
|
||||
break;;
|
||||
Windows)
|
||||
_settingsWindow
|
||||
break;;
|
||||
Animations)
|
||||
_settingsAnimation
|
||||
break;;
|
||||
Monitors)
|
||||
_settingsMonitor
|
||||
break;;
|
||||
Environments)
|
||||
_settingsEnvironment
|
||||
break;;
|
||||
Keybindings)
|
||||
_settingsKeybinding
|
||||
break;;
|
||||
Windowrules)
|
||||
_settingsWindowrule
|
||||
break;;
|
||||
Custom)
|
||||
_settingsCustom
|
||||
break;;
|
||||
* )
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_settingsMenu
|
||||
# Start Application
|
||||
_getModules $(pwd)/$modules_path
|
||||
|
3
hypr/start-settings.sh
Executable file
3
hypr/start-settings.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd settings
|
||||
./settings.sh
|
@ -21,7 +21,9 @@
|
||||
"default": ""
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
// START WORKSPACES
|
||||
"*": 5
|
||||
// END WORKSPACES
|
||||
}
|
||||
},
|
||||
|
||||
@ -105,7 +107,7 @@
|
||||
// Settings
|
||||
"custom/settings": {
|
||||
"format": "",
|
||||
"on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/hypr/settings/settings.sh",
|
||||
"on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/hypr/start-settings.sh",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
@ -167,7 +169,9 @@
|
||||
|
||||
// Rofi Application Launcher
|
||||
"custom/appmenu": {
|
||||
// START APPS LABEL
|
||||
"format": "Apps",
|
||||
// END APPS LABEL
|
||||
"on-click": "rofi -show drun -replace",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh",
|
||||
"tooltip": false
|
||||
@ -201,7 +205,9 @@
|
||||
"clock": {
|
||||
// "timezone": "America/New_York",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
// START CLOCK FORMAT
|
||||
"format-alt": "{:%Y-%m-%d}"
|
||||
// END CLOCK FORMAT
|
||||
},
|
||||
|
||||
// System
|
||||
|
Loading…
Reference in New Issue
Block a user