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

Merged
tio merged 1 commits from rokosun-patch-1 into main 2022-09-18 22:40:15 +00:00
Owner

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 added 1 commit 2022-09-18 20:06:24 +00:00
73471917ef Use the -m option in xfconf-query to monitor for changes
I also improved the overall code syntax, there's no need for the old functions anymore.
Author
Owner

@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 approved these changes 2022-09-18 22:00:31 +00:00
@ -20,2 +4,2 @@
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf
}
# Check if the system theme has been changed
if [ "$line" = 'set: /Net/ThemeName' ]; then
Owner

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 😉
Author
Owner

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 😄
Owner

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

Oh, man.. Happens to me too quite often 😅
rokosun marked this conversation as resolved
eSh added the
enhancement
label 2022-09-18 22:01:59 +00:00
tio merged commit d44db40e3e into main 2022-09-18 22:40:15 +00:00
Sign in to join this conversation.
No reviewers
eSh
No Milestone
No project
No Assignees
2 Participants
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.