Added the ability to assign shortcuts to all bar modules. (#278)

This commit is contained in:
Jas Singh
2024-09-21 16:47:59 -07:00
committed by GitHub
parent 6be9030ac5
commit b47864d8e1
28 changed files with 497 additions and 94 deletions

View File

@@ -2,19 +2,19 @@ import options from 'options';
import { module } from '../module';
import { inputHandler } from 'customModules/utils';
import Gtk from 'types/@girs/gtk-3.0/gtk-3.0';
import Button from 'types/widgets/button';
import { Module } from 'lib/types/bar';
import { Attribute, Child } from 'lib/types/widget';
import { BarBoxChild } from 'lib/types/bar';
const { icon, leftClick, rightClick, middleClick, scrollUp, scrollDown } = options.bar.customModules.power;
export const Power = (): Module => {
export const Power = (): BarBoxChild => {
const powerModule = module({
tooltipText: 'Power Menu',
textIcon: icon.bind('value'),
boxClass: 'powermodule',
props: {
setup: (self: Button<Gtk.Widget, Gtk.Widget>) => {
setup: (self: Button<Child, Attribute>) => {
inputHandler(self, {
onPrimaryClick: {
cmd: leftClick,