feat: customization options for AGS

This commit is contained in:
Zhongheng Liu 2024-08-27 18:32:37 +08:00
commit 5558d0d761
No known key found for this signature in database
2 changed files with 7 additions and 5 deletions

View file

@ -17,7 +17,7 @@ const focusedTitle = Widget.Label({
visible: hyprland.active.client.bind('address') visible: hyprland.active.client.bind('address')
.as(addr => addr !== "0x"), .as(addr => addr !== "0x"),
}) })
const wsSymbols = ["壹", "貳", "叁", "肆", "伍", "陸", "柒", "捌", "玖", "拾"]
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`); const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
const Workspaces = () => Widget.EventBox({ const Workspaces = () => Widget.EventBox({
@ -26,7 +26,7 @@ const Workspaces = () => Widget.EventBox({
child: Widget.Box({ child: Widget.Box({
children: Array.from({ length: 10 }, (_, i) => i + 1).map(i => Widget.Button({ children: Array.from({ length: 10 }, (_, i) => i + 1).map(i => Widget.Button({
attribute: i, attribute: i,
label: `${i}`, label: `${wsSymbols[i - 1]}`,
onClicked: () => dispatch(i), onClicked: () => dispatch(i),
class_name: i === hyprland.active.workspace.id ? "focused" : "" class_name: i === hyprland.active.workspace.id ? "focused" : ""

View file

@ -39,7 +39,7 @@
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
]; ];
bind = let bind = let
terminalCmd = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85 ${config.myShells.defaultShell}"; terminalCmd = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85";
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png"; screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
in in
[ [
@ -61,8 +61,10 @@
"$mod, F, exec, ${pkgs.firefox}/bin/firefox" "$mod, F, exec, ${pkgs.firefox}/bin/firefox"
"$mod, E, exec, ${pkgs.pcmanfm}/bin/pcmanfm" "$mod, E, exec, ${pkgs.pcmanfm}/bin/pcmanfm"
# foot terminal # foot terminal
"$mod, Return, exec, ${terminalCmd}" "$mod, Return, exec, ${terminalCmd} ${config.myShells.defaultShell}"
"$mod SHIFT, Return, exec, [float] ${terminalCmd}" "$mod SHIFT, Return, exec, [float] ${terminalCmd} ${config.myShells.defaultShell}"
"$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
# vimkeys navigation # vimkeys navigation
"$mod, H, movefocus, l" "$mod, H, movefocus, l"