config.ini and ability to use icons
This commit is contained in:
parent
e30b32499e
commit
e87284afc5
6 changed files with 73 additions and 8 deletions
19
scripts/load_config.sh
Executable file
19
scripts/load_config.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/bash
|
||||
|
||||
config=$HOME/.config/hyprmsn/config.ini
|
||||
|
||||
section() {
|
||||
section_name=$1
|
||||
|
||||
sed -n "/\[$section_name\]/,/^$/p" $config | sed -E "s/\[.*\]//g" | sed '/^[[:space:]]*$/d'
|
||||
}
|
||||
|
||||
# daemon section
|
||||
section daemon > /dev/null
|
||||
|
||||
# SOURCING
|
||||
# support comments
|
||||
sed "s/;/#/g" $config | grep -Ev "\[.*\]" | source /dev/stdin
|
||||
|
||||
# remove spaces
|
||||
source <(grep = $config | sed 's/ *= */=/g')
|
Loading…
Add table
Add a link
Reference in a new issue