many changed, added nixos-hardware
This commit is contained in:
parent
f4f1c5bba7
commit
2accd81424
149 changed files with 19124 additions and 238 deletions
91
modules/styling/config/widgets/cheatsheet/main.js
Normal file
91
modules/styling/config/widgets/cheatsheet/main.js
Normal file
|
@ -0,0 +1,91 @@
|
|||
const { Gdk, Gtk } = imports.gi;
|
||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
import { Keybinds } from "./keybinds.js";
|
||||
import { setupCursorHover } from "../../lib/cursorhover.js";
|
||||
|
||||
const cheatsheetHeader = () => Widget.CenterBox({
|
||||
vertical: false,
|
||||
startWidget: Widget.Box({}),
|
||||
centerWidget: Widget.Box({
|
||||
vertical: true,
|
||||
className: "spacing-h-15",
|
||||
children: [
|
||||
Widget.Box({
|
||||
hpack: 'center',
|
||||
className: 'spacing-h-5',
|
||||
children: [
|
||||
Widget.Label({
|
||||
hpack: 'center',
|
||||
css: 'margin-right: 0.682rem;',
|
||||
className: 'txt-title txt',
|
||||
label: 'Cheat sheet',
|
||||
}),
|
||||
Widget.Label({
|
||||
vpack: 'center',
|
||||
className: "cheatsheet-key txt-small",
|
||||
label: "",
|
||||
}),
|
||||
Widget.Label({
|
||||
vpack: 'center',
|
||||
className: "cheatsheet-key-notkey txt-small",
|
||||
label: "+",
|
||||
}),
|
||||
Widget.Label({
|
||||
vpack: 'center',
|
||||
className: "cheatsheet-key txt-small",
|
||||
label: "/",
|
||||
})
|
||||
]
|
||||
}),
|
||||
Widget.Label({
|
||||
useMarkup: true,
|
||||
selectable: true,
|
||||
justify: Gtk.Justification.CENTER,
|
||||
className: 'txt-small txt',
|
||||
label: 'Sheet data stored in <tt>~/.config/ags/data/keybinds.js</tt>\nChange keybinds in <tt>~/.config/hypr/keybinds.conf</tt>'
|
||||
}),
|
||||
]
|
||||
}),
|
||||
endWidget: Widget.Button({
|
||||
vpack: 'start',
|
||||
hpack: 'end',
|
||||
className: "cheatsheet-closebtn icon-material txt txt-hugeass",
|
||||
onClicked: () => {
|
||||
App.toggleWindow('cheatsheet');
|
||||
},
|
||||
child: Widget.Label({
|
||||
className: 'icon-material txt txt-hugeass',
|
||||
label: 'close'
|
||||
}),
|
||||
setup: setupCursorHover,
|
||||
}),
|
||||
});
|
||||
|
||||
const clickOutsideToClose = Widget.EventBox({
|
||||
onPrimaryClick: () => App.closeWindow('cheatsheet'),
|
||||
onSecondaryClick: () => App.closeWindow('cheatsheet'),
|
||||
onMiddleClick: () => App.closeWindow('cheatsheet'),
|
||||
});
|
||||
|
||||
export default () => Widget.Window({
|
||||
name: 'cheatsheet',
|
||||
exclusivity: 'ignore',
|
||||
keymode: 'exclusive',
|
||||
popup: true,
|
||||
visible: false,
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
children: [
|
||||
clickOutsideToClose,
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
className: "cheatsheet-bg spacing-v-15",
|
||||
children: [
|
||||
cheatsheetHeader(),
|
||||
Keybinds(),
|
||||
]
|
||||
}),
|
||||
],
|
||||
})
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue