Add ags launcher
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import gap from './gap/gap';
|
||||
import date from './date/date';
|
||||
import launcher from './launcher/launcher';
|
||||
import workspace from './workspace/workspace';
|
||||
|
||||
export default (monitor: number) => Widget.Window({
|
||||
@@ -8,11 +10,13 @@ export default (monitor: number) => Widget.Window({
|
||||
exclusivity: 'exclusive',
|
||||
anchor: ['top', 'right', 'left'],
|
||||
child: Widget.CenterBox({
|
||||
css: 'min-width: 2px; min-height: 2px; padding-top: 2px; padding-bottom: 2px;',
|
||||
class_name: 'widgets',
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
startWidget: Widget.Box({
|
||||
hexpand: true,
|
||||
children: [
|
||||
launcher(),
|
||||
gap(),
|
||||
workspace(),
|
||||
],
|
||||
}),
|
||||
|
@@ -6,8 +6,13 @@ const clock = Variable(glib.DateTime.new_now_local(), {
|
||||
|
||||
const time = Utils.derive([clock], (c) => c.format('%H:%M - %A, %d %B %Y') || '');
|
||||
|
||||
export default () => Widget.Label({
|
||||
const label = () => Widget.Label({
|
||||
class_name: 'label',
|
||||
justification: 'center',
|
||||
label: time.bind(),
|
||||
});
|
||||
|
||||
export default () => Widget.EventBox({
|
||||
class_name: 'date',
|
||||
child: label(),
|
||||
});
|
||||
|
3
users/configs/ags/config/src/widgets/bar/gap/gap.ts
Normal file
3
users/configs/ags/config/src/widgets/bar/gap/gap.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default () => Widget.Box({
|
||||
class_name: 'gap',
|
||||
});
|
@@ -0,0 +1,10 @@
|
||||
const icon = () => Widget.Icon({
|
||||
class_name: 'icon',
|
||||
icon: "nix-snowflake-symbolic",
|
||||
});
|
||||
|
||||
export default () => Widget.EventBox({
|
||||
class_name: 'launcher',
|
||||
on_primary_click: () => Utils.execAsync('bash -c "rofi -cache-dir $XDG_CACHE_HOME/rofi -show drun"'),
|
||||
child: icon(),
|
||||
});
|
Reference in New Issue
Block a user