mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-02 21:30:39 -04:00
updates
This commit is contained in:
parent
1f8cb3c145
commit
610604e80f
253 changed files with 27055 additions and 44 deletions
13
.config/ags/modules/.miscutils/icons.js
Normal file
13
.config/ags/modules/.miscutils/icons.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const { Gtk } = imports.gi;
|
||||
|
||||
export function iconExists(iconName) {
|
||||
let iconTheme = Gtk.IconTheme.get_default();
|
||||
return iconTheme.has_icon(iconName);
|
||||
}
|
||||
|
||||
export function substitute(str) {
|
||||
if(userOptions.icons.substitutions[str]) return userOptions.icons.substitutions[str];
|
||||
|
||||
if (!iconExists(str)) str = str.toLowerCase().replace(/\s+/g, '-'); // Turn into kebab-case
|
||||
return str;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue