Use the -m option in xfconf-query to monitor for changes #5

Merged
rokosun merged 0 commits from refs/pull/5/head into main 2022-09-19 00:40:15 +02:00
rokosun commented 2022-09-18 22:06:23 +02:00 (Migrated from git.webape.site)

I also improved the overall code syntax, there's no need for the old functions anymore.

I also improved the overall code syntax, there's no need for the old functions anymore.
rokosun commented 2022-09-18 22:11:55 +02:00 (Migrated from git.webape.site)

@tio: Test this and let me know if you find any bugs, when you're satisfied with the script then you can merge it.

@tio: Test this and let me know if you find any bugs, when you're satisfied with the script then you can merge it.
eSh (Migrated from git.webape.site) approved these changes 2022-09-19 00:00:20 +02:00
@ -229,1 +3,3 @@
done < <(xfconf-query -c xsettings -m)
# Check if the system theme has been changed
if [ "$line" = 'set: /Net/ThemeName' ]; then
eSh (Migrated from git.webape.site) commented 2022-09-19 00:00:20 +02:00

A minor thing: to replace if;then;fi with switch;case statement:

case EXPRESSION in

  PATTERN_1)
    STATEMENTS
    ;;

  PATTERN_2)
    STATEMENTS
    ;;

  PATTERN_N)
    STATEMENTS
    ;;

  *)
    STATEMENTS
    ;;
esac

More details and examples are here.

This just adds some structure and also an easier to update if some more settings changes will be necessary to subsctibe to. But I leave it up to you to decide, you can skip it if you want 😉

A minor thing: to replace `if;then;fi` with `switch;case` statement: ``` case EXPRESSION in PATTERN_1) STATEMENTS ;; PATTERN_2) STATEMENTS ;; PATTERN_N) STATEMENTS ;; *) STATEMENTS ;; esac ``` More details and examples are [here](https://linuxize.com/post/bash-case-statement/). This just adds some structure and also an easier to update if some more settings changes will be necessary to subsctibe to. But I leave it up to you to decide, you can skip it if you want 😉
eSh (Migrated from git.webape.site) commented 2022-09-19 00:36:11 +02:00

Oh of course it makes sense to use a case statement here, why didn't I think of it before? lol 😄

Oh of course it makes sense to use a case statement here, why didn't I think of it before? lol 😄
eSh (Migrated from git.webape.site) commented 2022-09-19 00:39:00 +02:00

Oh, man.. Happens to me too quite often 😅

Oh, man.. Happens to me too quite often 😅
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TROMjaro/fixes-package#5
No description provided.