chore: update flake.lock

This commit is contained in:
matt1432 2023-11-06 18:37:23 -05:00
parent 8e3335d9be
commit 6a40c0141d
24 changed files with 105 additions and 100 deletions

View file

@ -4,11 +4,11 @@ import { exec } from 'resource:///com/github/Aylur/ags/utils.js';
import Setup from './js/setup.js';
import Powermenu from './js/powermenu.js';
import * as Bar from './js/bar/main.js';
import NotifCenter from './js/notifications/center.js';
import NotifPopups from './js/notifications/popup.js';
//import NotifCenter from './js/notifications/center.js';
//import NotifPopups from './js/notifications/popup.js';
import Calendar from './js/date.js';
import QuickSettings from './js/quick-settings/main.js';
import Overview from './js/overview/main.js';
//import Overview from './js/overview/main.js';
import AppLauncher from './js/applauncher/main.js';
import * as Corners from './js/screen-corners.js';
@ -18,6 +18,7 @@ exec(`sassc ${scss} ${css}`);
Setup();
// FIXME: notification and overview stuff are bugged as of this ags commit
export default {
style: css,
notificationPopupTimeout: 5000,
@ -33,8 +34,8 @@ export default {
windows: [
AppLauncher(),
Calendar(),
NotifCenter(),
Overview(),
//NotifCenter(),
//Overview(),
Powermenu(),
QuickSettings(),
@ -42,6 +43,6 @@ export default {
Bar.BgGradient(),
Corners.Bottomleft(),
Corners.Bottomright(),
NotifPopups(),
//NotifPopups(),
],
};

View file

@ -40,7 +40,7 @@ const AppItem = (app, window) => {
className: 'title',
label: app.name,
xalign: 0,
valign: 'center',
vpack: 'center',
ellipsize: 3,
}),
Label({
@ -49,7 +49,7 @@ const AppItem = (app, window) => {
wrap: true,
xalign: 0,
justification: 'left',
valign: 'center',
vpack: 'center',
}),
],
}),

View file

@ -1,5 +1,6 @@
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
import { Label, Box, Icon } from 'resource:///com/github/Aylur/ags/widget.js';
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
import Separator from '../misc/separator.js';
import EventBox from '../misc/cursorbox.js';
@ -43,7 +44,7 @@ const SpeakerPercentLabel = props => Label({
});
export default () => EventBox({
onPrimaryClickRelease: 'pavucontrol',
onPrimaryClickRelease: () => execAsync(['pavucontrol']).catch(print),
className: 'toggle-off',
child: Box({
className: 'audio',

View file

@ -23,7 +23,7 @@ export default () => Overlay({
}),
overlays: [
Box({
style: 'color: #CBA6F7;',
css: 'color: #CBA6F7;',
children: [
Separator(25),
Heart(),

View file

@ -3,7 +3,7 @@ import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
export default () => Label({
style: 'color: #CBA6F7; font-size: 18px',
css: 'color: #CBA6F7; font-size: 18px',
truncate: 'end',
binds: [['label', Hyprland.active.client, 'title']],
});

View file

@ -27,7 +27,7 @@ export default props => Overlay({
],
child: Box({
style: 'min-height: 1px',
css: 'min-height: 1px',
hexpand: true,
vertical: true,
children: [
@ -38,7 +38,7 @@ export default props => Overlay({
properties: [['timeouts', []]],
connections: [[Revealed, self => {
const Bar = App.getWindow('bar');
Bar.setStyle(Revealed.value ? '' : wStyle);
Bar.setCss(Revealed.value ? '' : wStyle);
const BgGradient = App.getWindow('bg-gradient');
BgGradient.visible = !Revealed.value;
@ -90,7 +90,7 @@ export default props => Overlay({
self.get_parent().revealChild = false;
},
child: Box({
style: 'min-height: 50px;',
css: 'min-height: 50px;',
}),
}),
}),

View file

@ -5,7 +5,7 @@ import EventBox from '../misc/cursorbox.js';
export default () => EventBox({
halign: 'center',
hpack: 'center',
onPrimaryClickRelease: () => {
execAsync(['bash', '-c', '$AGS_PATH/heart.sh toggle']).catch(print);

View file

@ -9,7 +9,7 @@ export default () => Box({
children: [
Icon({
icon: 'input-keyboard-symbolic',
style: 'margin-right: 4px;',
css: 'margin-right: 4px;',
}),
Label({
connections: [[Hyprland, (self, _n, layout) => {

View file

@ -20,7 +20,7 @@ export const BgGradient = () => Window({
name: 'bg-gradient',
layer: 'background',
anchor: ['top', 'bottom', 'left', 'right'],
style: `
css: `
background-image: -gtk-gradient (linear,
left top, left bottom,
from(rgba(0, 0, 0, 0.5)),
@ -39,7 +39,7 @@ export const Bar = () => Window({
vertical: false,
startWidget: Box({
halign: 'start',
hpack: 'start',
children: [
OskToggle(),
@ -76,7 +76,7 @@ export const Bar = () => Window({
}),
endWidget: Box({
halign: 'end',
hpack: 'end',
children: [
Battery(),

View file

@ -17,7 +17,7 @@ const Workspace = ({ i } = {}) =>
.catch(print);
},
child: Box({
valign: 'center',
vpack: 'center',
className: 'button',
setup: self => {
self.update = addr => {
@ -53,21 +53,24 @@ export default () => {
if (currentIndex < 0)
return;
highlight.setStyle(`margin-left: ${16 + currentIndex * 30}px`);
highlight.setCss(`margin-left: ${16 + currentIndex * 30}px`);
};
const highlight = Box({
valign: 'center',
halign: 'start',
vpack: 'center',
hpack: 'start',
className: 'button active',
connections: [[Hyprland.active.workspace, updateHighlight]],
});
const widget = Overlay({
setup: self => {
self.set_overlay_pass_through(
self.get_children()[1],
true,
);
// FIXME: see if we can get rid of this timeout
timeout(1, () => {
self.set_overlay_pass_through(
self.get_children()[1],
true,
);
});
},
overlays: [highlight],
child: EventBox({

View file

@ -1,6 +1,5 @@
import { Widget, Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
import { Box, Calendar, Label } from 'resource:///com/github/Aylur/ags/widget.js';
import Gtk from 'gi://Gtk';
import GLib from 'gi://GLib';
const { DateTime } = GLib;
@ -19,8 +18,8 @@ const Time = () => Box({
Box({
className: 'time-container',
halign: 'center',
valign: 'center',
hpack: 'center',
vpack: 'center',
children: [
Label({
@ -46,9 +45,9 @@ const Time = () => Box({
Box({
className: 'date-container',
halign: 'center',
hpack: 'center',
child: Label({
style: 'font-size: 20px',
css: 'font-size: 20px',
label: 'complete date',
connections: [[1000, self => {
var time = DateTime.new_now_local();
@ -64,8 +63,7 @@ const Time = () => Box({
const CalendarWidget = () => Box({
className: 'cal-box',
child: Widget({
type: Gtk.Calendar,
child: Calendar({
showDayNames: true,
showHeading: true,
className: 'cal',
@ -74,7 +72,7 @@ const CalendarWidget = () => Box({
export default () => PopupWindow({
anchor: ['top', 'right'],
margin: [6, 182, 0, 0],
margins: [6, 182, 0, 0],
name: 'calendar',
child: Box({
className: 'date',

View file

@ -40,7 +40,7 @@ export default ({
// Slide right
if (offset >= 0) {
playerBox.setStyle(`
playerBox.setCss(`
margin-left: ${offset}px;
margin-right: -${offset}px;
${playerBox._bgStyle}
@ -50,7 +50,7 @@ export default ({
// Slide left
else {
offset = Math.abs(offset);
playerBox.setStyle(`
playerBox.setCss(`
margin-left: -${offset}px;
margin-right: ${offset}px;
${playerBox._bgStyle}
@ -75,7 +75,7 @@ export default ({
// Slide away right
if (offset >= 0) {
playerBox.setStyle(`
playerBox.setCss(`
${TRANSITION}
margin-left: ${OFFSCREEN}px;
margin-right: -${OFFSCREEN}px;
@ -85,7 +85,7 @@ export default ({
// Slide away left
else {
playerBox.setStyle(`
playerBox.setCss(`
${TRANSITION}
margin-left: -${OFFSCREEN}px;
margin-right: ${OFFSCREEN}px;
@ -96,14 +96,14 @@ export default ({
// Put the player in the back after anim
overlay.reorder_overlay(playerBox, 0);
// Recenter player
playerBox.setStyle(playerBox._bgStyle);
playerBox.setCss(playerBox._bgStyle);
widget.sensitive = true;
});
}
else {
// Recenter with transition for animation
playerBox.setStyle(`${TRANSITION} ${playerBox._bgStyle}`);
playerBox.setCss(`${TRANSITION} ${playerBox._bgStyle}`);
}
}, 'drag-end'],
],

View file

@ -52,7 +52,7 @@ export const CoverArt = (player, props) => CenterBox({
background-size: cover;
background-position: center;
`;
self.setStyle(self._bgStyle);
self.setCss(self._bgStyle);
}
});
},
@ -75,7 +75,7 @@ export const CoverArt = (player, props) => CenterBox({
`;
if (!self.get_parent()._dragging)
self.setStyle(self._bgStyle);
self.setCss(self._bgStyle);
}).catch(err => {
if (err !== '')
print(err);
@ -200,7 +200,7 @@ const PlayerButton = ({ player, items, onClick, prop }) => Button({
if (prop == 'playBackStatus') {
items.forEach(item => {
item[1].setStyle(`
item[1].setCss(`
background-color: ${player.colors.value.hoverAccent};
color: ${player.colors.value.buttonText};
min-height: 40px;
@ -216,7 +216,7 @@ const PlayerButton = ({ player, items, onClick, prop }) => Button({
self.window.set_cursor(null);
if (prop == 'playBackStatus') {
items.forEach(item => {
item[1].setStyle(`
item[1].setCss(`
background-color: ${player.colors.value.buttonAccent};
color: ${player.colors.value.buttonText};
min-height: 42px;
@ -238,7 +238,7 @@ const PlayerButton = ({ player, items, onClick, prop }) => Button({
if (prop == 'playBackStatus') {
if (button._hovered) {
items.forEach(item => {
item[1].setStyle(`
item[1].setCss(`
background-color: ${player.colors.value.hoverAccent};
color: ${player.colors.value.buttonText};
min-height: 40px;
@ -250,7 +250,7 @@ const PlayerButton = ({ player, items, onClick, prop }) => Button({
}
else {
items.forEach(item => {
item[1].setStyle(`
item[1].setCss(`
background-color: ${player.colors.value.buttonAccent};
color: ${player.colors.value.buttonText};
min-height: 42px;

View file

@ -11,8 +11,8 @@ const FAVE_PLAYER = 'org.mpris.MediaPlayer2.spotify';
const Top = player => Box({
className: 'top',
halign: 'start',
valign: 'start',
hpack: 'start',
vpack: 'start',
children: [
mpris.PlayerIcon(player, {
symbolic: false,
@ -30,8 +30,8 @@ const Center = player => Box({
Box({
className: 'metadata',
vertical: true,
halign: 'start',
valign: 'center',
hpack: 'start',
vpack: 'center',
hexpand: true,
children: [
mpris.TitleLabel(player),
@ -59,8 +59,8 @@ const Bottom = player => Box({
className: 'bottom',
children: [
mpris.PreviousButton(player, {
valign: 'end',
halign: 'start',
vpack: 'end',
hpack: 'start',
}),
Separator(8),

View file

@ -5,11 +5,11 @@ const display = Gdk.Display.get_default();
export default ({
type = 'EventBox',
isButton = false,
reset = true,
...props
}) => {
if (type === 'EventBox') {
if (!isButton) {
return Widget.EventBox({
...props,
onHover: self => {

View file

@ -36,9 +36,9 @@ export default ({
// Wrapping the revealer inside a box is needed
// to allocate some space for it even when not revealed
child: Box({
style: `min-height:1px;
min-width:1px;
padding: 1px;`,
css: `min-height:1px;
min-width:1px;
padding: 1px;`,
child: Revealer({
transition,
transitionDuration,

View file

@ -2,14 +2,14 @@ import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
export default (size, { vertical = false } = {}) => {
if (vertical) {
if (vertical) {
return Box({
style: `min-height: ${size}px;`,
css: `min-height: ${size}px;`,
});
}
else {
return Box({
style: `min-width: ${size}px;`,
css: `min-width: ${size}px;`,
});
}
};

View file

@ -1,4 +1,5 @@
import { CenterBox, Label } from 'resource:///com/github/Aylur/ags/widget.js';
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
import PopupWindow from './misc/popup.js';
import Button from './misc/cursorbox.js';
@ -9,9 +10,9 @@ const PowermenuWidget = () => CenterBox({
vertical: false,
startWidget: Button({
type: 'Button',
isButton: true,
className: 'shutdown',
onPrimaryClickRelease: 'systemctl poweroff',
onPrimaryClickRelease: () => execAsync(['systemctl', 'poweroff']).catch(print),
child: Label({
label: '襤',
@ -19,9 +20,9 @@ const PowermenuWidget = () => CenterBox({
}),
centerWidget: Button({
type: 'Button',
isButton: true,
className: 'reboot',
onPrimaryClickRelease: 'systemctl reboot',
onPrimaryClickRelease: () => execAsync(['systemctl', 'reboot']).catch(print),
child: Label({
label: '勒',
@ -29,9 +30,9 @@ const PowermenuWidget = () => CenterBox({
}),
endWidget: Button({
type: 'Button',
isButton: true,
className: 'logout',
onPrimaryClickRelease: 'hyprctl dispatch exit',
onPrimaryClickRelease: () => execAsync(['hyprctl', 'dispatch', 'exit']).catch(print),
child: Label({
label: '',

View file

@ -36,8 +36,8 @@ const GridButton = ({
const FirstRow = () => Box({
className: 'button-row',
halign: 'center',
style: 'margin-top: 15px; margin-bottom: 7px;',
hpack: 'center',
css: 'margin-top: 15px; margin-bottom: 7px;',
children: [
GridButton({
@ -108,7 +108,7 @@ const FirstRow = () => Box({
});
const SubRow = () => CenterBox({
halign: 'start',
hpack: 'start',
children: [
Label({
@ -154,8 +154,8 @@ const itemsMic = {
const SecondRow = () => Box({
className: 'button-row',
halign: 'center',
style: 'margin-top: 7px; margin-bottom: 15px;',
hpack: 'center',
css: 'margin-top: 7px; margin-bottom: 15px;',
children: [
GridButton({
@ -236,7 +236,7 @@ const SecondRow = () => Box({
export default () => Box({
className: 'button-grid',
vertical: true,
halign: 'center',
hpack: 'center',
children: [
FirstRow(),
SubRow(),

View file

@ -20,8 +20,8 @@ const QuickSettingsWidget = () => Box({
Label({
label: 'Control Center',
className: 'title',
halign: 'start',
style: 'margin-left: 20px',
hpack: 'start',
css: 'margin-left: 20px',
}),
ButtonGrid(),
@ -44,6 +44,6 @@ const QuickSettingsWidget = () => Box({
export default () => PopupWindow({
name: 'quick-settings',
anchor: ['top', 'right'],
margin: [6, 5, 0],
margins: [6, 5, 0],
child: QuickSettingsWidget(),
});

View file

@ -14,13 +14,13 @@ const items = {
export default () => Box({
className: 'slider-box',
vertical: true,
halign: 'center',
hpack: 'center',
children: [
Box({
className: 'slider',
valign: 'start',
halign: 'center',
vpack: 'start',
hpack: 'center',
children: [
Icon({
size: 26,
@ -55,8 +55,8 @@ export default () => Box({
Box({
className: 'slider',
valign: 'start',
halign: 'center',
vpack: 'start',
hpack: 'center',
children: [
Icon({
className: 'slider-label',

View file

@ -11,7 +11,7 @@ export default () => {
toggleButton.add(Icon({
icon: 'go-down-symbolic',
className: 'arrow',
style: '-gtk-icon-transform: rotate(180deg);',
css: '-gtk-icon-transform: rotate(180deg);',
}));
// Setup
@ -26,12 +26,12 @@ export default () => {
if (toggleButton.get_active()) {
toggleButton.get_children()[0]
.setStyle('-gtk-icon-transform: rotate(0deg);');
.setCss('-gtk-icon-transform: rotate(0deg);');
rev.revealChild = true;
}
else {
toggleButton.get_children()[0]
.setStyle('-gtk-icon-transform: rotate(180deg);');
.setCss('-gtk-icon-transform: rotate(180deg);');
rev.revealChild = false;
}
});

View file

@ -1,18 +1,19 @@
import { Widget } from 'resource:///com/github/Aylur/ags/widget.js';
import { Box, DrawingArea, Window } from 'resource:///com/github/Aylur/ags/widget.js';
import Gtk from 'gi://Gtk';
const Lang = imports.lang;
export const RoundedCorner = (place, props) => Widget.Box({
halign: place.includes('left') ? 'start' : 'end',
valign: place.includes('top') ? 'start' : 'end',
style: `padding: 1px; margin:
${place.includes('top') ? '-1px' : '0'}
${place.includes('right') ? '-1px' : '0'}
${place.includes('bottom') ? '-1px' : '0'}
${place.includes('left') ? '-1px' : '0'};`,
child: Widget({
export const RoundedCorner = (place, props) => Box({
hpack: place.includes('left') ? 'start' : 'end',
vpack: place.includes('top') ? 'start' : 'end',
css: `
padding: 1px; margin:
${place.includes('top') ? '-1px' : '0'}
${place.includes('right') ? '-1px' : '0'}
${place.includes('bottom') ? '-1px' : '0'}
${place.includes('left') ? '-1px' : '0'};
`,
child: DrawingArea({
...props,
type: Gtk.DrawingArea,
setup: widget => {
const r = widget.get_style_context()
.get_property('border-radius', Gtk.StateFlags.NORMAL);
@ -69,7 +70,7 @@ export const RoundedCorner = (place, props) => Widget.Box({
}),
});
export const Topleft = () => Widget.Window({
export const Topleft = () => Window({
name: 'cornertl',
layer: 'overlay',
anchor: ['top', 'left'],
@ -77,7 +78,7 @@ export const Topleft = () => Widget.Window({
visible: true,
child: RoundedCorner('topleft', { className: 'corner' }),
});
export const Topright = () => Widget.Window({
export const Topright = () => Window({
name: 'cornertr',
layer: 'overlay',
anchor: ['top', 'right'],
@ -85,7 +86,7 @@ export const Topright = () => Widget.Window({
visible: true,
child: RoundedCorner('topright', { className: 'corner' }),
});
export const Bottomleft = () => Widget.Window({
export const Bottomleft = () => Window({
name: 'cornerbl',
layer: 'overlay',
anchor: ['bottom', 'left'],
@ -93,7 +94,7 @@ export const Bottomleft = () => Widget.Window({
visible: true,
child: RoundedCorner('bottomleft', { className: 'corner' }),
});
export const Bottomright = () => Widget.Window({
export const Bottomright = () => Window({
name: 'cornerbr',
layer: 'overlay',
anchor: ['bottom', 'right'],

Binary file not shown.