mirror of
https://github.com/danth/stylix
synced 2024-11-10 06:34:15 +00:00
treewide: use Bash internal 'test' command (#311)
Related: https://stackoverflow.com/questions/3427872
This commit is contained in:
parent
bad1af63ff
commit
fdf8fd261e
2 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ with lib;
|
|||
let theme = import ./theme.nix args;
|
||||
in "${theme}/share/gnome-shell/gnome-shell.css";
|
||||
onChange = ''
|
||||
if [ -x "$(command -v gnome-extensions)" ]; then
|
||||
if [[ -x "$(command -v gnome-extensions)" ]]; then
|
||||
gnome-extensions disable user-theme@gnome-shell-extensions.gcampax.github.com
|
||||
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
|
||||
fi
|
||||
|
|
|
@ -235,7 +235,7 @@ in {
|
|||
home.activation.stylixLookAndFeel = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
globalPath() {
|
||||
for dir in /run/current-system/sw/bin /usr/bin /bin; do
|
||||
if [ -f "$dir/$1" ]; then
|
||||
if [[ -f "$dir/$1" ]]; then
|
||||
echo "$dir/$1"
|
||||
break
|
||||
fi
|
||||
|
@ -243,12 +243,12 @@ in {
|
|||
}
|
||||
|
||||
wallpaperImage="$(globalPath plasma-apply-wallpaperimage)"
|
||||
if [ -n "$wallpaperImage" ]; then
|
||||
if [[ -n "$wallpaperImage" ]]; then
|
||||
"$wallpaperImage" ${themePackage}/share/wallpapers/stylix
|
||||
fi
|
||||
|
||||
lookAndFeel="$(globalPath plasma-apply-lookandfeel)"
|
||||
if [ -n "$lookAndFeel" ]; then
|
||||
if [[ -n "$lookAndFeel" ]]; then
|
||||
"$lookAndFeel" --apply stylix
|
||||
fi
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue