Migrated to ansible
This commit is contained in:
48
roles/ags/files/config.js
Normal file
48
roles/ags/files/config.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const systemtray = await Service.import('systemtray')
|
||||
|
||||
/** @param {import('types/service/systemtray').TrayItem} item */
|
||||
const SysTrayItem = item => Widget.Button({
|
||||
child: Widget.Icon().bind('icon', item, 'icon'),
|
||||
tooltipMarkup: item.bind('tooltip_markup'),
|
||||
onPrimaryClick: (_, event) => item.activate(event),
|
||||
onSecondaryClick: (_, event) => item.openMenu(event),
|
||||
});
|
||||
|
||||
function SysTray() {
|
||||
return Widget.Box({ children: systemtray.bind('items').transform(i => i.map(SysTrayItem)) });
|
||||
}
|
||||
|
||||
function Bar(monitor = 0) {
|
||||
const lTime = Widget.Label({
|
||||
label: 'TIME',
|
||||
});
|
||||
|
||||
Utils.interval(1000, () => {
|
||||
lTime.label = Utils.exec('date +%H:%M');
|
||||
//date +%d.%m.%Y
|
||||
});
|
||||
|
||||
const bTimeDate = Widget.Box({
|
||||
children: [lTime]
|
||||
});
|
||||
|
||||
const bInfo = Widget.Box({
|
||||
hpack: "end",
|
||||
children: [SysTray()]
|
||||
});
|
||||
|
||||
return Widget.Window({
|
||||
monitor,
|
||||
exclusivity: 'exclusive',
|
||||
name: `bar ${monitor}`,
|
||||
anchor: ['top', 'left', 'right'],
|
||||
child: Widget.CenterBox({
|
||||
centerWidget: bTimeDate,
|
||||
endWidget: bInfo,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
windows: [Bar(1), Bar(2)]
|
||||
};
|
||||
19
roles/ags/tasks/main.yml
Normal file
19
roles/ags/tasks/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: "[AGS] Install"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- aylurs-gtk-shell-git
|
||||
use: paru
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: "[AGS] Create config folder"
|
||||
ansible.builtin.file:
|
||||
mode: "0755"
|
||||
path: "{{ ansible_user_dir }}/.config/ags"
|
||||
state: directory
|
||||
|
||||
- name: "[AGS] Configure"
|
||||
ansible.builtin.copy:
|
||||
src: "./"
|
||||
dest: "{{ ansible_user_dir }}/.config/ags"
|
||||
Reference in New Issue
Block a user