forked from Shinonome/dots-hyprland
ags: support optional darkman integration (#466)
This commit is contained in:
@@ -14,8 +14,10 @@ darkMode.connect('changed', ({ value }) => {
|
|||||||
let lightdark = value ? "dark" : "light";
|
let lightdark = value ? "dark" : "light";
|
||||||
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_state_dir()}/ags/user && sed -i "1s/.*/${lightdark}/" ${GLib.get_user_state_dir()}/ags/user/colormode.txt`])
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_state_dir()}/ags/user && sed -i "1s/.*/${lightdark}/" ${GLib.get_user_state_dir()}/ags/user/colormode.txt`])
|
||||||
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`]))
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`]))
|
||||||
|
.then(execAsync(['bash', '-c', `command -v darkman && darkman set ${lightdark}`])) // Optional darkman integration
|
||||||
.catch(print);
|
.catch(print);
|
||||||
});
|
});
|
||||||
|
globalThis['darkMode'] = darkMode;
|
||||||
export const hasPlasmaIntegration = !!Utils.exec('bash -c "command -v plasma-browser-integration-host"');
|
export const hasPlasmaIntegration = !!Utils.exec('bash -c "command -v plasma-browser-integration-host"');
|
||||||
|
|
||||||
export const getDistroIcon = () => {
|
export const getDistroIcon = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user