feat(ags): get custom icons with fetchurl and append them to icon theme
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
16c76043bd
commit
cba58c5b47
8 changed files with 21 additions and 24 deletions
|
@ -5,6 +5,7 @@ import Bar from './ts/bar/binto.ts';
|
||||||
import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts';
|
import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts';
|
||||||
import Powermenu from './ts/powermenu.ts';
|
import Powermenu from './ts/powermenu.ts';
|
||||||
|
|
||||||
|
App.addIcons(`${App.configDir}/icons`);
|
||||||
|
|
||||||
// TODO: add OSD, workspace indicator and current window indicator
|
// TODO: add OSD, workspace indicator and current window indicator
|
||||||
export default {
|
export default {
|
||||||
|
@ -12,8 +13,6 @@ export default {
|
||||||
globalThis.Pointers = Pointers;
|
globalThis.Pointers = Pointers;
|
||||||
},
|
},
|
||||||
|
|
||||||
icons: './icons',
|
|
||||||
|
|
||||||
windows: [
|
windows: [
|
||||||
AppLauncher(),
|
AppLauncher(),
|
||||||
NotifCenter(),
|
NotifCenter(),
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
|
||||||
<svg width="800px" height="800px" viewBox="0 -3 14 14" id="meteor-icon-kit__regular-chevron-down-s" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
|
||||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<g id="SVGRepo_iconCarrier">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.70711 0.29289C1.31658 -0.09763 0.68342 -0.09763 0.29289 0.29289C-0.09763 0.68342 -0.09763 1.3166 0.29289 1.7071L6.2929 7.7071C6.6834 8.0976 7.3166 8.0976 7.7071 7.7071L13.7071 1.7071C14.0976 1.3166 14.0976 0.68342 13.7071 0.29289C13.3166 -0.09763 12.6834 -0.09763 12.2929 0.29289L7 5.5858L1.70711 0.29289z" fill="#ffffff"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 879 B |
|
@ -61,7 +61,7 @@ export const BluetoothMenu = () => {
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
|
|
||||||
child: Icon({
|
child: Icon({
|
||||||
icon: `${App.configDir }/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'scrolled-indicator',
|
class_name: 'scrolled-indicator',
|
||||||
size: 16,
|
size: 16,
|
||||||
css: '-gtk-icon-transform: rotate(180deg);',
|
css: '-gtk-icon-transform: rotate(180deg);',
|
||||||
|
@ -72,7 +72,7 @@ export const BluetoothMenu = () => {
|
||||||
transition: 'slide_up',
|
transition: 'slide_up',
|
||||||
|
|
||||||
child: Icon({
|
child: Icon({
|
||||||
icon: `${App.configDir }/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'scrolled-indicator',
|
class_name: 'scrolled-indicator',
|
||||||
size: 16,
|
size: 16,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -162,7 +162,7 @@ const GridButton = ({
|
||||||
},
|
},
|
||||||
|
|
||||||
child: Icon({
|
child: Icon({
|
||||||
icon: `${App.configDir }/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'grid-chev',
|
class_name: 'grid-chev',
|
||||||
|
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
|
|
|
@ -78,7 +78,7 @@ export const NetworkMenu = () => {
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
|
|
||||||
child: Icon({
|
child: Icon({
|
||||||
icon: `${App.configDir }/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'scrolled-indicator',
|
class_name: 'scrolled-indicator',
|
||||||
size: 16,
|
size: 16,
|
||||||
css: '-gtk-icon-transform: rotate(180deg);',
|
css: '-gtk-icon-transform: rotate(180deg);',
|
||||||
|
@ -89,7 +89,7 @@ export const NetworkMenu = () => {
|
||||||
transition: 'slide_up',
|
transition: 'slide_up',
|
||||||
|
|
||||||
child: Icon({
|
child: Icon({
|
||||||
icon: `${App.configDir }/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'scrolled-indicator',
|
class_name: 'scrolled-indicator',
|
||||||
size: 16,
|
size: 16,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { RevealerGeneric } from 'global-types';
|
||||||
|
|
||||||
export default (rev: RevealerGeneric) => {
|
export default (rev: RevealerGeneric) => {
|
||||||
const child = Icon({
|
const child = Icon({
|
||||||
icon: `${App.configDir}/icons/down-large.svg`,
|
icon: 'down-large-symbolic',
|
||||||
class_name: 'arrow',
|
class_name: 'arrow',
|
||||||
css: '-gtk-icon-transform: rotate(180deg);',
|
css: '-gtk-icon-transform: rotate(180deg);',
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,12 +10,11 @@ import OSK from './ts/on-screen-keyboard/main.ts';
|
||||||
import Powermenu from './ts/powermenu.ts';
|
import Powermenu from './ts/powermenu.ts';
|
||||||
import QSettings from './ts/quick-settings/main.ts';
|
import QSettings from './ts/quick-settings/main.ts';
|
||||||
|
|
||||||
|
App.addIcons(`${App.configDir}/icons`);
|
||||||
Setup();
|
Setup();
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
icons: './icons',
|
|
||||||
|
|
||||||
windows: [
|
windows: [
|
||||||
...Corners(),
|
...Corners(),
|
||||||
|
|
||||||
|
|
|
@ -23,18 +23,26 @@ in {
|
||||||
|
|
||||||
# https://github.com/Aylur/ags/blob/e1f2d311ceb496a69ef6daa6aebb46ce511b2f22/nix/hm-module.nix#L69
|
# https://github.com/Aylur/ags/blob/e1f2d311ceb496a69ef6daa6aebb46ce511b2f22/nix/hm-module.nix#L69
|
||||||
agsTypes = config.home.file.".local//share/com.github.Aylur.ags/types";
|
agsTypes = config.home.file.".local//share/com.github.Aylur.ags/types";
|
||||||
|
agsConfigDir = ".nix/modules/ags/config";
|
||||||
in {
|
in {
|
||||||
programs.ags.enable = true;
|
programs.ags.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
".config/ags".source = symlink /home/${mainUser}/.nix/modules/ags/config;
|
".config/ags".source = symlink /home/${mainUser}/.nix/modules/ags/config;
|
||||||
".nix/modules/ags/config/icons/mouse-razer-symbolic.svg".source = pkgs.fetchurl {
|
|
||||||
|
# Icons
|
||||||
|
"${agsConfigDir}/icons/mouse-razer-symbolic.svg".source = pkgs.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/bithatch/razer-icon-font/main/src/devices/mouse.svg";
|
url = "https://raw.githubusercontent.com/bithatch/razer-icon-font/main/src/devices/mouse.svg";
|
||||||
hash = "sha256-A1+eIp2VEFDyY23GIHKhbnByHXrnVS3QgIJ9sjjtuZw=";
|
hash = "sha256-A1+eIp2VEFDyY23GIHKhbnByHXrnVS3QgIJ9sjjtuZw=";
|
||||||
};
|
};
|
||||||
".nix/modules/ags/config/types".source = agsTypes.source;
|
"${agsConfigDir}/icons/down-large-symbolic.svg".source = pkgs.fetchurl {
|
||||||
".nix/modules/ags/config/config.js".text =
|
url = "https://www.svgrepo.com/download/158537/down-chevron.svg";
|
||||||
|
hash = "sha256-mOfNjgZh0rt6XosKA2kpLY22lJldSS1XCphgrnvZH1s=";
|
||||||
|
};
|
||||||
|
|
||||||
|
"${agsConfigDir}/types".source = agsTypes.source;
|
||||||
|
"${agsConfigDir}/config.js".text =
|
||||||
/*
|
/*
|
||||||
javascript
|
javascript
|
||||||
*/
|
*/
|
||||||
|
@ -72,16 +80,16 @@ in {
|
||||||
]
|
]
|
||||||
++ optionals isTouchscreen ["squeekboard"];
|
++ optionals isTouchscreen ["squeekboard"];
|
||||||
|
|
||||||
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
|
|
||||||
bind = [
|
bind = [
|
||||||
"$mainMod SHIFT, E , exec, ags -t powermenu"
|
"$mainMod SHIFT, E , exec, ags -t powermenu"
|
||||||
"$mainMod , D , exec, ags -t applauncher"
|
"$mainMod , D , exec, ags -t applauncher"
|
||||||
];
|
];
|
||||||
binde = [
|
binde = [
|
||||||
## Brightness control
|
## Brightness control
|
||||||
", XF86MonBrightnessUp, exec, ags -r 'Brightness.screen += 0.05'"
|
", XF86MonBrightnessUp, exec, ags -r 'Brightness.screen += 0.05'"
|
||||||
", XF86MonBrightnessDown, exec, ags -r 'Brightness.screen -= 0.05'"
|
", XF86MonBrightnessDown, exec, ags -r 'Brightness.screen -= 0.05'"
|
||||||
];
|
];
|
||||||
|
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
|
||||||
bindr = ["CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()'"];
|
bindr = ["CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()'"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue