From fdf8fd261eba972e23e8926caeb3aa41c5e3ac68 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 30 Mar 2024 12:23:23 +0100 Subject: [PATCH] treewide: use Bash internal 'test' command (#311) Related: https://stackoverflow.com/questions/3427872 --- modules/gnome/hm.nix | 2 +- modules/kde/hm.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gnome/hm.nix b/modules/gnome/hm.nix index ff2f3f5d..2accc30c 100644 --- a/modules/gnome/hm.nix +++ b/modules/gnome/hm.nix @@ -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 diff --git a/modules/kde/hm.nix b/modules/kde/hm.nix index dc948cd7..17a522b8 100644 --- a/modules/kde/hm.nix +++ b/modules/kde/hm.nix @@ -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 '';