hyprpanel
This commit is contained in:
1 parent
10080a83ee
commit
5151ac24da
322 files changed
+38276
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { Variable } from 'types/variable';
|
||||
|
||||
const hyprland = await Service.import('hyprland');
|
||||
|
||||
export const isSubmapEnabled = (submap: string, enabled: string, disabled: string): string => {
|
||||
return submap !== 'default' ? enabled : disabled;
|
||||
};
|
||||
|
||||
export const getInitialSubmap = (submapStatus: Variable<string>): void => {
|
||||
let submap = hyprland.message('submap');
|
||||
|
||||
const newLineCarriage = /\n/g;
|
||||
submap = submap.replace(newLineCarriage, '');
|
||||
|
||||
if (submap === 'unknown request') {
|
||||
submap = 'default';
|
||||
}
|
||||
|
||||
submapStatus.value = submap;
|
||||
};
|
||||
Reference in new issue
Block a user