forked from Shinonome/dots-hyprland
use Hyprland.sendMessage; add more async catches
This commit is contained in:
@@ -200,7 +200,8 @@ const BatteryModule = () => Stack({
|
||||
.then(output => {
|
||||
return JSON.parse(output)['city'].toLowerCase();
|
||||
})
|
||||
.then(updateWeatherForCity);
|
||||
.then(updateWeatherForCity)
|
||||
.catch(print)
|
||||
}
|
||||
}),
|
||||
})
|
||||
@@ -215,7 +216,7 @@ const BatteryModule = () => Stack({
|
||||
const switchToRelativeWorkspace = async (self, num) => {
|
||||
try {
|
||||
const Hyprland = (await import('resource:///com/github/Aylur/ags/service/hyprland.js')).default;
|
||||
Hyprland.sendMessage(`dispatch workspace ${num > 0 ? '+' : ''}${num}`);
|
||||
Hyprland.messageAsync(`dispatch workspace ${num > 0 ? '+' : ''}${num}`).catch(print);
|
||||
} catch {
|
||||
execAsync([`${App.configDir}/scripts/sway/swayToRelativeWs.sh`, `${num}`]).catch(print);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user