diff --git a/config/ags/.eslintrc.yml b/config/ags/.eslintrc.yml deleted file mode 100644 index 031da553..00000000 --- a/config/ags/.eslintrc.yml +++ /dev/null @@ -1,76 +0,0 @@ -env: - es2021: true -extends: eslint:recommended -overrides: [] -parserOptions: - ecmaVersion: latest - sourceType: 'module' -rules: - arrow-parens: - - error - - as-needed - comma-dangle: - - error - - always-multiline - comma-spacing: - - error - - before: false - after: true - comma-style: - - error - - last - curly: - - error - - multi-or-nest - - consistent - dot-location: - - error - - property - eol-last: error - indent: - - error - - 4 - - SwitchCase: 1 - keyword-spacing: - - error - - before: true - lines-between-class-members: - - error - - always - - exceptAfterSingleLine: true - padded-blocks: - - error - - never - - allowSingleLineBlocks: false - prefer-const: error - quotes: - - error - - single - - avoidEscape: true - semi: - - error - - always - nonblock-statement-body-position: - - error - - below - no-trailing-spaces: - - error - array-bracket-spacing: - - error - - never - key-spacing: - - error - - beforeColon: false - afterColon: true - object-curly-spacing: - - error - - always - no-useless-escape: - - off -globals: - ags: readonly - ARGV: readonly - imports: readonly - print: readonly - console: readonly - logError: readonly diff --git a/config/ags/.gitignore b/config/ags/.gitignore deleted file mode 100644 index 13bcca0c..00000000 --- a/config/ags/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -types -package-lock.json -weather_key diff --git a/config/ags/.stylelintrc.yml b/config/ags/.stylelintrc.yml deleted file mode 100644 index f7bab35c..00000000 --- a/config/ags/.stylelintrc.yml +++ /dev/null @@ -1,16 +0,0 @@ -extends: stylelint-config-standard-scss -ignoreFiles: - - "**/*.js" - - "**/*.ts" -rules: - selector-type-no-unknown: null - declaration-empty-line-before: null - no-descending-specificity: null - selector-pseudo-class-no-unknown: null - color-function-notation: legacy - alpha-value-notation: number - scss/operator-no-unspaced: null - scss/no-global-function-names: null - scss/dollar-variable-empty-line-before: null - scss/dollar-variable-pattern: ^[a-z]+(_[a-z]+)*$ - scss/at-mixin-pattern: ^[a-z]+(_[a-z]+)*$ diff --git a/config/ags/config.js b/config/ags/config.js deleted file mode 100644 index bbae1cb3..00000000 --- a/config/ags/config.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -import TopBar from './js/bar/TopBar.js'; -import ScreenCorners from './js/screencorner/ScreenCorners.js'; -import Overview from './js/overview/Overview.js'; -import Dashboard from './js/dashboard/Dashboard.js'; -import OSD from './js/osd/OSD.js'; -import FloatingDock from './js/dock/FloatingDock.js'; -import Applauncher from './js/applauncher/Applauncher.js'; -import PowerMenu from './js/powermenu/PowerMenu.js'; -import Verification from './js/powermenu/Verification.js'; -import Desktop from './js/desktop/Desktop.js'; -import Notifications from './js/notifications/Notifications.js'; -import QuickSettings from './js/quicksettings/QuickSettings.js'; -import Lockscreen from './js/lockscreen/Lockscreen.js'; -import options from './js/options.js'; -import * as setup from './js/utils.js'; -import { forMonitors } from './js/utils.js'; - -setup.warnOnLowBattery(); -setup.scssWatcher(); -setup.globalServices(); -setup.activePlayer(); - -export default { - maxStreamVolume: 1.05, - cacheNotificationActions: true, - closeWindowDelay: { - 'quicksettings': options.windowAnimationDuration, - 'dashboard': options.windowAnimationDuration, - }, - windows: [ - forMonitors(TopBar), - forMonitors(ScreenCorners), - forMonitors(OSD), - forMonitors(FloatingDock), - forMonitors(Desktop), - forMonitors(Notifications), - forMonitors(Lockscreen), - Applauncher(), - Overview(), - Dashboard(), - QuickSettings(), - PowerMenu(), - Verification(), - ].flat(2), -}; diff --git a/config/ags/js/applauncher/Applauncher.js b/config/ags/js/applauncher/Applauncher.js deleted file mode 100644 index 5eb878fe..00000000 --- a/config/ags/js/applauncher/Applauncher.js +++ /dev/null @@ -1,110 +0,0 @@ -import { Widget, App, Applications } from '../imports.js'; -import Separator from '../misc/Separator.js'; -import PopupWindow from '../misc/PopupWindow.js'; -import icons from '../icons.js'; -import { launchApp } from '../utils.js'; - -const WINDOW_NAME = 'applauncher'; - -const AppItem = app => Widget.Button({ - className: 'app', - onClicked: () => { - App.closeWindow(WINDOW_NAME); - launchApp(app); - }, - child: Widget.Box({ - children: [ - Widget.Icon({ - icon: app.iconName, - size: 48, - }), - Widget.Box({ - vertical: true, - children: [ - Widget.Label({ - className: 'title', - label: app.name, - xalign: 0, - valign: 'center', - ellipsize: 3, - }), - Widget.Label({ - className: 'description', - label: app.description || '', - wrap: true, - xalign: 0, - justification: 'left', - valign: 'center', - }), - ], - }), - ], - }), -}); - -const Applauncher = () => { - const list = Widget.Box({ vertical: true }); - - const placeholder = Widget.Label({ - label: " Couldn't find a match", - className: 'placeholder', - }); - - const entry = Widget.Entry({ - hexpand: true, - text: '-', - placeholderText: 'Search', - onAccept: ({ text }) => { - const list = Applications.query(text); - if (list[0]) { - App.toggleWindow(WINDOW_NAME); - launchApp(list[0]); - } - }, - onChange: ({ text }) => { - list.children = Applications.query(text).map(app => [ - Separator(), - AppItem(app), - ]).flat(); - list.add(Separator()); - list.show_all(); - - placeholder.visible = list.children.length === 1; - }, - }); - - return Widget.Box({ - className: 'applauncher', - properties: [['list', list]], - vertical: true, - children: [ - Widget.Box({ - className: 'header', - children: [ - Widget.Icon(icons.apps.search), - entry, - ], - }), - Widget.Scrollable({ - hscroll: 'never', - child: Widget.Box({ - vertical: true, - children: [list, placeholder], - }), - }), - ], - connections: [[App, (_, name, visible) => { - if (name !== WINDOW_NAME) - return; - - entry.set_text(''); - if (visible) - entry.grab_focus(); - }]], - }); -}; - -export default () => PopupWindow({ - name: WINDOW_NAME, - content: Applauncher(), -}); diff --git a/config/ags/js/bar/PanelButton.js b/config/ags/js/bar/PanelButton.js deleted file mode 100644 index a093cb0d..00000000 --- a/config/ags/js/bar/PanelButton.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Widget, App } from '../imports.js'; - -export default ({ - className, - content, - window = '', - connections = [], - ...rest -}) => Widget.Button({ - className: `panel-button ${className}`, - setup: self => self.open = false, - child: Widget.Box({ children: [content] }), - connections: connections.concat([ - [App, (self, win, visible) => { - if (win !== window) - return; - - if (self.open && !visible) { - self.open = false; - self.toggleClassName('active', false); - } - - if (visible) { - self.open = true; - self.toggleClassName('active'); - } - }], - ]), - ...rest, -}); diff --git a/config/ags/js/bar/TopBar.js b/config/ags/js/bar/TopBar.js deleted file mode 100644 index 8391b443..00000000 --- a/config/ags/js/bar/TopBar.js +++ /dev/null @@ -1,89 +0,0 @@ -import OverviewButton from './buttons/OverviewButton.js'; -import Workspaces from './buttons/Workspaces.js'; -import FocusedClient from './buttons/FocusedClient.js'; -import MediaIndicator from './buttons/MediaIndicator.js'; -import DateButton from './buttons/DateButton.js'; -import NotificationIndicator from './buttons/NotificationIndicator.js'; -import SysTray from './buttons/SysTray.js'; -import ColorPicker from './buttons/ColorPicker.js'; -import SystemIndicators from './buttons/SystemIndicators.js'; -import PowerMenu from './buttons/PowerMenu.js'; -import Separator from '../misc/Separator.js'; -import ScreenRecord from './buttons/ScreenRecord.js'; -import BatteryBar from './buttons/BatteryBar.js'; -import SubMenu from './buttons/SubMenu.js'; -import { SystemTray, Widget, Variable } from '../imports.js'; -import { Notifications, Mpris, Battery } from '../imports.js'; -import Recorder from '../services/screenrecord.js'; - -const submenuItems = Variable(1); -SystemTray.connect('changed', () => { - submenuItems.setValue(SystemTray.items.length + 1); -}); - -const SeparatorDot = (service, condition) => Separator({ - orientation: 'vertical', - valign: 'center', - connections: service && [[service, dot => { - dot.visible = condition(service); - }]], -}); - -const Start = () => Widget.Box({ - className: 'start', - children: [ - OverviewButton(), - SeparatorDot(), - Workspaces(), - SeparatorDot(), - FocusedClient(), - Widget.Box({ hexpand: true }), - NotificationIndicator(), - SeparatorDot(Notifications, n => n.notifications.length > 0 || n.dnd), - ], -}); - -const Center = () => Widget.Box({ - className: 'center', - children: [ - DateButton(), - ], -}); - -const End = () => Widget.Box({ - className: 'end', - children: [ - SeparatorDot(Mpris, m => m.players.length > 0), - MediaIndicator(), - Widget.Box({ hexpand: true }), - - SubMenu({ - items: submenuItems, - children: [ - SysTray(), - ColorPicker(), - ], - }), - SeparatorDot(), - ScreenRecord(), - SeparatorDot(Recorder, r => r.recording), - SystemIndicators(), - SeparatorDot(Battery, b => b.available), - BatteryBar(), - SeparatorDot(), - PowerMenu(), - ], -}); - -export default monitor => Widget.Window({ - name: `bar${monitor}`, - exclusive: true, - monitor, - anchor: ['top', 'left', 'right'], - child: Widget.CenterBox({ - className: 'panel', - startWidget: Start(), - centerWidget: Center(), - endWidget: End(), - }), -}); diff --git a/config/ags/js/bar/buttons/BatteryBar.js b/config/ags/js/bar/buttons/BatteryBar.js deleted file mode 100644 index fb4f5101..00000000 --- a/config/ags/js/bar/buttons/BatteryBar.js +++ /dev/null @@ -1,52 +0,0 @@ -import icons from '../../icons.js'; -import FontIcon from '../../misc/FontIcon.js'; -import options from '../../options.js'; -import PanelButton from '../PanelButton.js'; -import Gtk from 'gi://Gtk'; -import { Battery, Widget } from '../../imports.js'; - -const Indicator = () => Widget.Stack({ - items: [ - ['false', Widget.Icon({ binds: [['icon', Battery, 'icon-name']] })], - ['true', FontIcon({ icon: icons.battery.charging })], - ], - connections: [[Battery, stack => { - stack.shown = `${Battery.charging || Battery.charged}`; - }]], -}); - -const PercentLabel = () => Widget.Revealer({ - transition: 'slide_right', - revealChild: options.battaryBar.showPercentage, - child: Widget.Label({ - binds: [['label', Battery, 'percent', p => `${p}%`]], - }), -}); - -const LevelBar = () => Widget({ - type: Gtk.LevelBar, - valign: 'center', - binds: [['value', Battery, 'percent', p => p / 100]], -}); - -export default () => { - const revaler = PercentLabel(); - - return PanelButton({ - className: 'battery-bar', - onClicked: () => revaler.revealChild = !revaler.revealChild, - content: Widget.Box({ - binds: [['visible', Battery, 'available']], - connections: [[Battery, w => { - w.toggleClassName('charging', Battery.charging || Battery.charged); - w.toggleClassName('medium', Battery.percent < options.battaryBar.medium); - w.toggleClassName('low', Battery.percent < options.battaryBar.low); - }]], - children: [ - Indicator(), - revaler, - LevelBar(), - ], - }), - }); -}; diff --git a/config/ags/js/bar/buttons/ColorPicker.js b/config/ags/js/bar/buttons/ColorPicker.js deleted file mode 100644 index 1fa68405..00000000 --- a/config/ags/js/bar/buttons/ColorPicker.js +++ /dev/null @@ -1,52 +0,0 @@ -import PanelButton from '../PanelButton.js'; -import { Notifications, Utils, Widget, Variable } from '../../imports.js'; -import Gdk from 'gi://Gdk'; - -const COLORS_CACHE = Utils.CACHE_DIR + '/colorpicker.json'; -const wlCopy = color => Utils.execAsync(['wl-copy', color]) - .catch(err => console.error(err)); - -const colors = Variable([]); -Utils.readFileAsync(COLORS_CACHE) - .then(out => colors.setValue(JSON.parse(out || '[]'))) - .catch(() => print('no colorpicker cache found')); - -export default () => PanelButton({ - className: 'panel-button colorpicker', - content: Widget.Icon('color-select-symbolic'), - binds: [['tooltip-text', colors, 'value', v => `${v.length} colors`]], - onClicked: btn => Utils.execAsync('hyprpicker').then(color => { - if (!color) - return; - - wlCopy(color); - const list = colors.value; - if (!list.includes(color)) { - list.push(color); - if (list > 10) - list.shift(); - - colors.value = list; - Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE) - .catch(err => console.error(err)); - } - - btn._id = Notifications.Notify( - 'Color Picker', - btn._id || null, - 'color-select-symbolic', - color, - '', - [], - {}, - ); - }).catch(err => console.error(err)), - onSecondaryClick: btn => colors.value.length > 0 ? Widget.Menu({ - className: 'colorpicker', - children: colors.value.map(color => Widget.MenuItem({ - child: Widget.Label(color), - style: `background-color: ${color}`, - onActivate: () => wlCopy(color), - })), - }).popup_at_widget(btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null) : false, -}); diff --git a/config/ags/js/bar/buttons/DateButton.js b/config/ags/js/bar/buttons/DateButton.js deleted file mode 100644 index d9e78cf2..00000000 --- a/config/ags/js/bar/buttons/DateButton.js +++ /dev/null @@ -1,10 +0,0 @@ -import Clock from '../../misc/Clock.js'; -import PanelButton from '../PanelButton.js'; -import { App } from '../../imports.js'; - -export default ({ format = '%H:%M - %A %e.' } = {}) => PanelButton({ - className: 'dashboard panel-button', - onClicked: () => App.toggleWindow('dashboard'), - window: 'dashboard', - content: Clock({ format }), -}); diff --git a/config/ags/js/bar/buttons/FocusedClient.js b/config/ags/js/bar/buttons/FocusedClient.js deleted file mode 100644 index bce4ca48..00000000 --- a/config/ags/js/bar/buttons/FocusedClient.js +++ /dev/null @@ -1,40 +0,0 @@ -import PanelButton from '../PanelButton.js'; -import { Hyprland, Utils, Widget } from '../../imports.js'; -import options from '../../options.js'; -import { substitute } from '../../utils.js'; -const { icons, titles } = options.substitutions; - -export const ClientLabel = () => Widget.Label({ - binds: [['label', Hyprland.active.client, 'class', c => substitute(titles, c)]], -}); - -export const ClientIcon = () => Widget.Icon({ - connections: [[Hyprland.active.client, self => { - const { client } = Hyprland.active; - - const classIcon = substitute(icons, client.class) + '-symbolic'; - const titleIcon = substitute(icons, client.class) + '-symbolic'; - - const hasTitleIcon = Utils.lookUpIcon(titleIcon); - const hasClassIcon = Utils.lookUpIcon(classIcon); - - if (hasClassIcon) - self.icon = classIcon; - - if (hasTitleIcon) - self.icon = titleIcon; - - self.visible = hasTitleIcon || hasClassIcon; - }]], -}); - -export default () => PanelButton({ - className: 'focused-client', - content: Widget.Box({ - children: [ - ClientIcon(), - ClientLabel(), - ], - binds: [['tooltip-text', Hyprland.active, 'client', c => c.title]], - }), -}); diff --git a/config/ags/js/bar/buttons/MediaIndicator.js b/config/ags/js/bar/buttons/MediaIndicator.js deleted file mode 100644 index 1d912837..00000000 --- a/config/ags/js/bar/buttons/MediaIndicator.js +++ /dev/null @@ -1,53 +0,0 @@ -import HoverRevealer from '../../misc/HoverRevealer.js'; -import * as mpris from '../../misc/mpris.js'; -import options from '../../options.js'; -import { Widget, Mpris, Utils } from '../../imports.js'; - -export const getPlayer = (name = options.preferredMpris) => - Mpris.getPlayer(name) || Mpris.players[0] || null; - -const Indicator = ({ player, direction = 'right' } = {}) => HoverRevealer({ - className: `media panel-button ${player.name}`, - direction, - onPrimaryClick: () => player.playPause(), - onScrollUp: () => player.next(), - onScrollDown: () => player.previous(), - onSecondaryClick: () => player.playPause(), - indicator: mpris.PlayerIcon(player), - child: Widget.Label({ - vexpand: true, - truncate: 'end', - maxWidthChars: 40, - connections: [[player, label => { - label.label = `${player.trackArtists.join(', ')} - ${player.trackTitle}`; - }]], - }), - connections: [[player, revealer => { - if (revealer._current === player.trackTitle) - return; - - revealer._current = player.trackTitle; - revealer.revealChild = true; - Utils.timeout(3000, () => { - revealer.revealChild = false; - }); - }]], -}); - -export default ({ direction } = {}) => Widget.Box({ - connections: [[Mpris, box => { - const player = getPlayer(); - box.visible = !!player; - - if (!player) { - box._player = null; - return; - } - - if (box._player === player) - return; - - box._player = player; - box.children = [Indicator({ player, direction })]; - }, 'notify::players']], -}); diff --git a/config/ags/js/bar/buttons/NotificationIndicator.js b/config/ags/js/bar/buttons/NotificationIndicator.js deleted file mode 100644 index 3bb8b346..00000000 --- a/config/ags/js/bar/buttons/NotificationIndicator.js +++ /dev/null @@ -1,35 +0,0 @@ -import icons from '../../icons.js'; -import HoverRevealer from '../../misc/HoverRevealer.js'; -import { Widget, Notifications, Utils, App } from '../../imports.js'; - -export default ({ direction = 'left' } = {}) => HoverRevealer({ - className: 'notifications panel-button', - eventboxConnections: [ - ['button-press-event', () => App.openWindow('dashboard')], - [Notifications, box => box.visible = - Notifications.notifications.length > 0 || Notifications.dnd], - ], - connections: [[Notifications, revealer => { - const title = Notifications.notifications[0]?.summary; - if (revealer._title === title) - return; - - revealer._title = title; - revealer.revealChild = true; - Utils.timeout(3000, () => { - revealer.revealChild = false; - }); - }]], - direction, - indicator: Widget.Icon({ - binds: [['icon', Notifications, 'dnd', dnd => dnd - ? icons.notifications.silent - : icons.notifications.noisy, - ]], - }), - child: Widget.Label({ - truncate: 'end', - maxWidthChars: 40, - binds: [['label', Notifications, 'notifications', n => n.reverse()[0]?.summary || '']], - }), -}); diff --git a/config/ags/js/bar/buttons/OverviewButton.js b/config/ags/js/bar/buttons/OverviewButton.js deleted file mode 100644 index 03f46461..00000000 --- a/config/ags/js/bar/buttons/OverviewButton.js +++ /dev/null @@ -1,11 +0,0 @@ -import PanelButton from '../PanelButton.js'; -import FontIcon from '../../misc/FontIcon.js'; -import { distroIcon } from '../../variables.js'; -import { App } from '../../imports.js'; - -export default () => PanelButton({ - className: 'overview', - window: 'overview', - onClicked: () => App.toggleWindow('overview'), - content: FontIcon(distroIcon), -}); diff --git a/config/ags/js/bar/buttons/PowerMenu.js b/config/ags/js/bar/buttons/PowerMenu.js deleted file mode 100644 index cbc05ed6..00000000 --- a/config/ags/js/bar/buttons/PowerMenu.js +++ /dev/null @@ -1,9 +0,0 @@ -import icons from '../../icons.js'; -import PanelButton from '../PanelButton.js'; -import { Widget, App } from '../../imports.js'; - -export default () => PanelButton({ - className: 'powermenu', - content: Widget.Icon(icons.powermenu.shutdown), - onClicked: () => App.openWindow('powermenu'), -}); diff --git a/config/ags/js/bar/buttons/ScreenRecord.js b/config/ags/js/bar/buttons/ScreenRecord.js deleted file mode 100644 index f30786b8..00000000 --- a/config/ags/js/bar/buttons/ScreenRecord.js +++ /dev/null @@ -1,22 +0,0 @@ -import PanelButton from '../PanelButton.js'; -import Recorder from '../../services/screenrecord.js'; -import icons from '../../icons.js'; -import { Widget } from '../../imports.js'; - -export default () => PanelButton({ - className: 'recorder', - onClicked: () => Recorder.stop(), - binds: [['visible', Recorder, 'recording']], - child: Widget.Box({ - children: [ - Widget.Icon(icons.recorder.recording), - Widget.Label({ - binds: [['label', Recorder, 'timer', time => { - const sec = time % 60; - const min = Math.floor(time / 60); - return `${min}:${sec < 10 ? '0' + sec : sec}`; - }]], - }), - ], - }), -}); diff --git a/config/ags/js/bar/buttons/SubMenu.js b/config/ags/js/bar/buttons/SubMenu.js deleted file mode 100644 index 73c37d59..00000000 --- a/config/ags/js/bar/buttons/SubMenu.js +++ /dev/null @@ -1,51 +0,0 @@ -import icons from '../../icons.js'; -import PanelButton from '../PanelButton.js'; -import { Widget, Utils, Variable } from '../../imports.js'; - -const Arrow = (revealer, direction, items) => PanelButton({ - className: 'sub-menu', - connections: [[items, btn => { - btn.tooltipText = `${items.value} Items`; - }]], - onClicked: button => { - const icon = button.child; - revealer.revealChild = !revealer.revealChild; - icon._animate(icon); - }, - child: Widget.Icon({ - icon: icons.ui.arrow[direction], - setup: i => i._animate(i), - properties: [ - ['deg', 180], - ['animate', icon => { - const step = revealer.revealChild ? 10 : -10; - for (let i = 0; i < 18; ++i) { - Utils.timeout(2 * i, () => { - icon._deg += step; - icon.setStyle(`-gtk-icon-transform: rotate(${icon._deg}deg);`); - }); - } - }], - ], - }), -}); - -export default ({ children, direction = 'left', items = Variable(0) }) => { - const posStart = direction === 'up' || direction === 'left'; - const posEnd = direction === 'down' || direction === 'right'; - const revealer = Widget.Revealer({ - transition: `slide_${direction}`, - child: Widget.Box({ - children, - }), - }); - - return Widget.Box({ - vertical: direction === 'up' || direction === 'down', - children: [ - posStart && revealer, - Arrow(revealer, direction, items), - posEnd && revealer, - ], - }); -}; diff --git a/config/ags/js/bar/buttons/SysTray.js b/config/ags/js/bar/buttons/SysTray.js deleted file mode 100644 index df4725f2..00000000 --- a/config/ags/js/bar/buttons/SysTray.js +++ /dev/null @@ -1,25 +0,0 @@ -import PanelButton from '../PanelButton.js'; -import { SystemTray, Widget } from '../../imports.js'; -import Gdk from 'gi://Gdk'; - -const SysTrayItem = item => PanelButton({ - content: Widget.Icon({ binds: [['icon', item, 'icon']] }), - binds: [['tooltipMarkup', item, 'tooltip-markup']], - setup: btn => { - const id = item.menu.connect('popped-up', menu => { - btn.toggleClassName('active'); - menu.connect('notify::visible', menu => { - btn.toggleClassName('active', menu.visible); - }); - menu.disconnect(id); - }); - }, - onPrimaryClick: btn => - item.menu.popup_at_widget(btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null), - onSecondaryClick: btn => - item.menu.popup_at_widget(btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null), -}); - -export default () => Widget.Box({ - binds: [['children', SystemTray, 'items', i => i.map(SysTrayItem)]], -}); diff --git a/config/ags/js/bar/buttons/SystemIndicators.js b/config/ags/js/bar/buttons/SystemIndicators.js deleted file mode 100644 index e79ffd72..00000000 --- a/config/ags/js/bar/buttons/SystemIndicators.js +++ /dev/null @@ -1,110 +0,0 @@ -import HoverRevealer from '../../misc/HoverRevealer.js'; -import PanelButton from '../PanelButton.js'; -import Asusctl from '../../services/asusctl.js'; -import Indicator from '../../services/onScreenIndicator.js'; -import icons from '../../icons.js'; -import { App, Widget } from '../../imports.js'; -import { Bluetooth, Audio, Notifications, Network } from '../../imports.js'; - -const ProfileIndicator = () => Widget.Icon({ - connections: [[Asusctl, icon => { - icon.visible = Asusctl.profile !== 'Balanced'; - icon.icon = icons.asusctl.profile[Asusctl.profile]; - }]], -}); - -const ModeIndicator = () => Widget.Icon({ - connections: [[Asusctl, icon => { - icon.visible = Asusctl.mode !== 'Hybrid'; - icon.icon = icons.asusctl.mode[Asusctl.mode]; - }]], -}); - -const MicrophoneIndicator = () => Widget.Icon({ - connections: [[Audio, icon => { - if (!Audio.microphone) - return; - - const { muted, low, medium, high } = icons.audio.mic; - if (Audio.microphone.isMuted) - return icon.icon = muted; - - icon.icon = [[67, high], [34, medium], [1, low], [0, muted]] - .find(([threshold]) => threshold <= Audio.microphone.volume * 100)[1]; - - icon.visible = Audio.recorders.length > 0 || Audio.microphone.isMuted; - }]], -}); - -const DNDIndicator = () => Widget.Icon({ - icon: icons.notifications.silent, - binds: [['visible', Notifications, 'dnd']], -}); - -const BluetoothDevicesIndicator = () => Widget.Box({ - connections: [[Bluetooth, box => { - box.children = Bluetooth.connectedDevices - .map(({ iconName, name }) => HoverRevealer({ - indicator: Widget.Icon(iconName + '-symbolic'), - child: Widget.Label(name), - })); - - box.visible = Bluetooth.connectedDevices.length > 0; - }, 'notify::connected-devices']], -}); - -const BluetoothIndicator = () => Widget.Icon({ - className: 'bluetooth', - icon: icons.bluetooth.enabled, - binds: [['visible', Bluetooth, 'enabled']], -}); - -const NetworkIndicator = () => Widget.Icon({ - connections: [[Network, self => { - const icon = Network[Network.primary]?.iconName; - self.icon = icon || ''; - self.visible = icon; - }]], -}); - -const AudioIndicator = () => Widget.Icon({ - connections: [[Audio, icon => { - if (!Audio.speaker) - return; - - const { muted, low, medium, high, overamplified } = icons.audio.volume; - if (Audio.speaker.isMuted) - return icon.icon = muted; - - icon.icon = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]] - .find(([threshold]) => threshold <= Audio.speaker.volume * 100)[1]; - }, 'speaker-changed']], -}); - -export default () => PanelButton({ - className: 'quicksettings panel-button', - onClicked: () => App.toggleWindow('quicksettings'), - onScrollUp: () => { - Audio.speaker.volume += 0.02; - Indicator.speaker(); - }, - onScrollDown: () => { - Audio.speaker.volume -= 0.02; - Indicator.speaker(); - }, - connections: [[App, (btn, win, visible) => { - btn.toggleClassName('active', win === 'quicksettings' && visible); - }]], - child: Widget.Box({ - children: [ - Asusctl?.available && ProfileIndicator(), - Asusctl?.available && ModeIndicator(), - DNDIndicator(), - BluetoothDevicesIndicator(), - BluetoothIndicator(), - NetworkIndicator(), - AudioIndicator(), - MicrophoneIndicator(), - ], - }), -}); diff --git a/config/ags/js/bar/buttons/Workspaces.js b/config/ags/js/bar/buttons/Workspaces.js deleted file mode 100644 index c6dfb2e2..00000000 --- a/config/ags/js/bar/buttons/Workspaces.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Hyprland, Widget, Utils } from '../../imports.js'; -import options from '../../options.js'; -import { range } from '../../utils.js'; - -const ws = options.workspaces; -const dispatch = arg => () => Utils.execAsync(`hyprctl dispatch workspace ${arg}`); - -const Workspaces = () => Widget.Box({ - children: range(ws || 20).map(i => Widget.Button({ - setup: btn => btn.id = i, - onClicked: dispatch(i), - child: Widget.Label({ - label: `${i}`, - className: 'indicator', - valign: 'center', - }), - connections: [[Hyprland, btn => { - btn.toggleClassName('active', Hyprland.active.workspace.id === i); - btn.toggleClassName('occupied', Hyprland.getWorkspace(i)?.windows > 0); - }]], - })), - connections: ws ? [] : [[Hyprland.active.workspace, box => box.children.map(btn => { - btn.visible = Hyprland.workspaces.some(ws => ws.id === btn.id); - })]], -}); - -export default () => Widget.Box({ - className: 'workspaces panel-button', - child: Widget.Box({ - // its nested like this to keep it consistent with other PanelButton widgets - child: Widget.EventBox({ - onScrollUp: dispatch('m+1'), - onScrollDown: dispatch('m-1'), - className: 'eventbox', - child: Workspaces(), - }), - }), -}); diff --git a/config/ags/js/dashboard/Dashboard.js b/config/ags/js/dashboard/Dashboard.js deleted file mode 100644 index 9144eb53..00000000 --- a/config/ags/js/dashboard/Dashboard.js +++ /dev/null @@ -1,19 +0,0 @@ -import DateColumn from './DateColumn.js'; -import NotificationColumn from './NotificationColumn.js'; -import PopupWindow from '../misc/PopupWindow.js'; -import Separator from '../misc/Separator.js'; -import { Widget } from '../imports.js'; - -export default ({ anchor = ['top'], layout = 'top' } = {}) => PopupWindow({ - name: 'dashboard', - layout, - anchor, - content: Widget.Box({ - className: 'dashboard', - children: [ - NotificationColumn(), - Separator({ orientation: 'vertical' }), - DateColumn(), - ], - }), -}); diff --git a/config/ags/js/dashboard/DateColumn.js b/config/ags/js/dashboard/DateColumn.js deleted file mode 100644 index d028cb3a..00000000 --- a/config/ags/js/dashboard/DateColumn.js +++ /dev/null @@ -1,51 +0,0 @@ -import icons from '../icons.js'; -import Clock from '../misc/Clock.js'; -import * as vars from '../variables.js'; -import { Widget } from '../imports.js'; -import Theme from '../services/theme/theme.js'; - -const SysProgress = (type, title, unit) => Widget.Box({ - className: `circular-progress-box ${type}`, - hexpand: true, - binds: [['tooltipText', vars[type], 'value', v => - `${title}: ${Math.floor(v * 100)}${unit}`]], - child: Widget.CircularProgress({ - hexpand: true, - className: `circular-progress ${type}`, - child: Widget.Icon(icons.system[type]), - startAt: 0.75, - binds: [['value', vars[type]]], - connections: [[Theme, prog => { - prog.rounded = Theme.getSetting('radii') > 0; - }]], - }), -}); - -export default () => Widget.Box({ - vertical: true, - className: 'datemenu', - children: [ - Clock({ format: '%H:%M' }), - Widget.Label({ - binds: [['label', vars.uptime, 'value', t => `uptime: ${t}`]], - }), - Widget.Box({ - className: 'calendar', - children: [ - Widget({ - type: imports.gi.Gtk.Calendar, - hexpand: true, - halign: 'center', - }), - ], - }), - Widget.Box({ - className: 'system-info', - children: [ - SysProgress('cpu', 'Cpu', '%'), - SysProgress('ram', 'Ram', '%'), - SysProgress('temp', 'Temperature', '°'), - ], - }), - ], -}); diff --git a/config/ags/js/dashboard/NotificationColumn.js b/config/ags/js/dashboard/NotificationColumn.js deleted file mode 100644 index 4c02e60c..00000000 --- a/config/ags/js/dashboard/NotificationColumn.js +++ /dev/null @@ -1,72 +0,0 @@ -import icons from '../icons.js'; -import Notification from '../misc/Notification.js'; -import { Widget, Notifications } from '../imports.js'; - -const ClearButton = () => Widget.Button({ - onClicked: () => Notifications.clear(), - binds: [['sensitive', Notifications, 'notifications', n => n.length > 0]], - child: Widget.Box({ - children: [ - Widget.Label('Clear '), - Widget.Icon({ - binds: [['icon', Notifications, 'notifications', n => - n.length > 0 ? icons.trash.full : icons.trash.empty]], - }), - ], - }), -}); - -const Header = () => Widget.Box({ - className: 'header', - children: [ - Widget.Label({ label: 'Notifications', hexpand: true, xalign: 0 }), - ClearButton(), - ], -}); - -const NotificationList = () => Widget.Box({ - vertical: true, - vexpand: true, - connections: [[Notifications, box => { - box.children = Notifications.notifications - .reverse().map(Notification); - - box.visible = Notifications.notifications.length > 0; - }]], -}); - -const Placeholder = () => Widget.Box({ - className: 'placeholder', - vertical: true, - valign: 'center', - halign: 'center', - vexpand: true, - hexpand: true, - children: [ - Widget.Icon(icons.notifications.silent), - Widget.Label('Your inbox is empty'), - ], - binds: [['visible', Notifications, 'notifications', n => n.length === 0]], -}); - -export default () => Widget.Box({ - className: 'notifications', - vertical: true, - children: [ - Header(), - Widget.Scrollable({ - vexpand: true, - className: 'notification-scrollable', - hscroll: 'never', - vscroll: 'automatic', - child: Widget.Box({ - className: 'notification-list', - vertical: true, - children: [ - NotificationList(), - Placeholder(), - ], - }), - }), - ], -}); diff --git a/config/ags/js/desktop/Desktop.js b/config/ags/js/desktop/Desktop.js deleted file mode 100644 index 6de0ee94..00000000 --- a/config/ags/js/desktop/Desktop.js +++ /dev/null @@ -1,64 +0,0 @@ -import Separator from '../misc/Separator.js'; -import Theme from '../services/theme/theme.js'; -import Clock from '../misc/Clock.js'; -import DesktopMenu from './DesktopMenu.js'; -import { Widget } from '../imports.js'; - -const DesktopClock = () => Widget.Box({ - className: 'clock-box-shadow', - child: Widget.CenterBox({ - className: 'clock-box', - children: [ - Clock({ - className: 'clock', - halign: 'center', - format: '%H', - }), - Widget.Box({ - className: 'separator-box', - vertical: true, - hexpand: true, - halign: 'center', - children: [ - Separator({ valign: 'center', vexpand: true }), - Separator({ valign: 'center', vexpand: true }), - ], - }), - Clock({ - className: 'clock', - halign: 'center', - format: '%M', - }), - ], - }), -}); - -const Desktop = () => Widget.EventBox({ - onSecondaryClick: (_, event) => DesktopMenu().popup_at_pointer(event), - child: Widget.Box({ - vertical: true, - vexpand: true, - hexpand: true, - connections: [[Theme, box => { - const [halign = 'center', valign = 'center', offset = 64] = - Theme.getSetting('desktop_clock')?.split(' ') || []; - - box.halign = halign; - box.valign = valign; - box.setStyle(`margin: ${Number(offset)}px;`); - }]], - children: [ - DesktopClock(), - Clock({ format: '%B %e. %A', className: 'date' }), - ], - }), -}); - -export default monitor => Widget.Window({ - monitor, - name: `desktop${monitor}`, - layer: 'background', - className: 'desktop', - anchor: ['top', 'bottom', 'left', 'right'], - child: Desktop(), -}); diff --git a/config/ags/js/desktop/DesktopMenu.js b/config/ags/js/desktop/DesktopMenu.js deleted file mode 100644 index af9c839e..00000000 --- a/config/ags/js/desktop/DesktopMenu.js +++ /dev/null @@ -1,48 +0,0 @@ -import Theme from '../services/theme/theme.js'; -import PowerMenu from '../services/powermenu.js'; -import icons from '../icons.js'; -import { App, Widget } from '../imports.js'; -import Gtk from 'gi://Gtk'; - -const Item = (label, icon, onActivate) => Widget.MenuItem({ - onActivate, - child: Widget.Box({ - children: [ - Widget.Icon(icon), - Widget.Label({ - label, - hexpand: true, - xalign: 0, - }), - ], - }), -}); - -export default () => Widget.Menu({ - className: 'desktop-menu', - children: [ - Widget.MenuItem({ - child: Widget.Box({ - children: [ - Widget.Icon(icons.powermenu.shutdown), - Widget.Label({ - label: 'System', - hexpand: true, - xalign: 0, - }), - ], - }), - submenu: Widget.Menu({ - children: [ - Item('Shutdown', icons.powermenu.shutdown, () => PowerMenu.action('shutdown')), - Item('Log Out', icons.powermenu.logout, () => PowerMenu.action('logout')), - Item('Reboot', icons.powermenu.reboot, () => PowerMenu.action('reboot')), - Item('Sleep', icons.powermenu.sleep, () => PowerMenu.action('reboot')), - ], - }), - }), - Item('Applications', icons.apps.apps, () => App.openWindow('applauncher')), - Widget({ type: Gtk.SeparatorMenuItem }), - Item('Settings', icons.settings, () => Theme.openSettings()), - ], -}); diff --git a/config/ags/js/dock/Dock.js b/config/ags/js/dock/Dock.js deleted file mode 100644 index 280bec7e..00000000 --- a/config/ags/js/dock/Dock.js +++ /dev/null @@ -1,92 +0,0 @@ -import icons from '../icons.js'; -import Separator from '../misc/Separator.js'; -import options from '../options.js'; -import { App, Hyprland, Applications, Utils, Widget } from '../imports.js'; -import { launchApp } from '../utils.js'; - -const focus = ({ address }) => Utils.execAsync(`hyprctl dispatch focuswindow address:${address}`); - -const AppButton = ({ icon, ...rest }) => Widget.Button({ - ...rest, - child: Widget.Box({ - className: 'box', - child: Widget.Overlay({ - child: Widget.Icon({ icon, size: options.dock.iconSize }), - overlays: [Widget.Box({ - className: 'indicator', - valign: 'end', - halign: 'center', - })], - }), - }), -}); - -const Taskbar = () => Widget.Box({ - binds: [['children', Hyprland, 'clients', c => c.map(client => { - for (const appName of options.dock.pinnedApps) { - if (client.class.toLowerCase().includes(appName.toLowerCase())) - return null; - } - for (const app of Applications.list) { - if (client.title && app.match(client.title) || - client.class && app.match(client.class)) { - return AppButton({ - icon: app.iconName, - tooltipText: app.name, - onPrimaryClick: () => focus(client), - onMiddleClick: () => launchApp(app), - }); - } - } - })]], -}); - -const PinnedApps = () => Widget.Box({ - className: 'pins', - homogeneous: true, - children: options.dock.pinnedApps - .map(term => ({ app: Applications.query(term)?.[0], term })) - .filter(({ app }) => app) - .map(({ app, term = true }) => AppButton({ - icon: app.iconName, - onPrimaryClick: () => { - for (const client of Hyprland.clients) { - if (client.class.toLowerCase().includes(term)) - return focus(client); - } - - launchApp(app); - }, - onMiddleClick: () => launchApp(app), - tooltipText: app.name, - connections: [[Hyprland, button => { - const running = Hyprland.clients - .find(client => client.class.toLowerCase().includes(term)) || false; - - button.toggleClassName('nonrunning', !running); - button.toggleClassName('focused', Hyprland.active.client.address === running.address?.substring(2)); - button.set_tooltip_text(running ? running.title : app.name); - }, 'notify::clients']], - })), -}); - -export default () => { - const pinnedapps = PinnedApps(); - const taskbar = Taskbar(); - const applauncher = AppButton({ - className: 'launcher nonrunning', - icon: icons.apps.apps, - tooltipText: 'Applications', - onClicked: () => App.toggleWindow('applauncher'), - }); - const separator = Separator({ - valign: 'center', - halign: 'center', - orientation: 'vertical', - connections: [[Hyprland, box => box.visible = taskbar.children.length > 0]], - }); - return Widget.Box({ - className: 'dock', - children: [applauncher, pinnedapps, separator, taskbar], - }); -}; diff --git a/config/ags/js/dock/FloatingDock.js b/config/ags/js/dock/FloatingDock.js deleted file mode 100644 index f32306d5..00000000 --- a/config/ags/js/dock/FloatingDock.js +++ /dev/null @@ -1,47 +0,0 @@ -import Dock from './Dock.js'; -import { Hyprland, Utils, Widget } from '../imports.js'; - -export default monitor => Widget.Window({ - monitor, - name: `dock${monitor}`, - className: 'floating-dock', - anchor: ['bottom'], - child: Widget.EventBox({ - valign: 'start', - onHover: box => { - Utils.timeout(300, () => box._revealed = true); - box.child.children[0].revealChild = true; - }, - onHoverLost: box => { - if (!box._revealed) - return; - - Utils.timeout(300, () => box._revealed = false); - box.child.children[0].revealChild = false; - }, - child: Widget.Box({ - vertical: true, - style: 'padding: 1px;', - children: [ - Widget.Revealer({ - transition: 'slide_up', - child: Dock(), - setup: self => { - const update = () => { - const ws = Hyprland.getWorkspace(Hyprland.active.workspace.id); - if (Hyprland.getMonitor(monitor)?.name === ws?.monitor) - self.revealChild = ws?.windows === 0; - }; - Utils.connect(Hyprland, self, update, 'client-added'); - Utils.connect(Hyprland, self, update, 'client-removed'); - Utils.connect(Hyprland.active.workspace, self, update); - }, - }), - Widget.Box({ - className: 'padding', - style: 'padding: 2px;', - }), - ], - }), - }), -}); diff --git a/config/ags/js/icons.js b/config/ags/js/icons.js deleted file mode 100644 index b7d13fd2..00000000 --- a/config/ags/js/icons.js +++ /dev/null @@ -1,101 +0,0 @@ -export default { - settings: 'emblem-system-symbolic', - tick: 'object-select-symbolic', - lock: 'system-lock-screen-symbolic', - audio: { - mic: { - muted: 'microphone-disabled-symbolic', - low: 'microphone-sensitivity-low-symbolic', - medium: 'microphone-sensitivity-medium-symbolic', - high: 'microphone-sensitivity-high-symbolic', - }, - volume: { - muted: 'audio-volume-muted-symbolic', - low: 'audio-volume-low-symbolic', - medium: 'audio-volume-medium-symbolic', - high: 'audio-volume-high-symbolic', - overamplified: 'audio-volume-overamplified-symbolic', - }, - type: { - headset: 'audio-headphones-symbolic', - speaker: 'audio-speakers-symbolic', - card: 'audio-card-symbolic', - }, - mixer: '', - }, - asusctl: { - profile: { - Balanced: 'power-profile-balanced-symbolic', - Quiet: 'power-profile-power-saver-symbolic', - Performance: 'power-profile-performance-symbolic', - }, - mode: { - Integrated: '', - Hybrid: '󰢮', - }, - }, - apps: { - apps: 'view-app-grid-symbolic', - search: 'folder-saved-search-symbolic', - }, - battery: { - charging: '󱐋', - warning: 'battery-empty-symbolic', - }, - bluetooth: { - enabled: 'bluetooth-active-symbolic', - disabled: 'bluetooth-disabled-symbolic', - }, - brightness: { - indicator: 'display-brightness-symbolic', - keyboard: 'keyboard-brightness-symbolic', - screen: 'display-brightness-symbolic', - }, - powermenu: { - sleep: 'weather-clear-night-symbolic', - reboot: 'system-reboot-symbolic', - logout: 'system-log-out-symbolic', - shutdown: 'system-shutdown-symbolic', - }, - recorder: { - recording: 'media-record-symbolic', - }, - notifications: { - noisy: 'preferences-system-notifications-symbolic', - silent: 'notifications-disabled-symbolic', - }, - trash: { - full: 'user-trash-full-symbolic', - empty: 'user-trash-symbolic', - }, - mpris: { - fallback: 'audio-x-generic-symbolic', - shuffle: { - enabled: '󰒟', - disabled: '󰒟', - }, - loop: { - none: '󰓦', - track: '󰓦', - playlist: '󰑐', - }, - playing: '󰏦', - paused: '󰐍', - stopped: '󰐍', - prev: '󰒮', - next: '󰒭', - }, - ui: { - arrow: { - right: 'pan-end-symbolic', - left: 'pan-start-symbolic', - down: 'pan-down-symbolic', - up: 'pan-up-symbolic', - }, - }, - system: { - cpu: 'org.gnome.SystemMonitor-symbolic', - ram: 'drive-harddisk-solidstate-symbolic', - temp: 'temperature-symbolic', - }, -}; diff --git a/config/ags/js/imports.js b/config/ags/js/imports.js deleted file mode 100644 index ff95965c..00000000 --- a/config/ags/js/imports.js +++ /dev/null @@ -1,36 +0,0 @@ -// typedefs -/// -/// - -import App from 'resource:///com/github/Aylur/ags/app.js'; -import Widget from 'resource:///com/github/Aylur/ags/widget.js'; -import Service from 'resource:///com/github/Aylur/ags/service.js'; -import Variable from 'resource:///com/github/Aylur/ags/variable.js'; -import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; - -import Applications from 'resource:///com/github/Aylur/ags/service/applications.js'; -import Audio from 'resource:///com/github/Aylur/ags/service/audio.js'; -import Battery from 'resource:///com/github/Aylur/ags/service/battery.js'; -import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js'; -import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js'; -import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js'; -import Network from 'resource:///com/github/Aylur/ags/service/network.js'; -import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js'; -import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js'; - -export { - App, - Widget, - Service, - Variable, - Utils, - Applications, - Audio, - Battery, - Bluetooth, - Hyprland, - Mpris, - Network, - Notifications, - SystemTray, -}; diff --git a/config/ags/js/lockscreen/Lockscreen.js b/config/ags/js/lockscreen/Lockscreen.js deleted file mode 100644 index f508304f..00000000 --- a/config/ags/js/lockscreen/Lockscreen.js +++ /dev/null @@ -1,49 +0,0 @@ -import Avatar from '../misc/Avatar.js'; -import Spinner from '../misc/Spinner.js'; -import Lockscreen from '../services/lockscreen.js'; -import { Widget } from '../imports.js'; -import Layer from 'gi://GtkLayerShell'; - -export default monitor => Widget.Window({ - name: `lockscreen${monitor}`, - className: 'lockscreen', - monitor, - layer: 'overlay', - visible: false, - setup: self => Layer.set_keyboard_mode(self, Layer.KeyboardMode.EXCLUSIVE), - connections: [[Lockscreen, (w, lock) => w.visible = lock, 'lock']], - child: Widget.Box({ - style: 'min-width: 3000px; min-height: 2000px;', - className: 'shader', - child: Widget.Box({ - className: 'content', - vertical: true, - hexpand: true, - vexpand: true, - halign: 'center', - valign: 'center', - children: [ - Avatar({ - halign: 'center', - valign: 'center', - }), - Widget.Box({ - children: [ - Widget.Entry({ - connections: [[Lockscreen, entry => entry.text = '', 'lock']], - visibility: false, - placeholderText: 'Password', - onAccept: ({ text }) => Lockscreen.auth(text), - halign: 'center', - hexpand: true, - }), - Spinner({ - valign: 'center', - connections: [[Lockscreen, (w, auth) => w.visible = auth, 'authenticating']], - }), - ], - }), - ], - }), - }), -}); diff --git a/config/ags/js/lockscreen/auth.py b/config/ags/js/lockscreen/auth.py deleted file mode 100755 index 20eab871..00000000 --- a/config/ags/js/lockscreen/auth.py +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env python - -import pam -import sys -import getpass - -print(pam.authenticate(getpass.getuser(), sys.argv[1])); diff --git a/config/ags/js/misc/Avatar.js b/config/ags/js/misc/Avatar.js deleted file mode 100644 index 24567b31..00000000 --- a/config/ags/js/misc/Avatar.js +++ /dev/null @@ -1,18 +0,0 @@ -import Theme from '../services/theme/theme.js'; -import { Widget } from '../imports.js'; - -export default props => Widget.Box({ - ...props, - className: 'avatar', - connections: [[Theme, box => { - box.setStyle(` - background-image: url('${Theme.getSetting('avatar')}'); - background-size: cover; - `); - }]], - // child: Widget.Box({ - // className: 'shader', - // vexpand: true, - // hexpand: true, - // }), -}); diff --git a/config/ags/js/misc/BatteryIcon.js b/config/ags/js/misc/BatteryIcon.js deleted file mode 100644 index f5e140d7..00000000 --- a/config/ags/js/misc/BatteryIcon.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Battery, Widget } from '../imports.js'; - -export default () => Widget.Icon({ - className: 'battery', - binds: [['icon', Battery, 'icon-name']], - connections: [[Battery, stack => { - const { charging, charged } = Battery; - stack.shown = `${charging || charged}`; - stack.toggleClassName('charging', Battery.charging); - stack.toggleClassName('charged', Battery.charged); - stack.toggleClassName('low', Battery.percent < 30); - }]], -}); diff --git a/config/ags/js/misc/Clock.js b/config/ags/js/misc/Clock.js deleted file mode 100644 index a36f30f1..00000000 --- a/config/ags/js/misc/Clock.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Widget } from '../imports.js'; -import GLib from 'gi://GLib'; - -export default ({ - format = '%H:%M:%S %B %e. %A', - interval = 1000, - ...props -} = {}) => Widget.Label({ - className: 'clock', - ...props, - connections: [[interval, label => - label.label = GLib.DateTime.new_now_local().format(format), - ]], -}); diff --git a/config/ags/js/misc/FontIcon.js b/config/ags/js/misc/FontIcon.js deleted file mode 100644 index 5b3372a3..00000000 --- a/config/ags/js/misc/FontIcon.js +++ /dev/null @@ -1,36 +0,0 @@ -import Gtk from 'gi://Gtk'; -import GObject from 'gi://GObject'; -import { Widget } from '../imports.js'; - -class FontIcon extends Gtk.Label { - static { GObject.registerClass(this); } - - constructor(params = '') { - const { icon = '', ...rest } = params; - super(typeof params === 'string' ? {} : rest); - this.toggleClassName('font-icon'); - - if (typeof params === 'object') - this.icon = icon; - } - - get icon() { return this.label; } - set icon(icon) { this.label = icon; } - - get size() { - return this.get_style_context() - .get_property('font-size', Gtk.StateFlags.NORMAL); - } - - vfunc_get_preferred_height() { - return [this.size, this.size]; - } - - vfunc_get_preferred_width() { - return [this.size, this.size]; - } -} - -export default params => typeof params === 'string' - ? Widget({ type: FontIcon, icon: params }) - : Widget({ type: FontIcon, ...params }); diff --git a/config/ags/js/misc/HoverRevealer.js b/config/ags/js/misc/HoverRevealer.js deleted file mode 100644 index 4b2b6aef..00000000 --- a/config/ags/js/misc/HoverRevealer.js +++ /dev/null @@ -1,57 +0,0 @@ -import { Widget, Utils } from '../imports.js'; - -export default ({ - indicator, - child, - direction = 'left', - duration = 300, - connections, - eventboxConnections, - binds, - ...rest -}) => { - let open = false; - const vertical = direction === 'down' || direction === 'up'; - const posStart = direction === 'down' || direction === 'right'; - const posEnd = direction === 'up' || direction === 'left'; - - const revealer = Widget.Revealer({ - transition: `slide_${direction}`, - connections, - binds, - transitionDuration: duration, - child, - }); - - const box = Widget.EventBox({ - ...rest, - connections: eventboxConnections, - onHover: () => { - if (open) - return; - - revealer.revealChild = true; - Utils.timeout(duration, () => open = true); - }, - onHoverLost: () => { - if (!open) - return; - - revealer.revealChild = false; - open = false; - }, - child: Widget.Box({ - vertical, - children: [ - posStart && indicator, - revealer, - posEnd && indicator, - ], - }), - }); - - return Widget.Box({ - children: [box], - }); -}; - diff --git a/config/ags/js/misc/IconBrowser.js b/config/ags/js/misc/IconBrowser.js deleted file mode 100644 index 2f87f3e0..00000000 --- a/config/ags/js/misc/IconBrowser.js +++ /dev/null @@ -1,57 +0,0 @@ -import { Widget } from '../imports.js'; -import Gtk from 'gi://Gtk'; - -export default () => { - const selected = Widget.Label({ - style: 'font-size: 1.2em;', - }); - - const flowbox = Widget({ - type: Gtk.FlowBox, - min_children_per_line: 10, - connections: [['child-activated', (_, { child }) => { - selected.label = child.iconName; - }]], - setup: self => { - Gtk.IconTheme.get_default().list_icons(null).sort().map(icon => { - !icon.endsWith('.symbolic') && self.insert(Widget.Icon({ - icon, - size: 38, - }), -1); - }); - - self.show_all(); - }, - }); - - const entry = Widget.Entry({ - onChange: ({ text }) => flowbox.get_children().forEach(child => { - child.visible = child.child.iconName.includes(text); - }), - }); - - return Widget({ - name: 'icons', - type: Gtk.Window, - visible: true, - child: Widget.Box({ - style: 'padding: 30px;', - spacing: 20, - vertical: true, - children: [ - entry, - Widget.Scrollable({ - hscroll: 'never', - vscroll: 'always', - hexpand: true, - vexpand: true, - style: - 'min-width: 500px;' + - 'min-height: 500px;', - child: flowbox, - }), - selected, - ], - }), - }); -}; diff --git a/config/ags/js/misc/Notification.js b/config/ags/js/misc/Notification.js deleted file mode 100644 index 2103f8b2..00000000 --- a/config/ags/js/misc/Notification.js +++ /dev/null @@ -1,148 +0,0 @@ -import { Utils, Widget, Variable } from '../imports.js'; -import GLib from 'gi://GLib'; - -const NotificationIcon = ({ appEntry, appIcon, image }) => { - if (image) { - return Widget.Box({ - valign: 'start', - hexpand: false, - className: 'icon img', - style: ` - background-image: url("${image}"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - min-width: 78px; - min-height: 78px; - `, - }); - } - - let icon = 'dialog-information-symbolic'; - if (Utils.lookUpIcon(appIcon)) - icon = appIcon; - - if (Utils.lookUpIcon(appEntry)) - icon = appEntry; - - return Widget.Box({ - valign: 'start', - hexpand: false, - className: 'icon', - style: ` - min-width: 78px; - min-height: 78px; - `, - child: Widget.Icon({ - icon, size: 58, - halign: 'center', hexpand: true, - valign: 'center', vexpand: true, - }), - }); -}; - -export default notification => { - const hovered = Variable(false); - - const hover = () => { - hovered.value = true; - hovered._block = true; - - Utils.timeout(100, () => hovered._block = false); - }; - - const hoverLost = () => GLib.idle_add(0, () => { - if (hovered._block) - return GLib.SOURCE_REMOVE; - - hovered.value = false; - notification.dismiss(); - return GLib.SOURCE_REMOVE; - }); - - const content = Widget.Box({ - className: 'content', - children: [ - NotificationIcon(notification), - Widget.Box({ - hexpand: true, - vertical: true, - children: [ - Widget.Box({ - children: [ - Widget.Label({ - className: 'title', - xalign: 0, - justification: 'left', - hexpand: true, - maxWidthChars: 24, - truncate: 'end', - wrap: true, - label: notification.summary, - useMarkup: notification.summary.startsWith('<'), - }), - Widget.Label({ - className: 'time', - valign: 'start', - label: GLib.DateTime.new_from_unix_local(notification.time).format('%H:%M'), - }), - Widget.Button({ - onHover: hover, - className: 'close-button', - valign: 'start', - child: Widget.Icon('window-close-symbolic'), - onClicked: () => notification.close(), - }), - ], - }), - Widget.Label({ - className: 'description', - hexpand: true, - useMarkup: true, - xalign: 0, - justification: 'left', - label: notification.body, - wrap: true, - }), - ], - }), - ], - }); - - const actionsbox = Widget.Revealer({ - transition: 'slide_down', - binds: [['revealChild', hovered]], - child: Widget.EventBox({ - onHover: hover, - child: Widget.Box({ - className: 'actions', - children: notification.actions.map(action => Widget.Button({ - onHover: hover, - className: 'action-button', - onClicked: () => notification.invoke(action.id), - hexpand: true, - child: Widget.Label(action.label), - })), - }), - }), - }); - - return Widget.EventBox({ - className: `notification ${notification.urgency}`, - vexpand: false, - onPrimaryClick: () => { - hovered.value = false; - notification.dismiss(); - }, - properties: [['hovered', hovered]], - onHover: hover, - onHoverLost: hoverLost, - child: Widget.Box({ - vertical: true, - children: [ - content, - notification.actions.length > 0 && actionsbox, - ], - }), - }); -}; diff --git a/config/ags/js/misc/PopupWindow.js b/config/ags/js/misc/PopupWindow.js deleted file mode 100644 index e8bbc4cf..00000000 --- a/config/ags/js/misc/PopupWindow.js +++ /dev/null @@ -1,82 +0,0 @@ -import options from '../options.js'; -import { App, Widget } from '../imports.js'; - -const Padding = windowName => Widget.EventBox({ - className: 'padding', - hexpand: true, - vexpand: true, - connections: [['button-press-event', () => App.toggleWindow(windowName)]], -}); - -const PopupRevealer = (windowName, transition, child) => Widget.Box({ - style: 'padding: 1px;', - child: Widget.Revealer({ - transition, - child, - transitionDuration: options.windowAnimationDuration, - connections: [[App, (revealer, name, visible) => { - if (name === windowName) - revealer.reveal_child = visible; - }]], - }), -}); - -const layouts = { - 'center': (windowName, child, expand) => Widget.CenterBox({ - className: 'shader', - style: expand ? 'min-width: 5000px; min-height: 3000px;' : '', - children: [ - Padding(windowName), - Widget.CenterBox({ - vertical: true, - children: [ - Padding(windowName), - child, - Padding(windowName), - ], - }), - Padding(windowName), - ], - }), - 'top': (windowName, child) => Widget.CenterBox({ - children: [ - Padding(windowName), - Widget.Box({ - vertical: true, - children: [ - PopupRevealer(windowName, 'slide_down', child), - Padding(windowName), - ], - }), - Padding(windowName), - ], - }), - 'top right': (windowName, child) => Widget.Box({ - children: [ - Padding(windowName), - Widget.Box({ - hexpand: false, - vertical: true, - children: [ - PopupRevealer(windowName, 'slide_down', child), - Padding(windowName), - ], - }), - ], - }), -}; - -export default ({ - layout = 'center', - expand = true, - name, - content, - ...rest -}) => Widget.Window({ - name, - child: layouts[layout](name, content, expand), - popup: true, - visible: false, - focusable: true, - ...rest, -}); diff --git a/config/ags/js/misc/Progress.js b/config/ags/js/misc/Progress.js deleted file mode 100644 index c9dfa280..00000000 --- a/config/ags/js/misc/Progress.js +++ /dev/null @@ -1,54 +0,0 @@ -import { Widget, Utils } from '../imports.js'; - -export default ({ - height = 18, - width = 180, - vertical = false, - child, - ...props -}) => { - const fill = Widget.Box({ - className: 'fill', - hexpand: vertical, - vexpand: !vertical, - halign: vertical ? 'fill' : 'start', - valign: vertical ? 'end' : 'fill', - children: [child], - }); - - return Widget.Box({ - ...props, - className: 'progress', - style: ` - min-width: ${width}px; - min-height: ${height}px; - `, - children: [fill], - setup: progress => progress.setValue = value => { - if (value < 0) - return; - - const axis = vertical ? 'height' : 'width'; - const axisv = vertical ? height : width; - const min = vertical ? width : height; - const preferred = (axisv - min) * value + min; - - if (!fill._size) { - fill._size = preferred; - fill.setStyle(`min-${axis}: ${preferred}px;`); - return; - } - - const frames = 10; - const goal = preferred - fill._size; - const step = goal / frames; - - for (let i = 0; i < frames; ++i) { - Utils.timeout(5 * i, () => { - fill._size += step; - fill.setStyle(`min-${axis}: ${fill._size}px`); - }); - } - }, - }); -}; diff --git a/config/ags/js/misc/Separator.js b/config/ags/js/misc/Separator.js deleted file mode 100644 index 966340e2..00000000 --- a/config/ags/js/misc/Separator.js +++ /dev/null @@ -1,8 +0,0 @@ -import Gtk from 'gi://Gtk'; -import { Widget } from '../imports.js'; - -export default ({ orientation = 'vertical', ...rest } = {}) => Widget({ - ...rest, - type: Gtk.Separator, - orientation: Gtk.Orientation[orientation.toUpperCase()], -}); diff --git a/config/ags/js/misc/Spinner.js b/config/ags/js/misc/Spinner.js deleted file mode 100644 index 30d43608..00000000 --- a/config/ags/js/misc/Spinner.js +++ /dev/null @@ -1,8 +0,0 @@ -import Gtk from 'gi://Gtk'; -import { Widget } from '../imports.js'; - -export default props => Widget({ - ...props, - type: Gtk.Spinner, - active: true, -}); diff --git a/config/ags/js/misc/Wallpaper.js b/config/ags/js/misc/Wallpaper.js deleted file mode 100644 index 0a4cd990..00000000 --- a/config/ags/js/misc/Wallpaper.js +++ /dev/null @@ -1,13 +0,0 @@ -import Theme from '../services/theme/theme.js'; -import { Widget } from '../imports.js'; - -export default ({ className, ...props }) => Widget.Box({ - ...props, - className: `wallpaper ${className}`, - connections: [[Theme, box => { - box.setStyle(` - background-image: url('${Theme.getSetting('wallpaper')}'); - background-size: cover; - `); - }]], -}); diff --git a/config/ags/js/misc/mpris.js b/config/ags/js/misc/mpris.js deleted file mode 100644 index 4be938b3..00000000 --- a/config/ags/js/misc/mpris.js +++ /dev/null @@ -1,215 +0,0 @@ -import icons from '../icons.js'; -import { Utils, Widget } from '../imports.js'; -import GLib from 'gi://GLib'; - -const MEDIA_CACHE_PATH = Utils.CACHE_DIR + '/media'; - -export const CoverArt = (player, props) => Widget.Box({ - ...props, - className: 'cover', - binds: [['style', player, 'cover-path', - path => `background-image: url("${path}")`]], -}); - -export const BlurredCoverArt = (player, props) => Widget.Box({ - ...props, - className: 'blurred-cover', - connections: [[player, box => { - const url = player.coverPath; - if (!url) - return; - - const blurredPath = MEDIA_CACHE_PATH + '/blurred'; - const blurred = blurredPath + - url.substring(MEDIA_CACHE_PATH.length); - - if (GLib.file_test(blurred, GLib.FileTest.EXISTS)) { - box.setStyle(`background-image: url("${blurred}")`); - return; - } - - Utils.ensureDirectory(blurredPath); - Utils.execAsync(['convert', url, '-blur', '0x22', blurred]) - .then(() => box.setStyle(`background-image: url("${blurred}")`)) - .catch(() => { }); - }, 'notify::cover-path']], -}); - -export const TitleLabel = (player, props) => Widget.Label({ - ...props, - className: 'title', - binds: [['label', player, 'track-title']], -}); - -export const ArtistLabel = (player, props) => Widget.Label({ - ...props, - className: 'artist', - binds: [['label', player, 'track-artists', a => a.join(', ') || '']], -}); - -export const PlayerIcon = (player, { symbolic = true, ...props } = {}) => Widget.Icon({ - ...props, - className: 'player-icon', - tooltipText: player.identity || '', - connections: [[player, icon => { - const name = `${player.entry}${symbolic ? '-symbolic' : ''}`; - Utils.lookUpIcon(name) - ? icon.icon = name - : icon.icon = icons.mpris.fallback; - }]], -}); - -export const PositionSlider = (player, props) => Widget.Slider({ - ...props, - className: 'position-slider', - drawValue: false, - onChange: ({ value }) => { - player.position = player.length * value; - }, - properties: [['update', slider => { - if (slider.dragging) - return; - - slider.visible = player.length > 0; - if (player.length > 0) - slider.value = player.position / player.length; - }]], - connections: [ - [player, s => s._update(s)], - [player, s => s._update(s), 'position'], - [1000, s => s._update(s)], - ], -}); - -function lengthStr(length) { - const min = Math.floor(length / 60); - const sec = Math.floor(length % 60); - const sec0 = sec < 10 ? '0' : ''; - return `${min}:${sec0}${sec}`; -} - -export const PositionLabel = player => Widget.Label({ - properties: [['update', (label, time) => { - player.length > 0 - ? label.label = lengthStr(time || player.position) - : label.visible = !!player; - }]], - connections: [ - [player, (l, time) => l._update(l, time), 'position'], - [1000, l => l._update(l)], - ], -}); - -export const LengthLabel = player => Widget.Label({ - connections: [[player, label => { - player.length > 0 - ? label.label = lengthStr(player.length) - : label.visible = !!player; - }]], -}); - -export const Slash = player => Widget.Label({ - label: '/', - connections: [[player, label => { - label.visible = player.length > 0; - }]], -}); - -const PlayerButton = ({ player, items, onClick, prop, canProp, cantValue }) => Widget.Button({ - child: Widget.Stack({ - items, - binds: [['shown', player, prop, p => `${p}`]], - }), - onClicked: player[onClick].bind(player), - binds: [['visible', player, canProp, c => c !== cantValue]], -}); - -export const ShuffleButton = player => PlayerButton({ - player, - items: [ - ['true', Widget.Label({ - className: 'shuffle enabled', - label: icons.mpris.shuffle.enabled, - })], - ['false', Widget.Label({ - className: 'shuffle disabled', - label: icons.mpris.shuffle.disabled, - })], - ], - onClick: 'shuffle', - prop: 'shuffle-status', - canProp: 'shuffle-status', - cantValue: null, -}); - -export const LoopButton = player => PlayerButton({ - player, - items: [ - ['None', Widget.Label({ - className: 'loop none', - label: icons.mpris.loop.none, - })], - ['Track', Widget.Label({ - className: 'loop track', - label: icons.mpris.loop.track, - })], - ['Playlist', Widget.Label({ - className: 'loop playlist', - label: icons.mpris.loop.playlist, - })], - ], - onClick: 'loop', - prop: 'loop-status', - canProp: 'loop-status', - cantValue: null, -}); - -export const PlayPauseButton = player => PlayerButton({ - player, - items: [ - ['Playing', Widget.Label({ - className: 'playing', - label: icons.mpris.playing, - })], - ['Paused', Widget.Label({ - className: 'paused', - label: icons.mpris.paused, - })], - ['Stopped', Widget.Label({ - className: 'stopped', - label: icons.mpris.stopped, - })], - ], - onClick: 'playPause', - prop: 'play-back-status', - canProp: 'can-play', - cantValue: false, -}); - -export const PreviousButton = player => PlayerButton({ - player, - items: [ - ['true', Widget.Label({ - className: 'previous', - label: icons.mpris.prev, - })], - ], - onClick: 'previous', - prop: 'can-go-prev', - canProp: 'can-go-prev', - cantValue: false, -}); - -export const NextButton = player => PlayerButton({ - player, - items: [ - ['true', Widget.Label({ - className: 'next', - label: icons.mpris.next, - })], - ], - onClick: 'next', - prop: 'can-go-next', - canProp: 'can-go-next', - cantValue: false, -}); diff --git a/config/ags/js/notifications/Notifications.js b/config/ags/js/notifications/Notifications.js deleted file mode 100644 index 2c775cb7..00000000 --- a/config/ags/js/notifications/Notifications.js +++ /dev/null @@ -1,67 +0,0 @@ -import Notification from '../misc/Notification.js'; -import { Notifications, Widget, Utils } from '../imports.js'; - -const blackList = ['Spotify']; - -const Popups = () => { - const map = new Map(); - - const onDismissed = (box, id, force = false) => { - if (!id || !map.has(id)) - return; - - if (map.get(id)._hovered.value && !force) - return; - - if (map.size - 1 === 0) - box.get_parent().revealChild = false; - - Utils.timeout(200, () => { - map.get(id)?.destroy(); - map.delete(id); - }); - }; - - const onNotified = (box, id) => { - if (!id || Notifications.dnd) - return; - - const n = Notifications.getNotification(id); - if (blackList.includes(n?.app_name)) - return; - - map.delete(id); - map.set(id, Notification(n)); - box.children = Array.from(map.values()).reverse(); - Utils.timeout(10, () => { - box.get_parent().revealChild = true; - }); - }; - - return Widget.Box({ - vertical: true, - connections: [ - [Notifications, onNotified, 'notified'], - [Notifications, onDismissed, 'dismissed'], - [Notifications, (box, id) => onDismissed(box, id, true), 'closed'], - ], - }); -}; - -const PopupList = ({ transition = 'slide_down' } = {}) => Widget.Box({ - className: 'notifications-popup-list', - style: 'padding: 1px', - children: [ - Widget.Revealer({ - transition, - child: Popups(), - }), - ], -}); - -export default monitor => Widget.Window({ - monitor, - name: `notifications${monitor}`, - anchor: ['top'], - child: PopupList(), -}); diff --git a/config/ags/js/options.js b/config/ags/js/options.js deleted file mode 100644 index d99bf149..00000000 --- a/config/ags/js/options.js +++ /dev/null @@ -1,69 +0,0 @@ -export default { - // if this player is running this will be shown on panel - preferredMpris: 'spotify', - - // number of workspaces shown on panel and overview - // set to 0 to make it dynamic - workspaces: 7, - - battaryBar: { - // wether to show percentage by deafult - showPercentage: false, - - // at what percentages should the battery-bar change color - low: 30, - medium: 50, - }, - - // path to read temperature from - temperature: '/sys/class/thermal/thermal_zone0/temp', - - // at what intervals should cpu, ram, temperature refresh - systemFetchInterval: 5000, - - // the slide down animation on quicksettings and dashboard - windowAnimationDuration: 250, - - // keyboard id for brightnessctl - brightnessctlKBD: 'asus::kbd_backlight', - - dock: { - iconSize: 56, - pinnedApps: [ - 'firefox', - 'kitty', - 'nemo', - 'org.gnome.Calendar', - 'obsidian', - 'transmission-gtk', - 'discord', - 'spotify', - ], - }, - - substitutions: { - icons: [ - ['transmission-gtk', 'transmission'], - ['blueberry.py', 'bluetooth'], - ['kitty', 'folder-code'], - ['com.raggesilver.BlackBox', 'folder-code'], - ['Caprine', 'facebook-messenger'], - ['', 'preferences-desktop-display'], - ], - titles: [ - ['transmission-gtk', 'Transmission'], - ['com.obsproject.Studio', 'OBS'], - ['com.usebottles.bottles', 'Bottles'], - ['com.github.wwmm.easyeffects', 'Easy Effects'], - ['org.gnome.TextEditor', 'Text Editor'], - ['org.gnome.design.IconLibrary', 'Icon Library'], - ['blueberry.py', 'Blueberry'], - ['kitty', 'Kitty'], - ['com.raggesilver.BlackBox', 'BlackBox'], - ['firefox', 'Firefox'], - ['org.gnome.Nautilus', 'Files'], - ['libreoffice-writer', 'Writer'], - ['', 'Desktop'], - ], - }, -}; diff --git a/config/ags/js/osd/OSD.js b/config/ags/js/osd/OSD.js deleted file mode 100644 index 382f605f..00000000 --- a/config/ags/js/osd/OSD.js +++ /dev/null @@ -1,51 +0,0 @@ -import { Utils, Widget } from '../imports.js'; -import FontIcon from '../misc/FontIcon.js'; -import Progress from '../misc/Progress.js'; -import Indicator from '../services/onScreenIndicator.js'; - -export const OnScreenIndicator = ({ height = 300, width = 48 } = {}) => Widget.Box({ - className: 'indicator', - style: 'padding: 1px;', - child: Widget.Revealer({ - transition: 'slide_left', - connections: [[Indicator, (revealer, value) => { - revealer.revealChild = value > -1; - }]], - child: Progress({ - width, - height, - vertical: true, - connections: [[Indicator, (progress, value) => progress.setValue(value)]], - child: Widget.Stack({ - valign: 'start', - halign: 'center', - hexpand: false, - items: [ - ['true', Widget.Icon({ - halign: 'center', - size: width, - connections: [[Indicator, (icon, _v, name) => icon.icon = name || '']], - })], - ['false', FontIcon({ - halign: 'center', - hexpand: true, - style: `font-size: ${width}px;`, - connections: [[Indicator, (icon, _v, name) => icon.icon = name || '']], - })], - ], - connections: [[Indicator, (stack, _v, name) => { - stack.shown = `${!!Utils.lookUpIcon(name)}`; - }]], - }), - }), - }), -}); - -export default monitor => Widget.Window({ - name: `indicator${monitor}`, - monitor, - className: 'indicator', - layer: 'overlay', - anchor: ['right'], - child: OnScreenIndicator(), -}); diff --git a/config/ags/js/overview/Overview.js b/config/ags/js/overview/Overview.js deleted file mode 100644 index 98dbcc16..00000000 --- a/config/ags/js/overview/Overview.js +++ /dev/null @@ -1,32 +0,0 @@ -import PopupWindow from '../misc/PopupWindow.js'; -import Workspace from './Workspace.js'; -import options from '../options.js'; -import { Utils, App, Widget, Hyprland } from '../imports.js'; -import { range } from '../utils.js'; - -const ws = options.workspaces; - -const update = box => Utils.execAsync('hyprctl -j clients') - .then(clients => { - const json = JSON.parse(clients); - box.children.forEach(ch => ch.update(json)); - }) - .catch(console.error); - -export default () => PopupWindow({ - name: 'overview', - content: Widget.Box({ - className: 'overview', - children: range(ws).map(Workspace), - setup: update, - connections: [[Hyprland, box => { - if (!App.getWindow('overview').visible) - return; - - update(box); - }]], - binds: ws ? [] : [['children', Hyprland, 'workspaces', - w => w.sort((ws1, ws2) => ws1.id < ws2.id).map(({ id }) => Workspace(id)), - ]], - }), -}); diff --git a/config/ags/js/overview/Workspace.js b/config/ags/js/overview/Workspace.js deleted file mode 100644 index bf6e325c..00000000 --- a/config/ags/js/overview/Workspace.js +++ /dev/null @@ -1,81 +0,0 @@ -import { createSurfaceFromWidget } from '../utils.js'; -import Gdk from 'gi://Gdk'; -import Gtk from 'gi://Gtk'; -import { Hyprland, Utils, Widget, App } from '../imports.js'; -import options from '../options.js'; - -const SCALE = 0.08; -const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)]; - -const dispatch = args => Utils.execAsync(`hyprctl dispatch ${args}`); - -const substitute = str => options.substitutions.icons - .find(([from]) => from === str)?.[1] || str; - -const Client = ({ address, size: [w, h], class: c, title }) => Widget.Button({ - className: 'client', - tooltipText: title, - child: Widget.Icon({ - style: ` - min-width: ${w * SCALE}px; - min-height: ${h * SCALE}px; - `, - icon: substitute(c), - }), - onSecondaryClick: () => dispatch(`closewindow address:${address}`), - onClicked: () => dispatch(`focuswindow address:${address}`) - .then(() => App.closeWindow('overview')), - - setup: btn => { - btn.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY); - btn.connect('drag-data-get', (_w, _c, data) => data.set_text(address, address.length)); - btn.connect('drag-begin', (_, context) => { - Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn)); - btn.toggleClassName('hidden', true); - }); - btn.connect('drag-end', () => btn.toggleClassName('hidden', false)); - }, -}); - -export default index => { - const fixed = Gtk.Fixed.new(); - - const widget = Widget.Box({ - className: 'workspace', - valign: 'center', - style: ` - min-width: ${1920 * SCALE}px; - min-height: ${1080 * SCALE}px; - `, - connections: [[Hyprland, box => { - box.toggleClassName('active', Hyprland.active.workspace.id === index); - }]], - child: Widget.EventBox({ - hexpand: true, - vexpand: true, - onPrimaryClick: () => dispatch(`workspace ${index}`), - setup: eventbox => { - eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY); - eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => { - dispatch(`movetoworkspacesilent ${index},address:${data.get_text()}`); - }); - }, - child: fixed, - }), - }); - - widget.update = clients => { - fixed.get_children().forEach(ch => ch.destroy()); - clients - .filter(({ workspace: { id } }) => id === index) - .forEach(c => { - c.at[0] -= Hyprland.monitors.find(m => m.name === Hyprland.getWorkspace(c.workspace.id).monitor).x; - c.at[1] -= Hyprland.monitors.find(m => m.name === Hyprland.getWorkspace(c.workspace.id).monitor).y; - c.mapped && fixed.put(Client(c), c.at[0] * SCALE, c.at[1] * SCALE); - }); - - fixed.show_all(); - }; - - return widget; -}; diff --git a/config/ags/js/powermenu/PowerMenu.js b/config/ags/js/powermenu/PowerMenu.js deleted file mode 100644 index 7713df95..00000000 --- a/config/ags/js/powermenu/PowerMenu.js +++ /dev/null @@ -1,30 +0,0 @@ -import icons from '../icons.js'; -import PowerMenu from '../services/powermenu.js'; -import PopupWindow from '../misc/PopupWindow.js'; -import { Widget } from '../imports.js'; - -const SysButton = (action, label) => Widget.Button({ - onClicked: () => PowerMenu.action(action), - child: Widget.Box({ - vertical: true, - children: [ - Widget.Icon(icons.powermenu[action]), - Widget.Label(label), - ], - }), -}); - -export default () => PopupWindow({ - name: 'powermenu', - expand: true, - content: Widget.Box({ - className: 'powermenu', - homogeneous: true, - children: [ - SysButton('sleep', 'Sleep'), - SysButton('reboot', 'Reboot'), - SysButton('logout', 'Log Out'), - SysButton('shutdown', 'Shutdown'), - ], - }), -}); diff --git a/config/ags/js/powermenu/Verification.js b/config/ags/js/powermenu/Verification.js deleted file mode 100644 index bf5f2eb0..00000000 --- a/config/ags/js/powermenu/Verification.js +++ /dev/null @@ -1,38 +0,0 @@ -import PopupWindow from '../misc/PopupWindow.js'; -import PowerMenu from '../services/powermenu.js'; -import { Widget, App, Utils } from '../imports.js'; - -export default () => PopupWindow({ - name: 'verification', - expand: true, - content: Widget.Box({ - className: 'verification', - vertical: true, - children: [ - Widget.Label({ - className: 'title', - binds: [['label', PowerMenu, 'title']], - }), - Widget.Label({ - className: 'desc', - label: 'Are you sure?', - }), - Widget.Box({ - className: 'buttons', - vexpand: true, - valign: 'end', - homogeneous: true, - children: [ - Widget.Button({ - child: Widget.Label('No'), - onClicked: () => App.toggleWindow('verification'), - }), - Widget.Button({ - child: Widget.Label('Yes'), - onClicked: () => Utils.exec(PowerMenu.cmd), - }), - ], - }), - ], - }), -}); diff --git a/config/ags/js/quicksettings/QuickSettings.js b/config/ags/js/quicksettings/QuickSettings.js deleted file mode 100644 index a1ff4b45..00000000 --- a/config/ags/js/quicksettings/QuickSettings.js +++ /dev/null @@ -1,68 +0,0 @@ -import Header from './widgets/Header.js'; -import PopupWindow from '../misc/PopupWindow.js'; -import { Volume, Microhone, SinkSelector, AppMixer } from './widgets/Volume.js'; -import { NetworkToggle, WifiSelection } from './widgets/Network.js'; -import { BluetoothToggle, BluetoothDevices } from './widgets/Bluetooth.js'; -import { ThemeToggle, ThemeSelector } from './widgets/Theme.js'; -import { ProfileToggle, ProfileSelector } from './widgets/AsusProfile.js'; -import Media from './widgets/Media.js'; -import Brightness from './widgets/Brightness.js'; -import DND from './widgets/DND.js'; -import MicMute from './widgets/MicMute.js'; -import { Widget } from '../imports.js'; - -const Row = (toggles, menus = []) => Widget.Box({ - className: 'row', - vertical: true, - children: [ - Widget.Box({ - children: toggles, - }), - ...menus, - ], -}); - -const Homogeneous = toggles => Widget.Box({ - homogeneous: true, - children: toggles, -}); - -export default () => PopupWindow({ - name: 'quicksettings', - anchor: ['top', 'right'], - layout: 'top right', - content: Widget.Box({ - className: 'quicksettings', - vertical: true, - children: [ - Row( - [Header()], - ), - Row([Widget.Box({ - className: 'slider-box', - vertical: true, - children: [ - Row( - [Volume()], - [SinkSelector(), AppMixer()], - ), - Row( - [Microhone()], - ), - Row( - [Brightness()], - ), - ], - })]), - Row( - [Homogeneous([NetworkToggle(), BluetoothToggle()]), DND()], - [WifiSelection(), BluetoothDevices()], - ), - Row( - [Homogeneous([ProfileToggle(), ThemeToggle()]), MicMute()], - [ProfileSelector(), ThemeSelector()], - ), - Media(), - ], - }), -}); diff --git a/config/ags/js/quicksettings/ToggleButton.js b/config/ags/js/quicksettings/ToggleButton.js deleted file mode 100644 index e5422691..00000000 --- a/config/ags/js/quicksettings/ToggleButton.js +++ /dev/null @@ -1,98 +0,0 @@ -import icons from '../icons.js'; -import Separator from '../misc/Separator.js'; -import { Utils, Widget, App, Variable } from '../imports.js'; - -export const opened = Variable(''); -App.connect('window-toggled', (_, name, visible) => { - if (name === 'quicksettings' && !visible) - Utils.timeout(500, () => opened.value = ''); -}); - -export const Arrow = (name, activate) => Widget.Button({ - child: Widget.Icon({ - icon: icons.ui.arrow.right, - properties: [['deg', 0]], - connections: [[opened, icon => { - if (opened.value === name && !icon._opened || opened.value !== name && icon._opened) { - const step = opened.value === name ? 10 : -10; - icon._opened = !icon._opened; - for (let i = 0; i < 9; ++i) { - Utils.timeout(15 * i, () => { - icon._deg += step; - icon.setStyle(`-gtk-icon-transform: rotate(${icon._deg}deg);`); - }); - } - } - }]], - }), - onClicked: () => { - opened.value = opened.value === name ? '' : name; - if (activate) - activate(); - }, -}); - -export const ArrowToggleButton = ({ - name, icon, label, activate, deactivate, - activateOnArrow = true, - connection: [service, condition], -}) => Widget.Box({ - className: 'toggle-button', - connections: [[service, box => { - box.toggleClassName('active', condition()); - }]], - children: [ - Widget.Button({ - child: Widget.Box({ - hexpand: true, - children: [icon, label], - }), - onClicked: () => { - if (condition()) { - deactivate(); - if (opened.value === name) - opened.value = ''; - } else { - activate(); - } - }, - }), - Arrow(name, activateOnArrow && activate), - ], -}); - -export const Menu = ({ name, icon, title, content }) => Widget.Revealer({ - transition: 'slide_down', - connections: [[opened, revealer => { - revealer.revealChild = opened.value === name; - }]], - child: Widget.Box({ - className: 'menu', - vertical: true, - children: [ - Widget.Box({ - className: 'title', - children: [icon, title], - }), - Separator({ orientation: 'horizontal' }), - Widget.Box({ - className: 'content', - children: [content], - }), - ], - }), -}); - -export const SimpleToggleButton = ({ - icon, label, toggle, - connection: [service, condition], -}) => Widget.Button({ - className: 'simple-toggle', - connections: [[service, box => { - box.toggleClassName('active', condition()); - }]], - child: Widget.Box({ - children: [icon, label], - }), - onClicked: toggle, -}); diff --git a/config/ags/js/quicksettings/widgets/AsusProfile.js b/config/ags/js/quicksettings/widgets/AsusProfile.js deleted file mode 100644 index ccf7581b..00000000 --- a/config/ags/js/quicksettings/widgets/AsusProfile.js +++ /dev/null @@ -1,51 +0,0 @@ -import icons from '../../icons.js'; -import Separator from '../../misc/Separator.js'; -import Asusctl from '../../services/asusctl.js'; -import { ArrowToggleButton, Menu } from '../ToggleButton.js'; -import { Widget } from '../../imports.js'; - -export const ProfileToggle = () => ArrowToggleButton({ - name: 'asusctl-profile', - icon: Widget.Icon({ - binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]], - }), - label: Widget.Label({ - binds: [['label', Asusctl, 'profile']], - }), - connection: [Asusctl, () => Asusctl.profile !== 'Balanced'], - activate: () => Asusctl.setProfile('Quiet'), - deactivate: () => Asusctl.setProfile('Balanced'), - activateOnArrow: false, -}); - -export const ProfileSelector = () => Menu({ - name: 'asusctl-profile', - icon: Widget.Icon({ - binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]], - }), - title: Widget.Label('Profile Selector'), - content: Widget.Box({ - vertical: true, - hexpand: true, - children: Asusctl.profiles.map(prof => Widget.Button({ - onClicked: () => Asusctl.setProfile(prof), - child: Widget.Box({ - children: [ - Widget.Icon(icons.asusctl.profile[prof]), - Widget.Label(prof), - ], - }), - })).concat([ - Separator({ orientation: 'horizontal' }), - Widget.Button({ - onClicked: 'rog-control-center', - child: Widget.Box({ - children: [ - Widget.Icon(icons.settings), - Widget.Label('Rog Control Center'), - ], - }), - }), - ]), - }), -}); diff --git a/config/ags/js/quicksettings/widgets/Bluetooth.js b/config/ags/js/quicksettings/widgets/Bluetooth.js deleted file mode 100644 index 70ef7a17..00000000 --- a/config/ags/js/quicksettings/widgets/Bluetooth.js +++ /dev/null @@ -1,63 +0,0 @@ -import icons from '../../icons.js'; -import Spinner from '../../misc/Spinner.js'; -import { Menu, ArrowToggleButton } from '../ToggleButton.js'; -import { Bluetooth, Widget } from '../../imports.js'; -import Gtk from 'gi://Gtk'; - -export const BluetoothToggle = () => ArrowToggleButton({ - name: 'bluetooth', - icon: Widget.Icon({ - connections: [[Bluetooth, icon => { - icon.icon = Bluetooth.enabled - ? icons.bluetooth.enabled - : icons.bluetooth.disabled; - }]], - }), - label: Widget.Label({ - truncate: 'end', - connections: [[Bluetooth, label => { - if (!Bluetooth.enabled) - return label.label = 'Disabled'; - - if (Bluetooth.connectedDevices.length === 0) - return label.label = 'Not Connected'; - - if (Bluetooth.connectedDevices.length === 1) - return label.label = Bluetooth.connectedDevices[0].alias; - - label.label = `${Bluetooth.connectedDevices.length} Connected`; - }]], - }), - connection: [Bluetooth, () => Bluetooth.enabled], - deactivate: () => Bluetooth.enabled = false, - activate: () => Bluetooth.enabled = true, -}); - -export const BluetoothDevices = () => Menu({ - name: 'bluetooth', - icon: Widget.Icon(icons.bluetooth.disabled), - title: Widget.Label('Bluetooth'), - content: Widget.Box({ - hexpand: true, - vertical: true, - connections: [[Bluetooth, box => { - box.children = Bluetooth.devices - .filter(d => d.name) - .map(device => Widget.Box({ - children: [ - Widget.Icon(device.iconName + '-symbolic'), - Widget.Label(device.name), - device.batteryPercentage > 0 && Widget.Label(`${device.batteryPercentage}%`), - Widget.Box({ hexpand: true }), - device.connecting ? Spinner() : Widget({ - type: Gtk.Switch, - active: device.connected, - connections: [['notify::active', ({ active }) => { - device.setConnection(active); - }]], - }), - ], - })); - }]], - }), -}); diff --git a/config/ags/js/quicksettings/widgets/Brightness.js b/config/ags/js/quicksettings/widgets/Brightness.js deleted file mode 100644 index 5c42b5d3..00000000 --- a/config/ags/js/quicksettings/widgets/Brightness.js +++ /dev/null @@ -1,23 +0,0 @@ -import icons from '../../icons.js'; -import Brightness from '../../services/brightness.js'; -import { Widget } from '../../imports.js'; - -const BrightnessSlider = () => Widget.Slider({ - drawValue: false, - hexpand: true, - binds: [['value', Brightness, 'screen']], - onChange: ({ value }) => Brightness.screen = value, -}); - -export default () => Widget.Box({ - className: 'slider', - children: [ - Widget.Icon({ - icon: icons.brightness.indicator, - className: 'icon', - binds: [['tooltip-text', Brightness, 'screen', v => - `Screen Brightness: ${Math.floor(v * 100)}%`]], - }), - BrightnessSlider(), - ], -}); diff --git a/config/ags/js/quicksettings/widgets/DND.js b/config/ags/js/quicksettings/widgets/DND.js deleted file mode 100644 index 005071ff..00000000 --- a/config/ags/js/quicksettings/widgets/DND.js +++ /dev/null @@ -1,15 +0,0 @@ -import icons from '../../icons.js'; -import { SimpleToggleButton } from '../ToggleButton.js'; -import { Notifications, Widget } from '../../imports.js'; - -export default () => SimpleToggleButton({ - icon: Widget.Icon({ - connections: [[Notifications, icon => { - icon.icon = Notifications.dnd - ? icons.notifications.silent - : icons.notifications.noisy; - }, 'notify::dnd']], - }), - toggle: () => Notifications.dnd = !Notifications.dnd, - connection: [Notifications, () => Notifications.dnd], -}); diff --git a/config/ags/js/quicksettings/widgets/Header.js b/config/ags/js/quicksettings/widgets/Header.js deleted file mode 100644 index cb9d664d..00000000 --- a/config/ags/js/quicksettings/widgets/Header.js +++ /dev/null @@ -1,76 +0,0 @@ -import icons from '../../icons.js'; -import PowerMenu from '../../services/powermenu.js'; -import Theme from '../../services/theme/theme.js'; -import Lockscreen from '../../services/lockscreen.js'; -import Avatar from '../../misc/Avatar.js'; -import { uptime } from '../../variables.js'; -import { Battery, Widget } from '../../imports.js'; - -export const BatteryProgress = () => Widget.Box({ - className: 'battery-progress', - vexpand: true, - binds: [['visible', Battery, 'available']], - connections: [[Battery, w => { - w.toggleClassName('half', Battery.percent < 46); - w.toggleClassName('low', Battery.percent < 30); - }]], - child: Widget.Overlay({ - vexpand: true, - child: Widget.ProgressBar({ - hexpand: true, - vexpand: true, - connections: [[Battery, progress => { - progress.fraction = Battery.percent / 100; - }]], - }), - overlays: [Widget.Label({ - connections: [[Battery, l => { - l.label = Battery.charging || Battery.charged - ? icons.battery.charging - : `${Battery.percent}%`; - }]], - })], - }), -}); - -export default () => Widget.Box({ - className: 'header', - children: [ - Avatar(), - Widget.Box({ - className: 'system-box', - vertical: true, - hexpand: true, - children: [ - Widget.Box({ - children: [ - Widget.Button({ - valign: 'center', - onClicked: () => Theme.openSettings(), - child: Widget.Icon(icons.settings), - }), - Widget.Label({ - className: 'uptime', - hexpand: true, - valign: 'center', - connections: [[uptime, label => { - label.label = `uptime: ${uptime.value}`; - }]], - }), - Widget.Button({ - valign: 'center', - onClicked: () => Lockscreen.lockscreen(), - child: Widget.Icon(icons.lock), - }), - Widget.Button({ - valign: 'center', - onClicked: () => PowerMenu.action('shutdown'), - child: Widget.Icon(icons.powermenu.shutdown), - }), - ], - }), - BatteryProgress(), - ], - }), - ], -}); diff --git a/config/ags/js/quicksettings/widgets/Media.js b/config/ags/js/quicksettings/widgets/Media.js deleted file mode 100644 index 66edf0c1..00000000 --- a/config/ags/js/quicksettings/widgets/Media.js +++ /dev/null @@ -1,88 +0,0 @@ -import * as mpris from '../../misc/mpris.js'; -import { Mpris, Widget } from '../../imports.js'; - -const blackList = ['Caprine']; - -const Footer = player => Widget.CenterBox({ - className: 'footer-box', - children: [ - Widget.Box({ - className: 'position', - children: [ - mpris.PositionLabel(player), - mpris.Slash(player), - mpris.LengthLabel(player), - ], - }), - Widget.Box({ - className: 'controls', - children: [ - mpris.ShuffleButton(player), - mpris.PreviousButton(player), - mpris.PlayPauseButton(player), - mpris.NextButton(player), - mpris.LoopButton(player), - ], - }), - mpris.PlayerIcon(player, { - symbolic: false, - hexpand: true, - halign: 'end', - }), - ], -}); - -const TextBox = player => Widget.Box({ - children: [ - mpris.CoverArt(player, { - halign: 'end', - hexpand: false, - child: Widget.Box({ - className: 'shader', - hexpand: true, - }), - }), - Widget.Box({ - hexpand: true, - vertical: true, - className: 'labels', - children: [ - mpris.TitleLabel(player, { - xalign: 0, - justification: 'left', - wrap: true, - }), - mpris.ArtistLabel(player, { - xalign: 0, - justification: 'left', - wrap: true, - }), - ], - }), - ], -}); - -const PlayerBox = player => Widget.Box({ - className: `player ${player.name}`, - child: mpris.BlurredCoverArt(player, { - className: 'cover-art-bg', - hexpand: true, - child: Widget.Box({ - className: 'shader', - hexpand: true, - vertical: true, - children: [ - TextBox(player), - mpris.PositionSlider(player), - Footer(player), - ], - }), - }), -}); - -export default () => Widget.Box({ - vertical: true, - className: 'media', - binds: [['children', Mpris, 'players', ps => - ps.filter(p => !blackList.includes(p.identity)).map(PlayerBox)]], -}); diff --git a/config/ags/js/quicksettings/widgets/MicMute.js b/config/ags/js/quicksettings/widgets/MicMute.js deleted file mode 100644 index 0a807750..00000000 --- a/config/ags/js/quicksettings/widgets/MicMute.js +++ /dev/null @@ -1,15 +0,0 @@ -import icons from '../../icons.js'; -import { SimpleToggleButton } from '../ToggleButton.js'; -import { Audio, Widget } from '../../imports.js'; - -export default () => SimpleToggleButton({ - icon: Widget.Icon({ - connections: [[Audio, icon => { - icon.icon = Audio.microphone?.isMuted - ? icons.audio.mic.muted - : icons.audio.mic.high; - }, 'microphone-changed']], - }), - toggle: () => Audio.microphone.isMuted = !Audio.microphone.isMuted, - connection: [Audio, () => Audio.microphone?.isMuted], -}); diff --git a/config/ags/js/quicksettings/widgets/Network.js b/config/ags/js/quicksettings/widgets/Network.js deleted file mode 100644 index 2e2c0509..00000000 --- a/config/ags/js/quicksettings/widgets/Network.js +++ /dev/null @@ -1,53 +0,0 @@ -import icons from '../../icons.js'; -import { Menu, ArrowToggleButton } from '../ToggleButton.js'; -import { Network, Widget } from '../../imports.js'; - -export const NetworkToggle = () => ArrowToggleButton({ - name: 'network', - icon: Widget.Icon({ - connections: [[Network, icon => { - icon.icon = Network.wifi?.iconName || ''; - }]], - }), - label: Widget.Label({ - truncate: 'end', - connections: [[Network, label => { - label.label = Network.wifi?.ssid || 'Not Connected'; - }]], - }), - connection: [Network, () => Network.wifi?.enabled], - deactivate: () => Network.wifi.enabled = false, - activate: () => { - Network.wifi.enabled = true; - Network.wifi.scan(); - }, -}); - -export const WifiSelection = () => Menu({ - name: 'network', - icon: Widget.Icon({ - connections: [[Network, icon => { - icon.icon = Network.wifi?.iconName; - }]], - }), - title: Widget.Label('Wifi Selection'), - content: Widget.Box({ - vertical: true, - connections: [[Network, box => box.children = - Network.wifi?.accessPoints.map(ap => Widget.Button({ - onClicked: `nmcli device wifi connect ${ap.bssid}`, - child: Widget.Box({ - children: [ - Widget.Icon(ap.iconName), - Widget.Label(ap.ssid), - ap.active && Widget.Icon({ - icon: icons.tick, - hexpand: true, - halign: 'end', - }), - ], - }), - })), - ]], - }), -}); diff --git a/config/ags/js/quicksettings/widgets/Theme.js b/config/ags/js/quicksettings/widgets/Theme.js deleted file mode 100644 index ce191460..00000000 --- a/config/ags/js/quicksettings/widgets/Theme.js +++ /dev/null @@ -1,68 +0,0 @@ -import Theme from '../../services/theme/theme.js'; -import { ArrowToggleButton, Menu, opened } from '../ToggleButton.js'; -import themes from '../../themes.js'; -import icons from '../../icons.js'; -import Separator from '../../misc/Separator.js'; -import { Widget } from '../../imports.js'; - -const prettyName = name => name - .split('_') - .map(word => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - -const ThemeIcon = () => Widget.Stack({ - transition: 'crossfade', - items: themes.map(({ name, icon }) => [name, Widget.Label(icon)]), - connections: [[Theme, stack => stack.shown = Theme.getSetting('theme')]], -}); - -export const ThemeToggle = () => ArrowToggleButton({ - name: 'theme', - icon: ThemeIcon(), - label: Widget.Label({ - connections: [[Theme, label => { - label.label = prettyName(Theme.getSetting('theme')); - }]], - }), - connection: [opened, () => opened.value === 'theme'], - activate: () => opened.setValue('theme'), - activateOnArrow: false, - deactivate: () => { }, -}); - -export const ThemeSelector = () => Menu({ - name: 'theme', - icon: ThemeIcon(), - title: Widget.Label('Theme Selector'), - content: Widget.Box({ - vertical: true, - children: themes.map(({ name, icon }) => Widget.Button({ - onClicked: () => Theme.setSetting('theme', name), - child: Widget.Box({ - children: [ - Widget.Label(icon), - Widget.Label(prettyName(name)), - Widget.Icon({ - icon: icons.tick, - hexpand: true, - halign: 'end', - connections: [[Theme, icon => { - icon.visible = Theme.getSetting('theme') === name; - }]], - }), - ], - }), - })).concat([ - Separator({ orientation: 'horizontal' }), - Widget.Button({ - onClicked: () => Theme.openSettings(), - child: Widget.Box({ - children: [ - Widget.Icon(icons.settings), - Widget.Label('Theme Settings'), - ], - }), - }), - ]), - }), -}); diff --git a/config/ags/js/quicksettings/widgets/Volume.js b/config/ags/js/quicksettings/widgets/Volume.js deleted file mode 100644 index ab1ef50f..00000000 --- a/config/ags/js/quicksettings/widgets/Volume.js +++ /dev/null @@ -1,166 +0,0 @@ -import icons from '../../icons.js'; -import FontIcon from '../../misc/FontIcon.js'; -import Separator from '../../misc/Separator.js'; -import { getAudioTypeIcon } from '../../utils.js'; -import { Arrow } from '../ToggleButton.js'; -import { Menu } from '../ToggleButton.js'; -import { Audio, Widget, Utils } from '../../imports.js'; - -const VolumeIndicator = (type = 'speaker') => Widget.Button({ - onClicked: () => Audio[type].isMuted = !Audio[type].isMuted, - child: Widget.Icon({ - connections: [[Audio, icon => { - if (!Audio[type]) - return; - - icon.icon = type === 'speaker' - ? getAudioTypeIcon(Audio[type].iconName) - : icons.audio.mic.high; - - icon.tooltipText = `Volume ${Math.floor(Audio[type].volume * 100)}%`; - }, `${type}-changed`]], - }), -}); - -const VolumeSlider = (type = 'speaker') => Widget.Slider({ - hexpand: true, - drawValue: false, - onChange: ({ value }) => Audio[type].volume = value, - connections: [[Audio, slider => { - slider.value = Audio[type]?.volume; - }, `${type}-changed`]], -}); - -export const Volume = () => Widget.Box({ - className: 'slider', - children: [ - VolumeIndicator('speaker'), - VolumeSlider('speaker'), - Arrow('sink-selector'), - Widget.Box({ - child: Arrow('app-mixer'), - connections: [[Audio, box => { - box.visible = Audio.apps.length > 0; - }]], - }), - ], -}); - -export const Microhone = () => Widget.Box({ - className: 'slider', - binds: [['visible', Audio, 'recorders', r => r.length > 0]], - children: [ - VolumeIndicator('microphone'), - VolumeSlider('microphone'), - ], -}); - -const MixerItem = stream => Widget.Box({ - hexpand: true, - className: 'mixer-item', - children: [ - Widget.Icon({ - binds: [['tooltipText', stream, 'name']], - connections: [[stream, icon => { - icon.icon = Utils.lookUpIcon(stream.name) - ? stream.name - : icons.mpris.fallback; - }]], - }), - Widget.Box({ - children: [ - Widget.Box({ - vertical: true, - children: [ - Widget.Label({ - xalign: 0, - truncate: 'end', - binds: [['label', stream, 'description']], - }), - Widget.Slider({ - hexpand: true, - drawValue: false, - binds: [['value', stream, 'volume']], - onChange: ({ value }) => stream.volume = value, - }), - ], - }), - Widget.Label({ - xalign: 1, - connections: [[stream, l => { - l.label = `${Math.floor(stream.volume * 100)}%`; - }]], - }), - ], - }), - ], -}); - -const SinkItem = stream => Widget.Button({ - hexpand: true, - onClicked: () => Audio.speaker = stream, - child: Widget.Box({ - children: [ - Widget.Icon({ - icon: getAudioTypeIcon(stream.iconName), - tooltipText: stream.iconName, - }), - Widget.Label(stream.description.split(' ').slice(0, 4).join(' ')), - Widget.Icon({ - icon: icons.tick, - hexpand: true, - halign: 'end', - connections: [['draw', icon => { - icon.visible = Audio.speaker === stream; - }]], - }), - ], - }), -}); - -const SettingsButton = () => Widget.Button({ - onClicked: 'pavucontrol', - hexpand: true, - child: Widget.Box({ - children: [ - Widget.Icon(icons.settings), - Widget.Label('Settings'), - ], - }), -}); - -export const AppMixer = () => Menu({ - name: 'app-mixer', - icon: FontIcon(icons.audio.mixer), - title: Widget.Label('App Mixer'), - content: Widget.Box({ - className: 'app-mixer', - vertical: true, - children: [ - Widget.Box({ - vertical: true, - binds: [['children', Audio, 'apps', a => a.map(MixerItem)]], - }), - Separator({ orientation: 'horizontal' }), - SettingsButton(), - ], - }), -}); - -export const SinkSelector = () => Menu({ - name: 'sink-selector', - icon: Widget.Icon(icons.audio.type.headset), - title: Widget.Label('Sink Selector'), - content: Widget.Box({ - className: 'sink-selector', - vertical: true, - children: [ - Widget.Box({ - vertical: true, - binds: [['children', Audio, 'speakers', s => s.map(SinkItem)]], - }), - Separator({ orientation: 'horizontal' }), - SettingsButton(), - ], - }), -}); diff --git a/config/ags/js/screencorner/ScreenCorners.js b/config/ags/js/screencorner/ScreenCorners.js deleted file mode 100644 index fe679018..00000000 --- a/config/ags/js/screencorner/ScreenCorners.js +++ /dev/null @@ -1,68 +0,0 @@ -import Gtk from 'gi://Gtk'; -import Theme from '../services/theme/theme.js'; -import { Widget } from '../imports.js'; - -const Corner = place => Widget({ - type: Gtk.DrawingArea, - className: 'corner', - hexpand: true, - vexpand: true, - halign: place.includes('left') ? 'start' : 'end', - valign: place.includes('top') ? 'start' : 'end', - connections: [[Theme, self => { - const r = Theme.getSetting('radii') * 2; - self.set_size_request(r, r); - }]], - setup: self => self.connect('draw', (self, cr) => { - const context = self.get_style_context(); - const c = context.get_property('background-color', Gtk.StateFlags.NORMAL); - const r = context.get_property('border-radius', Gtk.StateFlags.NORMAL); - - switch (place) { - case 'topleft': - cr.arc(r, r, r, Math.PI, 3 * Math.PI / 2); - cr.lineTo(0, 0); - break; - - case 'topright': - cr.arc(0, r, r, 3 * Math.PI / 2, 2 * Math.PI); - cr.lineTo(r, 0); - break; - - case 'bottomleft': - cr.arc(r, 0, r, Math.PI / 2, Math.PI); - cr.lineTo(0, r); - break; - - case 'bottomright': - cr.arc(0, 0, r, 0, Math.PI / 2); - cr.lineTo(r, r); - break; - } - - cr.closePath(); - cr.setSourceRGBA(c.red, c.green, c.blue, c.alpha); - cr.fill(); - }), -}); - -const places = ['topleft', 'topright', 'bottomleft', 'bottomright']; -export default monitor => places.map(place => Widget.Window({ - name: `corner${monitor}${place}`, - monitor, - className: 'corner', - anchor: [place.includes('top') ? 'top' : 'bottom', place.includes('right') ? 'right' : 'left'], - child: Widget.Box({ - children: [ - place.includes('right') && Widget.Label({ - label: 'for some reason single chidren sometimes dont render', - style: 'color: transparent;', - }), - Corner(place), - place.includes('left') && Widget.Label({ - label: 'for some reason single chidren sometimes dont render', - style: 'color: transparent;', - }), - ], - }), -})); diff --git a/config/ags/js/services/asusctl.js b/config/ags/js/services/asusctl.js deleted file mode 100644 index 23593140..00000000 --- a/config/ags/js/services/asusctl.js +++ /dev/null @@ -1,56 +0,0 @@ -import { Service, Utils } from '../imports.js'; - -class Asusctl extends Service { - static { - Service.register(this, {}, { - 'profile': ['string', 'r'], - 'mode': ['string', 'r'], - }); - } - - nextProfile() { - Utils.execAsync('asusctl profile -n') - .then(() => { - this._profile = Utils.exec('asusctl profile -p').split(' ')[3]; - this.changed('profile'); - }) - .catch(console.error); - } - - setProfile(prof) { - Utils.execAsync(`asusctl profile --profile-set ${prof}`) - .then(() => { - this._profile = prof; - this.changed('profile'); - }) - .catch(console.error); - } - - nextMode() { - Utils.execAsync(`supergfxctl -m ${this._mode === 'Hybrid' ? 'Integrated' : 'Hybrid'}`) - .then(() => { - this._mode = Utils.exec('supergfxctl -g'); - this.changed('profile'); - }) - .catch(console.error); - } - - constructor() { - super(); - - if (Utils.exec('which asusctl')) { - this.available = true; - this._profile = Utils.exec('asusctl profile -p').split(' ')[3]; - Utils.execAsync('supergfxctl -g').then(mode => this._mode = mode); - } - else { - this.available = false; - } - } - - get profiles() { return ['Performance', 'Balanced', 'Quiet']; } - get profile() { return this._profile; } - get mode() { return this._mode || 'Hybrid'; } -} - -export default new Asusctl(); diff --git a/config/ags/js/services/brightness.js b/config/ags/js/services/brightness.js deleted file mode 100644 index a7c0cbc9..00000000 --- a/config/ags/js/services/brightness.js +++ /dev/null @@ -1,58 +0,0 @@ -import { Service, Utils } from '../imports.js'; -import options from '../options.js'; -const KBD = options.brightnessctlKBD; - -class Brightness extends Service { - static { - Service.register(this, {}, { - 'screen': ['float', 'rw'], - 'kbd': ['int', 'rw'], - }); - } - - _kbd = 0; - _screen = 0; - - get kbd() { return this._kbd; } - get screen() { return this._screen; } - - set kbd(value) { - if (value < 0 || value > this._kbdMax) - return; - - Utils.execAsync(`brightnessctl -d ${KBD} s ${value} -q`) - .then(() => { - this._kbd = value; - this.changed('kbd'); - }) - .catch(console.error); - } - - set screen(percent) { - if (percent < 0) - percent = 0; - - if (percent > 1) - percent = 1; - - Utils.execAsync(`brightnessctl s ${percent * 100}% -q`) - .then(() => { - this._screen = percent; - this.changed('screen'); - }) - .catch(console.error); - } - - constructor() { - super(); - try { - this._kbd = Number(Utils.exec(`brightnessctl -d ${KBD} g`)); - this._kbdMax = Number(Utils.exec(`brightnessctl -d ${KBD} m`)); - this._screen = Number(Utils.exec('brightnessctl g')) / Number(Utils.exec('brightnessctl m')); - } catch (error) { - console.error('missing dependancy: brightnessctl'); - } - } -} - -export default new Brightness(); diff --git a/config/ags/js/services/lockscreen.js b/config/ags/js/services/lockscreen.js deleted file mode 100644 index b187092f..00000000 --- a/config/ags/js/services/lockscreen.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Service, Utils, App } from '../imports.js'; -const authpy = App.configDir + '/js/lockscreen/auth.py'; - -class Lockscreen extends Service { - static { - Service.register(this, { - 'lock': ['boolean'], - 'authenticating': ['boolean'], - }); - } - - lockscreen() { this.emit('lock', true); } - - auth(password) { - this.emit('authenticating', true); - Utils.execAsync([authpy, password]) - .then(out => { - this.emit('lock', out !== 'True'); - this.emit('authenticating', false); - }) - .catch(console.error); - } -} - -export default new Lockscreen(); diff --git a/config/ags/js/services/onScreenIndicator.js b/config/ags/js/services/onScreenIndicator.js deleted file mode 100644 index 3091b90b..00000000 --- a/config/ags/js/services/onScreenIndicator.js +++ /dev/null @@ -1,59 +0,0 @@ -import { Service, Utils } from '../imports.js'; -import icons from '../icons.js'; -import { getAudioTypeIcon } from '../utils.js'; -import { Audio } from '../imports.js'; -import Brightness from './brightness.js'; - -class Indicator extends Service { - static { - Service.register(this, { - 'popup': ['double', 'string'], - }); - } - - _delay = 1500; - _count = 0; - - popup(value, icon) { - this.emit('popup', value, icon); - this._count++; - Utils.timeout(this._delay, () => { - this._count--; - - if (this._count === 0) - this.emit('popup', -1, icon); - }); - } - - speaker() { - this.popup( - Audio.speaker.volume, - getAudioTypeIcon(Audio.speaker.iconName), - ); - } - - display() { - // brightness is async, so lets wait a bit - Utils.timeout(10, () => this.popup( - Brightness.screen, - icons.brightness.screen)); - } - - kbd() { - // brightness is async, so lets wait a bit - Utils.timeout(10, () => this.popup( - (Brightness.kbd * 33 + 1) / 100, - icons.brightness.keyboard)); - } - - connect(event = 'popup', callback) { - return super.connect(event, callback); - } - - // TODO remove - connectWidget(widget, callback) { - Utils.connect(this, widget, callback, 'popup'); - } -} - -export default new Indicator(); diff --git a/config/ags/js/services/powermenu.js b/config/ags/js/services/powermenu.js deleted file mode 100644 index 806a4e40..00000000 --- a/config/ags/js/services/powermenu.js +++ /dev/null @@ -1,30 +0,0 @@ -import { App, Service } from '../imports.js'; - -class PowerMenu extends Service { - static { - Service.register(this, {}, { - 'title': ['string'], - 'cmd': ['string'], - }); - } - - get title() { return this._title || ''; } - get cmd() { return this._cmd || ''; } - - action(action) { - [this._cmd, this._title] = { - 'sleep': ['systemctl suspend', 'Sleep'], - 'reboot': ['systemctl reboot', 'Reboot'], - 'logout': ['pkill Hyprland', 'Log Out'], - 'shutdown': ['shutdown now', 'Shutdown'], - }[action]; - - this.notify('cmd'); - this.notify('title'); - this.emit('changed'); - App.closeWindow('powermenu'); - App.openWindow('verification'); - } -} - -export default new PowerMenu(); diff --git a/config/ags/js/services/screenrecord.js b/config/ags/js/services/screenrecord.js deleted file mode 100644 index 3adfca27..00000000 --- a/config/ags/js/services/screenrecord.js +++ /dev/null @@ -1,102 +0,0 @@ -import { Service, Utils, App } from '../imports.js'; -import GLib from 'gi://GLib'; -const now = () => GLib.DateTime.new_now_local().format('%Y-%m-%d_%H-%M-%S'); - -class Recorder extends Service { - static { - Service.register(this, {}, { - 'timer': ['int'], - 'recording': ['boolean'], - }); - } - - _path = GLib.get_home_dir() + '/Videos/Screencasting'; - _screenshotting = false; - recording = false; - timer = 0; - - start() { - if (this.recording) - return; - - Utils.execAsync('slurp') - .then(area => { - Utils.ensureDirectory(this._path); - this._file = `${this._path}/${now()}.mp4`; - Utils.execAsync(['wf-recorder', '-g', area, '-f', this._file]); - this.recording = true; - this.changed('recording'); - - this.timer = 0; - this._interval = Utils.interval(1000, () => { - this.changed('timer'); - this.timer++; - }); - }) - .catch(err => console.error(err)); - } - - stop() { - if (!this.recording) - return; - - Utils.execAsync('killall -INT wf-recorder'); - this.recording = false; - this.changed('recording'); - GLib.source_remove(this._interval); - Utils.execAsync([ - 'notify-send', - '-A', 'files=Show in Files', - '-A', 'view=View', - '-i', 'video-x-generic-symbolic', - 'Screenrecord', - this._file, - ]) - .then(res => { - if (res === 'files') - Utils.execAsync('xdg-open ' + this._path); - - if (res === 'view') - Utils.execAsync('xdg-open ' + this._file); - }) - .catch(err => console.error(err)); - } - - async screenshot(full = false) { - try { - const area = full ? null : await Utils.execAsync('slurp'); - const path = GLib.get_home_dir() + '/Pictures/Screenshots'; - const file = `${path}/${now()}.png`; - Utils.ensureDirectory(path); - - area ? await Utils.execAsync(['wayshot', '-s', area, '-f', file]) - : await Utils.execAsync(['wayshot', '-f', file]); - - Utils.execAsync(['bash', '-c', `wl-copy < ${file}`]); - - const res = await Utils.execAsync([ - 'notify-send', - '-A', 'files=Show in Files', - '-A', 'view=View', - '-A', 'edit=Edit', - '-i', file, - 'Screenshot', - file, - ]); - if (res === 'files') - Utils.execAsync('xdg-open ' + path); - - if (res === 'view') - Utils.execAsync('xdg-open ' + file); - - if (res === 'edit') - Utils.execAsync(['swappy', '-f', file]); - - App.closeWindow('dashboard'); - } catch (error) { - console.error(error); - } - } -} - -export default new Recorder(); diff --git a/config/ags/js/services/theme/hyprland.js b/config/ags/js/services/theme/hyprland.js deleted file mode 100644 index 832b101c..00000000 --- a/config/ags/js/services/theme/hyprland.js +++ /dev/null @@ -1,57 +0,0 @@ -import { App, Utils } from '../../imports.js'; - -const noAlphaignore = ['verification', 'powermenu', 'lockscreen']; - -export default function({ - wm_gaps, - border_width, - hypr_active_border, - hypr_inactive_border, - radii, - drop_shadow, - bar_style, - layout, -}) { - try { - App.connect('config-parsed', () => { - for (const [name] of App.windows) { - Utils.execAsync(['hyprctl', 'keyword', 'layerrule', `unset, ${name}`]).then(() => { - Utils.execAsync(['hyprctl', 'keyword', 'layerrule', `blur, ${name}`]); - if (!noAlphaignore.every(skip => !name.includes(skip))) - return; - - Utils.execAsync(['hyprctl', 'keyword', 'layerrule', `ignorealpha 0.6, ${name}`]); - }); - } - }); - - JSON.parse(Utils.exec('hyprctl -j monitors')).forEach(({ name }) => { - if (bar_style !== 'normal') { - switch (layout) { - case 'topbar': - case 'unity': - Utils.execAsync(`hyprctl keyword monitor ${name},addreserved,-${wm_gaps},0,0,0`); - break; - - case 'bottombar': - Utils.execAsync(`hyprctl keyword monitor ${name},addreserved,0,-${wm_gaps},0,0`); - break; - - default: break; - } - } else { - Utils.execAsync(`hyprctl keyword monitor ${name},addreserved,0,0,0,0`); - } - }); - - Utils.execAsync(`hyprctl keyword general:border_size ${border_width}`); - Utils.execAsync(`hyprctl keyword general:gaps_out ${wm_gaps}`); - Utils.execAsync(`hyprctl keyword general:gaps_in ${wm_gaps / 2}`); - Utils.execAsync(`hyprctl keyword general:col.active_border ${hypr_active_border}`); - Utils.execAsync(`hyprctl keyword general:col.inactive_border ${hypr_inactive_border}`); - Utils.execAsync(`hyprctl keyword decoration:rounding ${radii}`); - Utils.execAsync(`hyprctl keyword decoration:drop_shadow ${drop_shadow ? 'yes' : 'no'}`); - } catch (error) { - console.error(error); - } -} diff --git a/config/ags/js/services/theme/scss.js b/config/ags/js/services/theme/scss.js deleted file mode 100644 index 2233e4c4..00000000 --- a/config/ags/js/services/theme/scss.js +++ /dev/null @@ -1,68 +0,0 @@ -import { Utils, App } from '../../imports.js'; - -const generated = str => `// THIS FILE IS GENERATED -${str}`; - -const scss = t => `$theme: '${t.color_scheme}'; - -$red: ${t.red}; -$green: ${t.green}; -$yellow: ${t.yellow}; -$blue: ${t.blue}; -$magenta: ${t.magenta}; -$teal: ${t.teal}; -$orange: ${t.orange}; - -$bg_color: ${t.bg_color}; -$fg_color: ${t.fg_color}; -$hover_fg: ${t.hover_fg}; - -$wm_gaps: ${t.wm_gaps}px; -$radii: ${t.radii}px; -$spacing: ${t.spacing}px; - -$accent: ${t.accent}; -$accent_fg: ${t.accent_fg}; - -$hover: transparentize(${t.widget_bg}, ${Math.max((t.widget_opacity * 0.90) / 100, 0)}); -$widget_bg: transparentize(${t.widget_bg}, ${t.widget_opacity / 100}); -$active_gradient: linear-gradient(${t.active_gradient}); - -$border_color: transparentize(${t.border_color}, ${t.border_opacity / 100}); -$border_width: ${t.border_width}px; -$border: $border_width solid $border_color; - -$shadow: ${t.shadow}; -$text_shadow: 2px 2px 2px $shadow; -$icon_shadow: 2px 2px $shadow; - -$popover_radius: ${t.radii * 1.7}px; -$popover_border_color: transparentize(${t.border_color}, ${Math.max((t.border_opacity - 1) / 100, 0)}); -$popover_padding: ${t.spacing * 1.8}px; -$drop_shadow: ${t.drop_shadow}; - -$transition: ${t.transition}ms; - -$font_size: ${t.font_size}px; -$font: '${t.font}'; -$mono_font: '${t.mono_font}', monospace; -$wallpaper_fg: ${t.wallpaper_fg}; -$shader_fg: white; - -$screen_corners: ${t.bar_style === 'normal' && t.screen_corners}; -$bar_style: ${t.bar_style}; -$layout: ${t.layout};`; - -export default async function(theme) { - const tmp = '/tmp/ags/scss'; - Utils.ensureDirectory(tmp); - try { - await Utils.writeFile(generated(scss(theme)), `${tmp}/generated.scss`); - await Utils.writeFile(generated(theme.additional_scss || ''), `${tmp}/additional.scss`); - Utils.exec(`sassc ${App.configDir}/scss/main.scss ${tmp}/style.css`); - App.resetCss(); - App.applyCss(`${tmp}/style.css`); - } catch (error) { - console.error(error.message); - } -} diff --git a/config/ags/js/services/theme/theme.js b/config/ags/js/services/theme/theme.js deleted file mode 100755 index ab56e489..00000000 --- a/config/ags/js/services/theme/theme.js +++ /dev/null @@ -1,131 +0,0 @@ -import themes from '../../themes.js'; -import setupScss from './scss.js'; -import setupHyprland from './hyprland.js'; -import SettingsDialog from '../../settingsdialog/SettingsDialog.js'; -import IconBrowser from '../../misc/IconBrowser.js'; -import { Service, Utils } from '../../imports.js'; - -const THEME_CACHE = Utils.CACHE_DIR + '/theme-overrides.json'; - -class ThemeService extends Service { - static { Service.register(this); } - - get themes() { return themes; } - - _defaultAvatar = `/home/${Utils.USER}/Pictures/avatars/donna.jpg`; - _defaultTheme = themes[0].name; - - constructor() { - super(); - try { - Utils.exec('swww init'); - } catch (error) { - print('missing dependancy: swww'); - } - this.setup(); - } - - openSettings() { - if (!this._dialog) - this._dialog = SettingsDialog(); - - this._dialog.hide(); - this._dialog.present(); - } - - iconBrowser() { - IconBrowser(); - } - - getTheme() { - return themes.find(({ name }) => name === this.getSetting('theme')); - } - - setup() { - const theme = { - ...this.getTheme(), - ...this.settings, - }; - setupScss(theme); - setupHyprland(theme); - this.setupOther(); - this.setupWallpaper(); - } - - reset() { - Utils.exec(`rm ${THEME_CACHE}`); - this._settings = null; - this.setup(); - this.emit('changed'); - } - - setupOther() { - const darkmode = this.getSetting('color_scheme') === 'dark'; - - if (Utils.exec('which gsettings')) { - const gsettings = 'gsettings set org.gnome.desktop.interface color-scheme'; - Utils.execAsync(`${gsettings} "prefer-${darkmode ? 'dark' : 'light'}"`); - } - - if (Utils.exec('which tmux')) { - const color = c => this.getSetting(c).replace('$', ''); - Utils.execAsync(`tmux set @main_accent ${color('accent')}`); - } - } - - setupWallpaper() { - Utils.execAsync([ - 'swww', 'img', - '--transition-type', 'grow', - '--transition-pos', Utils.exec('hyprctl cursorpos').replace(' ', ''), - this.getSetting('wallpaper'), - ]).catch(err => console.error(err)); - } - - get settings() { - if (this._settings) - return this._settings; - - try { - this._settings = JSON.parse(Utils.readFile(THEME_CACHE)); - } catch (_) { - this._settings = {}; - } - - return this._settings; - } - - setSetting(prop, value) { - const settings = this.settings; - settings[prop] = value; - Utils.writeFile(JSON.stringify(settings, null, 2), THEME_CACHE) - .catch(err => console.error(err)); - - this._settings = settings; - this.emit('changed'); - - if (prop === 'layout') { - if (!this._notiSent) { - this._notiSent = true; - Utils.execAsync(['notify-send', 'Layout Change Needs a Reload']); - } - return; - } - - this.setup(); - } - - getSetting(prop) { - if (prop === 'theme') - return this.settings.theme || this._defaultTheme; - - if (prop === 'avatar') - return this.settings.avatar || this._defaultAvatar; - - return this.settings[prop] !== undefined - ? this.settings[prop] - : this.getTheme()[prop]; - } -} - -export default new ThemeService(); diff --git a/config/ags/js/settingsdialog/SettingsDialog.js b/config/ags/js/settingsdialog/SettingsDialog.js deleted file mode 100644 index 18464db0..00000000 --- a/config/ags/js/settingsdialog/SettingsDialog.js +++ /dev/null @@ -1,252 +0,0 @@ -import Gtk from 'gi://Gtk'; -import Theme from '../services/theme/theme.js'; -import themes from '../themes.js'; -import Wallpaper from '../misc/Wallpaper.js'; -import { Widget, Variable } from '../imports.js'; - -const Row = (title, child) => Widget.Box({ - className: 'row', - children: [Widget.Label(`${title}: `), child], -}); - -const Img = (title, prop) => Row(title, Widget({ - title, - type: Gtk.FileChooserButton, - hexpand: true, - halign: 'end', - connections: [['selection-changed', - w => Theme.setSetting(prop, w.get_uri().replace('file://', ''))]], -})); - -const SpinButton = (title, prop, max = 100, min = 0) => Row(title, Widget({ - type: Gtk.SpinButton, - setup: w => { - w.set_range(min, max); - w.set_increments(1, 1); - }, - hexpand: true, - halign: 'end', - connections: [ - ['value-changed', b => !b._block && Theme.setSetting(prop, b.value)], - [Theme, b => { - b._block = true; - b.value = Theme.getSetting(prop); - b._block = false; - }], - ], -})); - -const SwitchButton = (title, prop) => Row(title, Widget({ - type: Gtk.Switch, - halign: 'end', - hexpand: true, - connections: [ - [Theme, s => { - s._block = true; - s.active = Theme.getSetting(prop); - s._block = false; - }], - ['notify::active', s => !s._block && Theme.setSetting(prop, s.active)], - ], -})); - -const Color = (title, prop) => Row(title, Widget.Box({ - hexpand: true, - halign: 'end', - className: 'color', - children: [ - Widget.Entry({ - onAccept: ({ text }) => Theme.setSetting(prop, text), - valign: 'center', - connections: [[Theme, w => w.text = Theme.getSetting(prop)]], - }), - Widget({ - type: Gtk.ColorButton, - alpha: true, - valign: 'center', - connections: [ - ['color-set', w => { - w.get_parent().children[0].set_text(w.rgba.to_string()); - Theme.setSetting(prop, w.rgba.to_string()); - }], - ], - }), - ], -})); - -const Text = (title, prop) => Row(title, Widget.Entry({ - className: 'text', - hexpand: true, - halign: 'end', - connections: [[Theme, w => w.text = Theme.getSetting(prop)]], - onAccept: ({ text }) => Theme.setSetting(prop, text), -})); - -const TextSpinButton = (title, prop, list) => Row(title, Widget.Box({ - className: 'text-spin', - hexpand: true, - halign: 'end', - properties: [ - ['values', list], - ['step', (box, step) => { - const label = box.get_children()[0]; - const max = box._values.length - 1; - let index = box._values.indexOf(label.label) + step; - - if (index > max) - index = 0; - - if (index < 0) - index = max; - - const value = box._values[index]; - label.label = value; - Theme.setSetting(prop, value); - }], - ], - children: [ - Widget.Label({ - connections: [[Theme, label => label.label = Theme.getSetting(prop)]], - }), - Widget.Button({ - child: Widget.Icon('pan-down-symbolic'), - onClicked: btn => { - const box = btn.get_parent(); - box._step(box, -1); - }, - }), - Widget.Button({ - child: Widget.Icon('pan-up-symbolic'), - onClicked: btn => { - const box = btn.get_parent(); - box._step(box, +1); - }, - }), - ], -})); - -const FontButton = (title, prop) => Row(title, Widget({ - type: Gtk.FontButton, - hexpand: true, - halign: 'end', - useSize: false, - showSize: false, - fontName: Theme.getSetting(prop), - connections: [['font-set', ({ fontName }) => { - Theme.setSetting(prop, fontName); - }]], -})); - -const page = Variable('󰒓 General'); -const showPage = p => page.value = p; - -const Tab = name => Widget.Button({ - hexpand: true, - className: 'tab', - onClicked: () => showPage(name), - child: Widget.Label(name), - connections: [[page, b => b.toggleClassName('active', page.value === name)]], -}); - -const Layout = pages => Widget.Box({ - vertical: true, - className: 'settings', - hexpand: false, - children: [ - Widget.Box({ - className: 'headerbar', - valign: 'start', - child: Widget.Box({ - className: 'tabs', - children: [ - ...Object.keys(pages).map(page => Tab(page)), - Widget.Button({ - className: 'tab', - onClicked: () => Theme.reset(), - child: Widget.Label('󰦛 Reset'), - hexpand: true, - }), - ], - }), - }), - Widget.Box({ - className: 'content', - child: Widget.Stack({ - transition: 'slide_left_right', - items: Object.keys(pages).map(page => [page, pages[page]]), - binds: [['shown', page]], - }), - }), - Widget.Label({ - wrap: true, - className: 'disclaimer', - label: 'These settings override all preset themes. ' + - 'To make them permanent: edit ~/.config/ags/theme/themes.js', - }), - ], -}); - -const Page = children => Widget.Scrollable({ - child: Widget.Box({ - vertical: true, - children, - }), -}); - -export default () => Widget({ - type: Gtk.Window, - name: 'settings', - child: Layout({ - '󰒓 General': Page([ - Wallpaper({ - className: 'row', - hexpand: true, - vexpand: true, - }), - Img('Wallpaper', 'wallpaper'), - Img('Avatar', 'avatar'), - SpinButton('Useless Gaps', 'wm_gaps', 128), - SpinButton('Spacing', 'spacing', 18), - SpinButton('Roundness', 'radii', 36), - // TextSpinButton('Layout', 'layout', ['topbar', 'bottombar']), - TextSpinButton('Bar Style', 'bar_style', ['normal', 'floating', 'separated']), - SwitchButton('Screen Corners', 'screen_corners'), - ]), - '󰏘 Colors': Page([ - TextSpinButton('Color Theme', 'color_scheme', ['light', 'dark']), - ...['Red', 'Green', 'Yellow', 'Blue', 'Magenta', 'Teal', 'Orange'] - .map(c => Color(c, c.toLowerCase())), - ]), - '󰃟 Theme': Page([ - TextSpinButton('Theme', 'theme', themes.map(t => t.name)), - Color('Background Color', 'bg_color'), - Color('Foreground Color', 'fg_color'), - Color('Hovered Foreground Color', 'hover_fg'), - Text('Hyprland Active Border Color', 'hypr_active_border'), - Text('Hyprland Inactive Border Color', 'hypr_inactive_border'), - Color('Accent Color', 'accent'), - Color('Accent Foreground', 'accent_fg'), - Text('Active Gradient', 'active_gradient'), - Color('Widget Background', 'widget_bg'), - SpinButton('Widget Opacity', 'widget_opacity'), - Color('Border Color', 'border_color'), - SpinButton('Border Width', 'border_width'), - SpinButton('Border Opacity', 'border_opacity'), - ]), - '󰠱 Miscellaneous': Page([ - Color('Shadow', 'shadow'), - SwitchButton('Drop Shadow', 'drop_shadow'), - SpinButton('Transition', 'transition', 1000), - Text('Desktop Clock Position', 'desktop_clock'), - Color('Wallpaper Foreground Color', 'wallpaper_fg'), - FontButton('Font', 'font'), - FontButton('Mono Font', 'mono_font'), - SpinButton('Font Size', 'font_size'), - ]), - }), - connections: [['delete-event', win => { - win.hide(); - return true; - }]], - setup: win => win.set_default_size(700, 600), -}); diff --git a/config/ags/js/themes.js b/config/ags/js/themes.js deleted file mode 100644 index 18396b40..00000000 --- a/config/ags/js/themes.js +++ /dev/null @@ -1,195 +0,0 @@ -import { Utils } from './imports.js'; -const WP = `/home/${Utils.USER}/Pictures/Wallpapers/`; - -/** - * @param {Record} scheme - * @param {function(string): string} edit - * @returns {Record} - */ -const editScheme = (scheme, edit) => { - /** @type {Record} */ - const obj = {}; - Object.keys(scheme).forEach(color => { - obj[color] = edit(scheme[color]); - }); - return obj; -}; - -const gnome = { - red: '#f66151', - green: '#57e389', - yellow: '#f6d32d', - blue: '#62a0ea', - magenta: '#c061cb', - teal: '#5bc8aF', - orange: '#ffa348', -}; - -const charm = { - red: '#e55f86', - green: '#00D787', - yellow: '#EBFF71', - blue: '#51a4e7', - magenta: '#9077e7', - teal: '#51e6e6', - orange: '#E79E64', -}; - -const dark = { - color_scheme: 'dark', - bg_color: '#171717', - fg_color: '#eee', - hover_fg: '#f1f1f1', - ...charm, -}; - -const light = { - color_scheme: 'light', - bg_color: '#fffffa', - fg_color: '#141414', - hover_fg: '#0a0a0a', - ...editScheme(gnome, c => `darken(${c}, 8%)`), -}; - -const misc = { - wm_gaps: 22, - radii: 9, - spacing: 9, - shadow: 'rgba(0, 0, 0, .6)', - drop_shadow: true, - transition: 200, - screen_corners: true, - bar_style: 'normal', - layout: 'topbar', - desktop_clock: 'center center', - font: 'Ubuntu Nerd Font', - mono_font: 'Mononoki Nerd Font', - font_size: 16, -}; - -const colors = { - wallpaper_fg: 'white', - hypr_active_border: 'rgba(3f3f3fFF)', - hypr_inactive_border: 'rgba(3f3f3fDD)', - accent: '$blue', - accent_fg: '#141414', - widget_bg: '$fg_color', - widget_opacity: 94, - active_gradient: 'to right, $accent, lighten($accent, 6%)', - border_color: '$fg_color', - border_opacity: 97, - border_width: 1, -}; - -// themes -const kitty_dark = { - wallpaper: WP + 'kitty.jpeg', - name: 'kitty_dark', - icon: '󰄛', - ...dark, - ...misc, - ...colors, -}; - -const kitty_light = { - wallpaper: WP + 'kitty.jpeg', - name: 'kitty_light', - icon: '󰄛', - ...light, - ...misc, - ...colors, - widget_bg: '$accent', - widget_opacity: 84, -}; - -const leaves_dark = { - ...kitty_dark, - wallpaper: WP + 'leaves.jpg', - name: 'leaves_dark', - icon: '󰌪', - accent: '$green', - widget_opacity: 92, - active_gradient: 'to right, $accent, darken($accent, 14%)', - border_opacity: 86, - bg_color: 'transparentize(#171717, 0.3)', - hypr_active_border: 'rgba(57e389FF)', - bar_style: 'floating', - radii: 0, - wallpaper_fg: 'white', - additional_scss: ` - window#quicksettings .quicksettings { - margin-right: $wm_gaps; - } - `, -}; - -const leaves_light = { - ...leaves_dark, - ...light, - name: 'leaves_light', - accent: 'darken($green, 10%)', - bg_color: 'transparentize(#fff, 0.1)', - active_gradient: 'to right, $accent, darken($accent, 6%)', -}; - -const ivory = { - wallpaper: WP + 'ivory.png', - name: 'ivory', - icon: '󰟆', - ...light, - ...misc, - ...colors, - bg_color: '#fffff0', - bar_style: 'separated', - widget_bg: '$accent', - widget_opacity: 64, - drop_shadow: false, - border_width: 2, - border_opacity: 0, - active_gradient: 'to right, $accent, darken($accent, 6%)', - wallpaper_fg: '$bg_color', - hypr_active_border: 'rgba(111111FF)', - additional_scss: ` - window#quicksettings .quicksettings, - window#dashboard .dashboard { - margin-top: 0; - } - `, -}; - -const cutefish = { - ...kitty_dark, - wallpaper: WP + 'cutefish.jpeg', - name: 'cutefish', - icon: '󰈺', - accent: 'lighten($blue, 20%)', - active_gradient: 'to right, $accent, lighten(mix($orange, $blue, 70%), 20%)', - border_opacity: 94, - brorder_width: 2, - radii: 9, - desktop_clock: 'end end', - hypr_active_border: 'rgba(3f3f3fFF)', - bg_color: 'transparentize(#171717, 0.3)', -}; - -const cherry = { - ...kitty_dark, - wallpaper: WP + 'cherry.png', - name: 'cherry', - icon: '', - accent: '$blue', - active_gradient: 'to right, $accent, lighten(mix($magenta, $blue, 70%), 18%)', - brorder_width: 2, - radii: 13, - bg_color: 'transparentize(#171717, 0.3)', -}; - -export default [ - kitty_dark, - kitty_light, - leaves_dark, - leaves_light, - ivory, - cutefish, - cherry, -]; diff --git a/config/ags/js/utils.js b/config/ags/js/utils.js deleted file mode 100644 index 1ae68f92..00000000 --- a/config/ags/js/utils.js +++ /dev/null @@ -1,106 +0,0 @@ -import cairo from 'cairo'; -import options from './options.js'; -import icons from './icons.js'; -import Theme from './services/theme/theme.js'; -import { Utils, App, Battery, Mpris, Audio } from './imports.js'; - -/** @type {function(number, number): number[]}*/ -export function range(length, start = 1) { - return Array.from({ length }, (_, i) => i + start); -} - -/** @type {function([any], any): any}*/ -export function substitute(collection, item) { - return collection.find(([from]) => from === item)?.[1] || item; -} - -/** @type {function((id: number) => typeof Gtk.Widget): typeof Gtk.Widget[]}*/ -export function forMonitors(widget) { - const ws = JSON.parse(Utils.exec('hyprctl -j monitors')); - return ws.map((/** @type {Record} */ mon) => widget(mon.id)); -} - -/** @type {function(Gtk.Widget): cairo.ImageSurface}*/ -export function createSurfaceFromWidget(widget) { - const alloc = widget.get_allocation(); - const surface = new cairo.ImageSurface( - cairo.Format.ARGB32, - alloc.width, - alloc.height, - ); - const cr = new cairo.Context(surface); - cr.setSourceRGBA(255, 255, 255, 0); - cr.rectangle(0, 0, alloc.width, alloc.height); - cr.fill(); - widget.draw(cr); - - return surface; -} - -export function warnOnLowBattery() { - const { low } = options.battaryBar; - Battery.connect('notify::percent', () => { - if (Battery.percent === low || Battery.percent === low / 2) { - Utils.execAsync([ - 'notify-send', - `${Battery.percent}% Battery Percentage`, - '-i', icons.battery.warning, - '-u', 'critical', - ]); - } - }); -} - -/** @type {function(string): string}*/ -export function getAudioTypeIcon(icon) { - const substitues = [ - ['audio-headset-bluetooth', icons.audio.type.headset], - ['audio-card-analog-usb', icons.audio.type.speaker], - ['audio-card-analog-pci', icons.audio.type.card], - ]; - - for (const [from, to] of substitues) { - if (from === icon) - return to; - } - - return icon; -} - -export function scssWatcher() { - return Utils.subprocess( - [ - 'inotifywait', - '--recursive', - '--event', 'create,modify', - '-m', App.configDir + '/scss', - ], - () => Theme.setup(), - () => print('missing dependancy for css hotreload: inotify-tools'), - ); -} - -export function activePlayer() { - let active; - globalThis.mpris = () => active || Mpris.players[0]; - Mpris.connect('player-added', (mpris, bus) => { - mpris.getPlayer(bus)?.connect('changed', player => { - active = player; - }); - }); -} - -export async function globalServices() { - globalThis.audio = Audio; - globalThis.ags = await import('./imports.js'); - globalThis.recorder = (await import('./services/screenrecord.js')).default; - globalThis.brightness = (await import('./services/brightness.js')).default; - globalThis.indicator = (await import('./services/onScreenIndicator.js')).default; - globalThis.theme = (await import('./services/theme/theme.js')).default; -} - -/** @type {function(Applications.Application): void}*/ -export function launchApp(app) { - Utils.execAsync(`hyprctl dispatch exec ${app.executable}`); - app.frequency += 1; -} diff --git a/config/ags/js/variables.js b/config/ags/js/variables.js deleted file mode 100755 index facdf600..00000000 --- a/config/ags/js/variables.js +++ /dev/null @@ -1,55 +0,0 @@ -import GLib from 'gi://GLib'; -import options from './options.js'; -import { Variable } from './imports.js'; - -const intval = options.systemFetchInterval; - -export const uptime = Variable('', { - poll: [60_000, 'cat /proc/uptime', line => { - const uptime = Number.parseInt(line.split('.')[0]) / 60; - if (uptime > 18 * 60) - return 'Go Sleep'; - - const h = Math.floor(uptime / 60); - const s = Math.floor(uptime % 60); - return `${h}:${s < 10 ? '0' + s : s}`; - }], -}); - -export const distro = GLib.get_os_info('ID'); - -export const distroIcon = (() => { - switch (distro) { - case 'fedora': return ''; - case 'arch': return ''; - case 'nixos': return ''; - case 'debian': return ''; - case 'opensuse-tumbleweed': return ''; - case 'ubuntu': return ''; - case 'endeavouros': return ''; - default: return ''; - } -})(); - -/** @type {function([string, string]): number} */ -const divide = ([total, free]) => Number.parseInt(free) / Number.parseInt(total); - -export const cpu = Variable(0, { - poll: [intval, 'top -b -n 1', out => divide(['100', out.split('\n') - .find(line => line.includes('Cpu(s)')) - ?.split(/\s+/)[1] - .replace(',', '.') || '0'])], -}); - -export const ram = Variable(0, { - poll: [intval, 'free', out => divide(out.split('\n') - .find(line => line.includes('Mem:')) - ?.split(/\s+/) - .splice(1, 2) || ['1', '1'])], -}); - -export const temp = Variable(0, { - poll: [intval, 'cat ' + options.temperature, n => { - return Number.parseInt(n) / 100_000; - }], -}); diff --git a/config/ags/package.json b/config/ags/package.json deleted file mode 100644 index db24bcc4..00000000 --- a/config/ags/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "ags-dotfiles", - "version": "1.5.0", - "description": "My config files for AGS", - "main": "config.js", - "scripts": { - "lint": "eslint . --fix", - "stylelint": "stylelint" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Aylur/dotfiles.git" - }, - "author": "Aylur", - "bugs": { - "url": "https://github.com/Aylur/dotfiles/issues" - }, - "homepage": "https://github.com/Aylur/dotfiles#readme", - "devDependencies": { - "stylelint-config-standard-scss": "^10.0.0", - "@girs/gtk-3.0": "^3.24.39-3.2.2", - "@girs/dbusmenugtk3-0.4": "^0.4.0-3.2.0", - "@girs/gvc-1.0": "^1.0.0-3.1.0", - "@girs/nm-1.0": "^1.43.1-3.1.0", - "@typescript-eslint/eslint-plugin": "^5.33.0", - "@typescript-eslint/parser": "^5.33.0", - "eslint": "^8.44.0" - } -} diff --git a/config/ags/scss/common.scss b/config/ags/scss/common.scss deleted file mode 100644 index eb135d67..00000000 --- a/config/ags/scss/common.scss +++ /dev/null @@ -1,345 +0,0 @@ -window { - background-color: transparent; -} - -@mixin common{ - all: unset; - - * { - font-size: $font_size; - font-family: $font, sans-serif; - } -} - -@mixin widget{ - @include common; - border-radius: $radii; - color: $fg_color; - background-color: $widget_bg; - border: $border; -} - -@mixin button_focus() { - box-shadow: inset 0 0 0 $border_width $accent; - background-color: $hover; - color: $hover_fg; -} - -@mixin button_hover() { - box-shadow: inset 0 0 0 $border_width $border_color; - background-color: $hover; - color: $hover_fg; -} - -@mixin button_active() { - box-shadow: inset 0 0 0 $border_width $border_color; - background-image: $active_gradient; - background-color: $accent; - color: $accent_fg; -} - -@mixin button_disabled() { - box-shadow: none; - background-color: transparent; - color: transparentize($fg_color, 0.7); -} - -@mixin button($flat: false, $reactive: true, $radii: $radii, $focusable: true){ - @include common; - transition: $transition; - border-radius: $radii; - color: $fg_color; - - @if $flat{ - background-color: transparent; - background-image: none; - box-shadow: none; - } @else{ - background-color: $widget_bg; - box-shadow: inset 0 0 0 $border_width $border_color; - } - - @if $reactive{ - @if $focusable { - &:focus{ - @include button_focus; - } - } - - &:hover{ - @include button_hover; - } - - &:active, &.on, &.active, &:checked { - @include button_active; - - &:hover { - box-shadow: inset 0 0 0 $border_width $border_color, - inset 0 0 0 99px $hover; - } - } - } - - &:disabled { - @include button_disabled; - } -} - -@mixin accs_button($flat: false, $reactive: true){ - @include button($flat: true, $reactive: false, $focusable: false); - color: $fg_color; - - > * { - border-radius: $radii; - transition: $transition; - - @if $flat{ - background-color: transparent; - box-shadow: none; - } @else{ - background-color: $widget_bg; - box-shadow: inset 0 0 0 $border_width $border_color; - } - } - - - @if $reactive{ - &:focus > *, &.focused > * { - @include button_focus; - } - - &:hover > * { - @include button_hover; - } - - &:active, &.active, &.on, &:checked { - > * { - @include button_active; - } - - &:hover > * { - box-shadow: inset 0 0 0 $border_width $border_color, - inset 0 0 0 99px $hover; - } - } - } -} - -@mixin floating_widget { - @include common; - - @if $drop_shadow { - box-shadow: 0 0 min(6px, $spacing/2) 0 $shadow; - } - margin: max($spacing, 8px); - border: $border_width solid $popover_border_color; - border-radius: $popover_radius; - background-color: $bg_color; - color: $fg_color; - padding: $popover_padding; -} - -@mixin slider($width: .7em, $slider_width: .5em, $gradient: $active_gradient, $slider: true, $focusable: true, $radii: $radii){ - @include common; - * { all:unset; } - - trough{ - transition: $transition; - border-radius: $radii; - border: $border; - background-color: $widget_bg; - min-height: $width; - min-width: $width; - - highlight, progress{ - border-radius: max($radii - $border_width, 0); - background-image: $gradient; - min-height: $width; - min-width: $width; - } - } - - slider { - box-shadow: none; - background-color: transparent; - border: $border_width solid transparent; - transition: $transition; - border-radius: $radii; - min-height: $width; - min-width: $width; - margin: -$slider_width; - } - - &:hover { - trough { - background-color: $hover; - } - - slider { - @if $slider{ - background-color: $fg_color; - border-color: $border-color; - - @if $drop_shadow { - box-shadow: 0 0 3px 0 $shadow; - } - } - } - } - - &:disabled { - highlight, progress{ - background-color: transparentize($fg_color, 0.4); - background-image: none; - } - } - - @if $focusable { - trough:focus{ - background-color: $hover; - box-shadow: inset 0 0 0 $border_width $accent; - - slider { - @if $slider { - background-color: $fg_color; - box-shadow: inset 0 0 0 $border_width $accent; - } - } - } - - } -} - -@mixin shader($width: 3em){ - @include common; - border-radius: max($radii - $border_width, 0); - - label { - color: $shader_fg; - text-shadow: $text_shadow; - } - - @if $theme == 'dark' { - box-shadow: inset 0 0 $width $width/3 transparentize($bg_color, 0.3); - } - - @if $theme == 'light' { - background-color: transparentize($bg_color, 0.8); - } -} - -@mixin text_border{ - text-shadow: - -1 * $border_width -1 * $border_width 0 $border_color, - $border_width $border_width 0 $border_color, - -1 * $border_width $border_width 0 $border_color, - $border_width -1 * $border_width 0 $border_color; - - -gtk-icon-shadow: - -1 * $border_width -1 * $border_width 0 $border_color, - $border_width $border_width 0 $border_color, - -1 * $border_width $border_width 0 $border_color, - $border_width -1 * $border_width 0 $border_color; -} - -@mixin scrollbar{ - scrollbar, scrollbar * { - all: unset; - } - - scrollbar.vertical { - transition: $transition; - background-color: transparentize($bg_color, 0.7); - - &:hover { - background-color: transparentize($bg_color, 0.3); - - slider { - background-color: transparentize($fg_color, 0.3); - min-width: .6em; - } - } - } - - - scrollbar.vertical slider { - background-color: transparentize($fg_color, 0.5); - border-radius: $radii; - min-width: .4em; - min-height: 2em; - transition: $transition; - } -} - -@mixin switch{ - @include button; - - slider { - background-color: $fg_color; - border-radius: $radii; - min-width: 24px; - min-height: 24px; - } - - image { color: transparent; } -} - -@mixin hidden { - background-color: transparent; - background-image: none; - border-color: transparent; - box-shadow: none; - -gtk-icon-transform: scale(0); - - * { - background-color: transparent; - background-image: none; - border-color: transparent; - box-shadow: none; - -gtk-icon-transform: scale(0); - } -} - -tooltip { - @include common; - * { all: unset; } - - background-color: transparent; - border: none; - - > * > *{ - background-color: $bg_color; - border-radius: $radii; - border: $border_width solid $popover_border_color; - color: $fg_color; - padding: 8px; - margin: 4px; - box-shadow: 0 0 3px 0 $shadow; - } -} - -window.popup { - > * { - border: none; - box-shadow: none; - } - - menu { - border-radius: $popover_radius; - background-color: $bg_color; - padding: $spacing; - border: $border; - - separator { - background-color: $border_color; - } - - menuitem { - @include button; - padding: $spacing/2; - margin: $spacing/2 0; - &:first-child { margin-top: 0; } - &:last-child { margin-bottom: 0; } - } - } -} diff --git a/config/ags/scss/main.scss b/config/ags/scss/main.scss deleted file mode 100644 index c68f3539..00000000 --- a/config/ags/scss/main.scss +++ /dev/null @@ -1,15 +0,0 @@ -@import '/tmp/ags/scss/generated'; -@import './common'; -@import './widgets/notifications'; -@import './widgets/media'; -@import './widgets/dock'; -@import './widgets/applauncher'; -@import './widgets/quicksettings'; -@import './widgets/powermenu'; -@import './widgets/overview'; -@import './widgets/desktop'; -@import './widgets/dashboard'; -@import './widgets/bar'; -@import './widgets/settings'; -@import './widgets/lockscreen'; -@import '/tmp/ags/scss/additional'; diff --git a/config/ags/scss/widgets/applauncher.scss b/config/ags/scss/widgets/applauncher.scss deleted file mode 100644 index 3ac8226f..00000000 --- a/config/ags/scss/widgets/applauncher.scss +++ /dev/null @@ -1,85 +0,0 @@ -window#applauncher .applauncher{ - @include floating_widget; - - .header { - margin: $popover_padding; - margin-bottom: $popover_padding/2; - - image, entry { - @include widget; - padding: $spacing/2; - } - - entry { - padding-left: $spacing; - } - - image { - margin-right: $spacing; - -gtk-icon-transform: scale(0.8); - font-size: $font-size * 1.6; - } - } - - .separator { - min-height: 1px; - background-color: $hover; - margin: $spacing/2; - } - - scrolledwindow { - @include scrollbar; - padding: $popover_padding; - min-width: 500px; - min-height: 350px; - } - - .placeholder { - margin-top: $spacing; - color: $fg_color; - font-size: 1.2em; - } - - .app { - all: unset; - transition: $transition; - padding: $spacing; - - label { - transition: $transition; - - &.title { - color: $fg_color; - } - - &.description { - color: transparentize($fg_color, 0.3); - } - } - - image { - transition: $transition; - margin-right: $spacing; - } - - &:hover, &:focus { - .title { - color: $accent; - } - - image { - -gtk-icon-shadow: 2px 2px $accent; - } - } - - &:active { - background-color: transparentize($accent, 0.5); - border-radius: $radii; - box-shadow: inset 0 0 0 $border_width $border_color; - - .title { - color: $fg_color; - } - } - } -} diff --git a/config/ags/scss/widgets/bar.scss b/config/ags/scss/widgets/bar.scss deleted file mode 100644 index 6a71d7ca..00000000 --- a/config/ags/scss/widgets/bar.scss +++ /dev/null @@ -1,209 +0,0 @@ -$float: $spacing * 0.7; - -@mixin panel_button($flat: false, $reactive: true){ - all: unset; - - @if $bar_style == 'separated' { - transition: $transition; - - > * { - @include floating_widget; - border-radius: $radii; - margin: $wm_gaps $float; - transition: $transition; - } - - &:hover > * { - color: $hover_fg; - - @if $drop_shadow { - box-shadow: 0 0 min(6px, $spacing/2) 0 $shadow, - inset 0 0 0 99px $hover; - } @else { - box-shadow: inset 0 0 0 99px $hover; - } - } - - &:active > *, &.active > * { - label, image { color: $accent_fg; } - background-image: $active_gradient; - background-color: $accent; - } - } @else { - @include accs_button($flat, $reactive); - > * { margin: $float; } - } - - label { - font-size: $font-size; - font-weight: bold; - } - - image { - font-size: $font-size * 1.2; - } - - > * { - padding: .3em .5em; - } -} - -.panel { - @if $bar_style == 'normal' { - background-color: $bg_color; - } - - @if not $screen_corners and $bar_style == 'normal' { - @if $layout == 'bottombar' { - border-top: $border; - } @else { - border-bottom: $border; - } - } - - @if $bar_style == 'floating' { - @include floating_widget; - margin: $wm_gaps; - padding: 0; - } - - @if $bar_style == 'separated' { - > .end > button:last-child > * { - margin-right: $wm_gaps; - } - - > .start > button:first-child > * { - margin-left: $wm_gaps; - } - } - - .panel-button { - @include panel_button($flat: true); - } - - separator { - background-color: transparentize($fg_color, 0.98); - border-radius: $radii; - min-height: 5px; - min-width: 5px; - } - - .quicksettings > box > * { - margin: 0 $spacing/2; - &:last-child { margin-right: 0; } - &:first-child { margin-left: 0; } - } - - .overview { - label { color: transparentize($accent, 0.2); } - &:hover label { color: $accent; } - &:active label, &.active label { color: $accent_fg; } - } - - .powermenu, .recorder { - image { color: transparentize($red, 0.3); } - &:hover image { color: transparentize($red, 0.15); } - &:active image { color: $red; } - } - - /* stylelint-disable-next-line selector-not-notation */ - .quicksettings:not(.active):not(:active) { - .bluetooth { color: $blue; } - - .battery { - &.low { color: $red; } - &.charged, &.charging { color: $green; } - } - } - - .media { - &.spotify image { color: $green; } - &.firefox image { color: $orange; } - &.mpv image { color: $magenta; } - } - - .notifications { - image { color: $yellow; } - } - - .battery-bar { - image { margin-right: $spacing/2; } - .font-icon { font-size: 1.3em; } - - levelbar trough { - @include widget; - min-width: 60px; - min-height: 14px; - - block.filled { - border-radius: max($radii - $border_width, 0); - background-image: $active_gradient; - } - } - - @mixin color($color) { - image, label { color: $color } - - block.filled { - background-image: linear-gradient(to right, $color, lighten($color, 6%)); - } - } - - .medium { @include color($yellow) } - .low { @include color($red) } - .charging { @include color($green) } - &:active { @include color($accent_fg) } - } - - .workspaces { - > * { padding: 0; } - - .eventbox { - transition: $transition; - - @if $bar_style == 'separated' { - border-radius: max($radii - $border_width, 0); - &:hover { background-color: $hover; } - } @else { - @include button($flat: true); - } - } - - button { - all: unset; - - .indicator { - font-size: 0; - min-width: 6px; - min-height: 6px; - border-radius: $radii*0.6; - border: $border; - margin: 0 $spacing/2; - transition: $transition/2; - background-color: transparentize($fg_color, 0.8); - } - - &:last-child .indicator { margin-right: $spacing; } - &:first-child .indicator { margin-left: $spacing; } - - &.occupied .indicator { - background-color: transparentize($fg_color, 0.2); - min-width: 8px; - min-height: 8px; - } - - &:hover .indicator { - box-shadow: inset 0 0 0 10px transparentize($fg_color, 0.8); - } - - &.active .indicator, &:active .indicator { - background-color: $accent; - } - - &.active .indicator { - min-width: 24px; - min-height: 12px; - } - } - } -} diff --git a/config/ags/scss/widgets/dashboard.scss b/config/ags/scss/widgets/dashboard.scss deleted file mode 100644 index fc0bd588..00000000 --- a/config/ags/scss/widgets/dashboard.scss +++ /dev/null @@ -1,142 +0,0 @@ -@mixin calendar { - @include widget; - padding: $spacing*2 $spacing*2 0; - - calendar{ - all: unset; - - &.button{ - @include button($flat: true); - margin: 1em; - } - - &:selected{ - box-shadow: inset 0 -8px 0 0 transparentize($accent, 0.5), - inset 0 0 0 1px $accent; - border-radius: $radii*0.6; - } - - &.header{ - background-color: transparent; - border: none; - color: transparentize($fg_color, 0.5); - } - - &.highlight{ - background-color: transparent; - color: transparentize($accent, 0.5); - } - - &:indeterminate { - color: transparentize($fg_color, 0.9); - } - font-size: 1.1em; - padding: .2em; - } -} - -window#dashboard .dashboard { - @include floating_widget; - - .notifications { - min-width: 450px; - - .header { - padding-left: .3em; - margin-bottom: $spacing; - - label { - font-size: 1.2em; - } - - button { - @include button; - padding: $spacing/2 $spacing; - - label { - font-size: 1.2em; - } - } - } - - .notification-scrollable { - @include scrollbar; - - scrollbar, scrollbar:hover { - border-radius: max($radii - $border_width, 0); - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .notification { - @include notification; - - > box { - @include widget; - margin: $spacing/2 0; - padding: $spacing; - } - } - } - - .placeholder { - color: $wallpaper_fg; - image { font-size: 7em; } - label { font-size: 1.2em; } - - label, image { - @if $drop_shadow { - text-shadow: $text_shadow; - -gtk-icon-shadow: $text_shadow; - } @else { - @include text_border; - } - - } - } - } - - separator { - background-color: $popover_border_color; - min-width: 2px; - border-radius: $radii; - margin: 0 $spacing; - } - - - .clock { - font-size: 5em; - } - - .uptime { - font-size: 2em; - color: transparentize($fg_color, 0.2); - } - - .calendar { - @include calendar; - - margin-top: $spacing*2; - } - - .circular-progress-box { - @include widget; - margin-top: $spacing; - margin-right: $spacing; - &:last-child { margin-right: 0; } - padding: $spacing; - - .circular-progress { - min-height: $spacing * 8; - min-width: $spacing * 8; - margin: $spacing/2; - font-size: $spacing; - background-color: $bg_color; - color: $accent; - - image { - font-size: 1.8em; - } - } - } -} diff --git a/config/ags/scss/widgets/desktop.scss b/config/ags/scss/widgets/desktop.scss deleted file mode 100644 index 71487bc8..00000000 --- a/config/ags/scss/widgets/desktop.scss +++ /dev/null @@ -1,96 +0,0 @@ -window.corner .corner { - background-color: if($screen_corners, $bg_color, transparent); - border-radius: if($screen_corners, $radii*2, 0); -} - -window.desktop { - @if $bar_style == 'normal' { - border-radius: if($screen_corners, $popover_radius, 0); - box-shadow: inset 0 0 $spacing 0 $shadow; - } - - .clock-box-shadow { - border: 5px solid $wallpaper_fg; - border-radius: $radii; - - .clock-box { - border-radius: max($radii - 5px, 0); - padding: 0 14px; - - .clock { - color: $wallpaper_fg; - font-size: 140px; - font-family: $mono_font; - } - - .separator-box { - padding: 24px 12px; - - separator { - border-radius: $radii; - min-width: 16px; - min-height: 16px; - background-color: $wallpaper_fg; - } - } - } - } - - .date { - color: $wallpaper_fg; - font-size: 48px; - } - - @if $drop_shadow { - .clock-box-shadow, separator { - box-shadow: 2px 2px 2px 0 $shadow; - } - - .clock-box { - box-shadow: inset 2px 2px 2px 0 $shadow; - } - - label { - text-shadow: $text_shadow; - } - } @else { - .clock-box-shadow{ - box-shadow: 0 0 0 $border_width $border_color, - inset 0 0 0 $border_width $border_color; - } - - separator { - border: $border; - } - - label { - @include text_border; - } - } -} - -.desktop-menu { - image { - margin-left: -14px; - margin-right: 6px; - } -} - -window.indicator .progress { - @include floating_widget; - padding: $spacing/2; - - .fill { - border-radius: max($popover_radius - $spacing/2, 0); - background-color: $accent; - color: $accent_fg; - - image { - -gtk-icon-transform: scale(0.7); - } - - .font-icon { - font-size: 34px; - } - } -} diff --git a/config/ags/scss/widgets/dock.scss b/config/ags/scss/widgets/dock.scss deleted file mode 100644 index aadb0799..00000000 --- a/config/ags/scss/widgets/dock.scss +++ /dev/null @@ -1,58 +0,0 @@ -@mixin dock($spacing: $spacing * 0.7) { - separator { - border-radius: $radii; - background-color: transparentize($fg_color, 0.8); - margin: 0 $spacing; - } - - &.horizontal { - separator { - min-width: 2px; - min-height: 2em; - } - - button.focused .indicator { - min-width: 18px; - } - } - - button { - @include accs_button($flat: true); - - image, .box { - margin: $spacing; - - @if $theme == 'light' { - -gtk-icon-shadow: $text_shadow; - } - } - - .indicator { - min-width: 6px; - min-height: 6px; - background-color: $fg_color; - border-radius: $radii; - margin-bottom: 2px; - } - - &.single .indicator, &.nonrunning .indicator { - background-color: transparent; - } - - &.focused { - .indicator { - background-image: $active_gradient; - } - } - } -} - -window.floating-dock .dock { - @include dock; - @include floating_widget; - padding: $spacing / 2; - - button image { - font-size: 48px; - } -} diff --git a/config/ags/scss/widgets/lockscreen.scss b/config/ags/scss/widgets/lockscreen.scss deleted file mode 100644 index aa5b091a..00000000 --- a/config/ags/scss/widgets/lockscreen.scss +++ /dev/null @@ -1,26 +0,0 @@ -window.lockscreen { - background-color: rgba(0, 0, 0, 0.25); - - .avatar { - @include widget; - border-radius: $radii * 2; - min-height: 200px; - min-width: 200px; - } - - .content { - @include floating_widget; - padding: $spacing * 4; - } - - spinner { - margin-top: $spacing * 2; - } - - entry { - @include button; - margin-top: $spacing * 2; - padding: $spacing; - min-height: 20px; - } -} diff --git a/config/ags/scss/widgets/media.scss b/config/ags/scss/widgets/media.scss deleted file mode 100644 index 317494cd..00000000 --- a/config/ags/scss/widgets/media.scss +++ /dev/null @@ -1,117 +0,0 @@ -@mixin player_color($color) { - button { - .shuffle.enabled { - color: $color; - } - - .loop { - &.playlist, &.track { - color: $color; - } - } - - &:active label { - color: $color; - } - } - - .position-slider:hover trough { - background-color: transparentize($color, 0.5); - } - - .player-icon { - color: $color; - } -} - -@mixin media() { - @include widget; - - label { - color: $shader_fg; - text-shadow: $text_shadow; - } - - .shader { - @include shader; - } - - .cover { - border-radius: $radii*0.8; - min-height: 100px; - min-width: 100px; - box-shadow: 2px 2px 2px 0 $shadow; - margin: $spacing; - margin-bottom: 0; - - .shader { - background-color: transparent; - border-radius: max($radii*0.8 - 1px, 0); - box-shadow: inset 0 0 0 999px transparentize($bg_color, 0.8); - } - } - - .blurred-cover, .cover { - background-size: cover; - background-position: center; - border-radius: max($radii - $border_width, 0); - } - - .labels { - margin-top: $spacing; - - label { - font-size: 1.1em; - text-shadow: $text_shadow; - - &.title { - font-weight: bold; - } - } - } - - .position-slider { - @include slider($width: .4em, $slider: false, $gradient: linear-gradient($shader_fg, $shader_fg), $radii: 0); - margin: $spacing 0; - - trough { - border: none; - background-color: transparentize($shader_fg, 0.7); - } - } - - .footer-box { - margin: -$spacing/2 $spacing $spacing/2; - - image { - -gtk-icon-shadow: $text_shadow; - } - } - - .controls button { - all: unset; - - label { - font-size: 2em; - color: transparentize($shader_fg, 0.2); - transition: $transition; - - &.shuffle, &.loop { - font-size: 1.4em; - - } - } - - &:hover label { - color: transparentize($shader_fg, 0.1); - } - - &:active label { - color: $shader_fg; - } - } - - &.spotify { @include player_color($green); } - &.firefox { @include player_color($orange); } - &.mpv { @include player_color($magenta); } -} diff --git a/config/ags/scss/widgets/notifications.scss b/config/ags/scss/widgets/notifications.scss deleted file mode 100644 index fc3aea5a..00000000 --- a/config/ags/scss/widgets/notifications.scss +++ /dev/null @@ -1,94 +0,0 @@ -@mixin notification() { - &.critical > box { - box-shadow: inset 0 0 .5em 0 $red; - } - - > box { - border-radius: $radii/2; - padding: $spacing; - } - - &:hover { - .close-button{ - @include button_hover; - background-color: transparentize($red, .5); - } - } - - .content { - .title { - margin-right: $spacing; - color: $fg_color; - font-size: 1.1em; - } - - .time { - color: transparentize($fg_color, .2); - } - - .description { - font-size: .9em; - color: transparentize($fg_color, .2); - } - - .icon { - border-radius: $radii*0.8; - margin-right: $spacing; - - &.img { - border: $border; - } - } - } - - .actions { - padding-top: $spacing; - - button { - @include button; - border-radius: $radii*0.8; - font-size: 1.2em; - padding: $spacing/2 0; - margin: 0 $spacing/2 0; - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - } - - button.close-button { - @include button($flat: true); - margin-left: $spacing; - border-radius: $radii*0.8; - min-width: 1.2em; - min-height: 1.2em; - - &:hover { - background-color: transparentize($red, .5); - } - - &:active { - background-image: linear-gradient($red, $red); - } - } -} - -.notifications-popup-list{ - .notification { - @include notification; - - > box { - @include floating_widget; - border-radius: $radii; - } - - .description { - min-width: 350px; - } - } -} diff --git a/config/ags/scss/widgets/overview.scss b/config/ags/scss/widgets/overview.scss deleted file mode 100644 index 859eb0b3..00000000 --- a/config/ags/scss/widgets/overview.scss +++ /dev/null @@ -1,32 +0,0 @@ -window#overview .overview { - @include floating_widget; - - .workspace { - margin: 0 $spacing; - &:last-child { margin-right: 0; } - &:first-child { margin-left: 0; } - - &.active > widget { - border-color: $accent - } - - > widget { - @include widget; - - &:drop(active) { - border-color: $accent; - } - } - } - - .client { - @include button; - border-radius: $radii*0.8; - margin: $spacing; - - &.hidden { - @include hidden; - transition: 0; - } - } -} diff --git a/config/ags/scss/widgets/powermenu.scss b/config/ags/scss/widgets/powermenu.scss deleted file mode 100644 index 6f3da0a6..00000000 --- a/config/ags/scss/widgets/powermenu.scss +++ /dev/null @@ -1,75 +0,0 @@ -window#powermenu, window#verification { - .shader { - background-color: rgba(0, 0, 0, 0.05); - } -} - -window#verification .verification { - @include floating_widget; - padding: $popover_padding*1.2; - min-width: 300px; - min-height: 100px; - - .title { - font-size: 1.7em; - } - - .desc { - color: transparentize($fg_color, 0.1); - font-size: 1.2em; - } - - .buttons { - margin-top: $spacing*2; - - button { - @include button; - font-size: 1.6em; - padding: $spacing; - margin: 0 $popover_padding*1.2/2; - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - } -} - -window#powermenu .powermenu { - @include floating_widget; - padding: $popover_padding; - border-radius: $radii*3; - - button { - @include common; - - image { - @include button; - margin: $popover_padding; - margin-bottom: $popover_padding/2; - border-radius: $radii*2; - min-width: 120px; - min-height: 120px; - font-size: 68px; - } - - label, image { - color: transparentize($fg_color, 0.1); - } - - &:hover { - image{ @include button_hover; } - label{ color: $fg_color; } - } - &:focus image { @include button_focus; } - &:active image { @include button_active; } - - &:focus, &:active { - label{ color: $accent; } - } - } -} diff --git a/config/ags/scss/widgets/quicksettings.scss b/config/ags/scss/widgets/quicksettings.scss deleted file mode 100644 index 9e41706b..00000000 --- a/config/ags/scss/widgets/quicksettings.scss +++ /dev/null @@ -1,166 +0,0 @@ -window#quicksettings .quicksettings { - @include floating_widget; - - .row { - margin-top: $spacing; - &:first-child { margin-top: 0; } - } - - .header { - .avatar { - @include widget; - margin-right: $spacing; - min-width: $spacing*7 + 38px; - - .shader { - @include shader; - } - } - - .battery-progress { - label { - margin-top: $spacing; - color: $accent_fg; - font-size: $spacing*2; - font-weight: bold; - } - - &.half label { color: $fg_color; } - - progressbar { - @include slider($width: $spacing*3.4); - margin-top: $spacing; - min-height: 20px; - } - - &.low progressbar { - @include slider($width: $spacing*3.4, $gradient: linear-gradient(to right, $red, $red)); - margin-top: $spacing; - min-height: 20px; - } - } - - .system-box { - @include widget; - padding: $spacing; - - button, .uptime { - @include button; - padding: $spacing; - font-weight: bold; - margin-left: $spacing; - &:first-child { margin-left: 0; } - min-height: 20px; - min-width: 20px; - - image { - font-size: 1.2em; - } - } - } - } - - .slider-box { - @include widget; - padding: $spacing; - - > box { margin: 0; } - - .slider > * { - margin-left: $spacing; - &:first-child { margin-left: 0; } - } - - button, .icon { - @include button($flat: true); - padding: $spacing/2; - } - - scale { - @include slider; - - &:last-child { - margin-right: $spacing/2; - } - } - - .menu { - background-color: $bg_color; - border: $border_width solid $popover_border_color; - border-radius: $radii; - } - } - - .mixer-item { - margin: 0 $spacing; - scale { @include slider($width: 7px); } - > box { padding: $spacing; } - label:last-child { min-width: 3em; } - image { font-size: 20px; } - } - - .menu { - @include widget; - margin: $spacing 0; - padding: $spacing; - - separator { - background-color: $border_color; - margin: $spacing $spacing/2; - } - - label { margin-left: $spacing; } - - button { - @include button($flat: true); - padding: $spacing/2; - } - - switch { - @include switch; - } - } - - .toggle-button { - @include button; - margin-right: $spacing; - font-weight: bold; - - label { - margin-left: $spacing/2; - } - - button { - @include button($flat: true); - padding: $spacing; - - &:first-child { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - &:last-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - } - - &.active { - background-color: $accent; - - label, image { - color: $accent_fg; - } - } - } - - .simple-toggle { - @include button; - padding: $spacing; - } - - .media .player { - @include media; - margin-top: $spacing; - } -} diff --git a/config/ags/scss/widgets/settings.scss b/config/ags/scss/widgets/settings.scss deleted file mode 100644 index 89ee1a11..00000000 --- a/config/ags/scss/widgets/settings.scss +++ /dev/null @@ -1,103 +0,0 @@ -window#settings { - background-color: $bg_color; - color: $fg_color; - - scrolledwindow { - @include scrollbar; - } - - .settings { - .content { - padding: $popover_padding; - } - - .headerbar { - background-color: $widget_bg; - padding: $spacing/2; - border-bottom: $border; - } - - .tab { - @include button($flat: true); - margin: $spacing/2; - padding: $spacing/2; - } - - .wallpaper { - border-radius: max($radii - 1px, 0); - background-position: center; - border: $border - } - - button, entry { - @include button; - padding: $spacing*0.7; - } - - spinbutton, spinbutton:focus { - @include button; - - button, entry { - all: unset; - padding: $spacing*0.7; - - &:last-child { - border-radius: 0 $radii $radii 0; - } - - &:first-child { - border-top: none; - border-bottom: none; - } - } - } - - switch { - @include switch; - } - - .row { - margin-bottom: $spacing; - &:last-child{ margin-bottom: 0; } - - label:first-child { - margin-right: $spacing*5; - } - - .color entry { - margin-right: $spacing; - min-width: 20em; - } - - entry.text { - min-width: 22em; - } - - .text-spin { - @include widget; - - button { - @include button($flat: true); - border-radius: 0; - padding: $spacing/2; - margin: -$border_width; - - &:last-child { - border-radius: 0 $radii $radii 0; - } - } - label { margin: 0 $spacing/2; } - } - - label, entry { - font-size: $font_size; - } - } - - .disclaimer { - padding: $spacing; - padding-top: 0; - color: transparentize($fg_color, 0.5); - } - } -} diff --git a/config/ags/tsconfig.json b/config/ags/tsconfig.json deleted file mode 100644 index e703baa3..00000000 --- a/config/ags/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - // "compilerOptions": { - // "target": "ES2022", - // "module": "ES2022", - // "lib": [ "ES2017" ], - // "allowJs": true, - // "checkJs": true, - // "strict": true, - // "baseUrl": ".", - // "typeRoots": [ - // "./node_modules/@girs", - // "./types" - // ], - // "skipLibCheck": true, - // "forceConsistentCasingInFileNames": true - // }, - "include": [ - "@girs", - "types", - "js" - ] -} diff --git a/config/hypr/scripts/brightness b/config/hypr/scripts/brightness deleted file mode 100755 index ad2e8fe9..00000000 --- a/config/hypr/scripts/brightness +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env sh - -down() { -brightnessctl s 10%- -brightness=$(light -g) -dunstify -a "BRIGHTNESS" "Decreasing to $brightness%" -h int:value:"$brightness" -i display-brightness-symbolic -r 2593 -u normal -} - -up() { -brightnessctl s 10%+ -brightness=$(light -g) -dunstify -a "BRIGHTNESS" "Increasing to $brightness%" -h int:value:"$brightness" -i display-brightness-symbolic -r 2593 -u normal -} - -case "$1" in - up) up;; - down) down;; -esac diff --git a/config/hypr/scripts/hyprPicker.sh b/config/hypr/scripts/hyprPicker.sh deleted file mode 100755 index 03d46263..00000000 --- a/config/hypr/scripts/hyprPicker.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -~/.config/hypr/scripts/hyprpicker --format hex | head -c -1 | wl-copy -convert -size 100x100 xc:$(wl-paste) /tmp/color.png -dunstify --icon=/tmp/color.png "$(wl-paste)" "Copied to your clipboard!" diff --git a/config/hypr/scripts/hyprpicker b/config/hypr/scripts/hyprpicker deleted file mode 100755 index db25d6b2..00000000 Binary files a/config/hypr/scripts/hyprpicker and /dev/null differ diff --git a/config/hypr/scripts/screensharing.sh b/config/hypr/scripts/screensharing.sh deleted file mode 100755 index 515b3b9c..00000000 --- a/config/hypr/scripts/screensharing.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -sleep 1 -systemctl --user stop xdg-desktop-portal-hyprland -systemctl --user stop xdg-desktop-portal-wlr -systemctl --user stop xdg-desktop-portal -systemctl --user restart xdg-desktop-portal-hyprland -sleep 2 -systemctl --user restart xdg-desktop portal diff --git a/config/hypr/scripts/screenshots.sh b/config/hypr/scripts/screenshots.sh deleted file mode 100755 index 4fbad533..00000000 --- a/config/hypr/scripts/screenshots.sh +++ /dev/null @@ -1 +0,0 @@ -grimblast --notify copysave area ~/Pictures/Screenshots/$(date +'%s_screenshot.png') diff --git a/config/hypr/scripts/startpage.sh b/config/hypr/scripts/startpage.sh deleted file mode 100755 index 7d847da8..00000000 --- a/config/hypr/scripts/startpage.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -cd ~/Repos/PersonalProjects/startpage/ -python -m http.server 10002 diff --git a/config/hypr/scripts/volume b/config/hypr/scripts/volume deleted file mode 100755 index 6ca929e1..00000000 --- a/config/hypr/scripts/volume +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env sh - -down() { -pamixer -d 2 -volume=$(pamixer --get-volume) -[$volume -gt 0 ] && volume=`expr $volume` -dunstify -a "VOLUME" "Decreasing to $volume%" -h int:value:"$volume" -i audio-volume-low-symbolic -r 2593 -u normal -canberra-gtk-play -i audio-volume-change -d "changevolume" -} - -up() { -pamixer -i 2 -volume=$(pamixer --get-volume) -[ $volume -lt 100 ] && volume=`expr $volume` -dunstify -a "VOLUME" "Increasing to $volume%" -h int:value:"$volume" -i audio-volume-high-symbolic -r 2593 -u normal -canberra-gtk-play -i audio-volume-change -d "changevolume" -} - -mute() { -muted="$(pamixer --get-mute)" -if $muted; then - pamixer -u - dunstify -a "VOLUME" "UNMUTED" -i audio-volume-high-symbolic -r 2593 -u normal -else - pamixer -m - dunstify -a "VOLUME" "MUTED" -i audio-volume-muted-symbolic -r 2593 -u normal -fi -} - -case "$1" in - up) up;; - down) down;; - mute) mute;; -esac diff --git a/config/hypr/scripts/zellij.sh b/config/hypr/scripts/zellij.sh deleted file mode 100644 index 1aff23e5..00000000 --- a/config/hypr/scripts/zellij.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -ZJ_SESSIONS=$(zellij list-sessions) -NO_SESSIONS=$(echo "${ZJ_SESSIONS}" | wc -l) - -if [ "${NO_SESSIONS}" -ge 2 ]; then - zellij attach \ - "$(echo "${ZJ_SESSIONS}" | sk)" -else - zellij attach -c -fi diff --git a/config/hypr/wallpapers/arctic/Waterfall.png b/config/hypr/wallpapers/arctic/Waterfall.png deleted file mode 100644 index 8c0e123a..00000000 Binary files a/config/hypr/wallpapers/arctic/Waterfall.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/anime.png b/config/hypr/wallpapers/arctic/anime.png deleted file mode 100644 index 7e10e76c..00000000 Binary files a/config/hypr/wallpapers/arctic/anime.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/astronaut.png b/config/hypr/wallpapers/arctic/astronaut.png deleted file mode 100644 index cd873495..00000000 Binary files a/config/hypr/wallpapers/arctic/astronaut.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/deity.jpg b/config/hypr/wallpapers/arctic/deity.jpg deleted file mode 100644 index 8fc8a324..00000000 Binary files a/config/hypr/wallpapers/arctic/deity.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/japaneseshop.jpg b/config/hypr/wallpapers/arctic/japaneseshop.jpg deleted file mode 100644 index 3080c858..00000000 Binary files a/config/hypr/wallpapers/arctic/japaneseshop.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/mandatory.png b/config/hypr/wallpapers/arctic/mandatory.png deleted file mode 100644 index c5e35787..00000000 Binary files a/config/hypr/wallpapers/arctic/mandatory.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/nord-circuits.png b/config/hypr/wallpapers/arctic/nord-circuits.png deleted file mode 100644 index cce40bfb..00000000 Binary files a/config/hypr/wallpapers/arctic/nord-circuits.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/nord-japan.png b/config/hypr/wallpapers/arctic/nord-japan.png deleted file mode 100644 index 5871922d..00000000 Binary files a/config/hypr/wallpapers/arctic/nord-japan.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/nord-skull.png b/config/hypr/wallpapers/arctic/nord-skull.png deleted file mode 100644 index 83d81581..00000000 Binary files a/config/hypr/wallpapers/arctic/nord-skull.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/qsave_2020-12-20_027-900CC.png b/config/hypr/wallpapers/arctic/qsave_2020-12-20_027-900CC.png deleted file mode 100644 index b5d6446c..00000000 Binary files a/config/hypr/wallpapers/arctic/qsave_2020-12-20_027-900CC.png and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/wave.jpg b/config/hypr/wallpapers/arctic/wave.jpg deleted file mode 100644 index 88a2f772..00000000 Binary files a/config/hypr/wallpapers/arctic/wave.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/arctic/wave.png b/config/hypr/wallpapers/arctic/wave.png deleted file mode 100644 index a00a080b..00000000 Binary files a/config/hypr/wallpapers/arctic/wave.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/abstract.png b/config/hypr/wallpapers/cat/abstract.png deleted file mode 100644 index eea3ace6..00000000 Binary files a/config/hypr/wallpapers/cat/abstract.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/alley.jpg b/config/hypr/wallpapers/cat/alley.jpg deleted file mode 100644 index 7037941d..00000000 Binary files a/config/hypr/wallpapers/cat/alley.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/alleyjapan.jpg b/config/hypr/wallpapers/cat/alleyjapan.jpg deleted file mode 100644 index 4689dd64..00000000 Binary files a/config/hypr/wallpapers/cat/alleyjapan.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/cat.png b/config/hypr/wallpapers/cat/cat.png deleted file mode 100644 index d951c4b8..00000000 Binary files a/config/hypr/wallpapers/cat/cat.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/citytop.jpg b/config/hypr/wallpapers/cat/citytop.jpg deleted file mode 100644 index 9d9c4f15..00000000 Binary files a/config/hypr/wallpapers/cat/citytop.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/coolgirl.png b/config/hypr/wallpapers/cat/coolgirl.png deleted file mode 100644 index f0d951ee..00000000 Binary files a/config/hypr/wallpapers/cat/coolgirl.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/cyber.png b/config/hypr/wallpapers/cat/cyber.png deleted file mode 100644 index 00e92fd2..00000000 Binary files a/config/hypr/wallpapers/cat/cyber.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/endofworld.jpeg b/config/hypr/wallpapers/cat/endofworld.jpeg deleted file mode 100644 index cbb07740..00000000 Binary files a/config/hypr/wallpapers/cat/endofworld.jpeg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/floating.jpg b/config/hypr/wallpapers/cat/floating.jpg deleted file mode 100644 index ec275176..00000000 Binary files a/config/hypr/wallpapers/cat/floating.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/leaves.png b/config/hypr/wallpapers/cat/leaves.png deleted file mode 100644 index ace8c2c2..00000000 Binary files a/config/hypr/wallpapers/cat/leaves.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/palmtrees.jpg b/config/hypr/wallpapers/cat/palmtrees.jpg deleted file mode 100644 index 9866c6ac..00000000 Binary files a/config/hypr/wallpapers/cat/palmtrees.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/cat/peace.png b/config/hypr/wallpapers/cat/peace.png deleted file mode 100644 index 657b21aa..00000000 Binary files a/config/hypr/wallpapers/cat/peace.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/pixel.png b/config/hypr/wallpapers/cat/pixel.png deleted file mode 100644 index 7434ef35..00000000 Binary files a/config/hypr/wallpapers/cat/pixel.png and /dev/null differ diff --git a/config/hypr/wallpapers/cat/wallpaper.jpg b/config/hypr/wallpapers/cat/wallpaper.jpg deleted file mode 100644 index 8a967c44..00000000 Binary files a/config/hypr/wallpapers/cat/wallpaper.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/abandoned.png b/config/hypr/wallpapers/forest/abandoned.png deleted file mode 100644 index 96298583..00000000 Binary files a/config/hypr/wallpapers/forest/abandoned.png and /dev/null differ diff --git a/config/hypr/wallpapers/forest/forest.jpg b/config/hypr/wallpapers/forest/forest.jpg deleted file mode 100644 index 0a5c50fd..00000000 Binary files a/config/hypr/wallpapers/forest/forest.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/fr.jpg b/config/hypr/wallpapers/forest/fr.jpg deleted file mode 100644 index bbd71c22..00000000 Binary files a/config/hypr/wallpapers/forest/fr.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/greenery.jpg b/config/hypr/wallpapers/forest/greenery.jpg deleted file mode 100644 index 713095e7..00000000 Binary files a/config/hypr/wallpapers/forest/greenery.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/maybe.jpg b/config/hypr/wallpapers/forest/maybe.jpg deleted file mode 100644 index 74e57488..00000000 Binary files a/config/hypr/wallpapers/forest/maybe.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/river.jpg b/config/hypr/wallpapers/forest/river.jpg deleted file mode 100644 index a0276b2c..00000000 Binary files a/config/hypr/wallpapers/forest/river.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/road.png b/config/hypr/wallpapers/forest/road.png deleted file mode 100644 index f0a5a70e..00000000 Binary files a/config/hypr/wallpapers/forest/road.png and /dev/null differ diff --git a/config/hypr/wallpapers/forest/stairs.jpg b/config/hypr/wallpapers/forest/stairs.jpg deleted file mode 100644 index f23c395f..00000000 Binary files a/config/hypr/wallpapers/forest/stairs.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/forest/stardew3.png b/config/hypr/wallpapers/forest/stardew3.png deleted file mode 100644 index af78c76f..00000000 Binary files a/config/hypr/wallpapers/forest/stardew3.png and /dev/null differ diff --git a/config/hypr/wallpapers/forest/summer-night.png b/config/hypr/wallpapers/forest/summer-night.png deleted file mode 100644 index a2d736c9..00000000 Binary files a/config/hypr/wallpapers/forest/summer-night.png and /dev/null differ diff --git a/config/hypr/wallpapers/forest/wall.png b/config/hypr/wallpapers/forest/wall.png deleted file mode 100644 index 5cee6b7b..00000000 Binary files a/config/hypr/wallpapers/forest/wall.png and /dev/null differ diff --git a/config/hypr/wallpapers/forest/waves.png b/config/hypr/wallpapers/forest/waves.png deleted file mode 100644 index f4546c2a..00000000 Binary files a/config/hypr/wallpapers/forest/waves.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/car-gruv.png b/config/hypr/wallpapers/groove/car-gruv.png deleted file mode 100644 index 5bd6e560..00000000 Binary files a/config/hypr/wallpapers/groove/car-gruv.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/chaos.png b/config/hypr/wallpapers/groove/chaos.png deleted file mode 100644 index bf3ab9e6..00000000 Binary files a/config/hypr/wallpapers/groove/chaos.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/forest-valley-mountains.png b/config/hypr/wallpapers/groove/forest-valley-mountains.png deleted file mode 100644 index da082d92..00000000 Binary files a/config/hypr/wallpapers/groove/forest-valley-mountains.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/girl-reading-book.jpg b/config/hypr/wallpapers/groove/girl-reading-book.jpg deleted file mode 100644 index f67c92ab..00000000 Binary files a/config/hypr/wallpapers/groove/girl-reading-book.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/groove/house-garden.jpg b/config/hypr/wallpapers/groove/house-garden.jpg deleted file mode 100644 index 916fc90e..00000000 Binary files a/config/hypr/wallpapers/groove/house-garden.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/groove/material.png b/config/hypr/wallpapers/groove/material.png deleted file mode 100644 index ddc83791..00000000 Binary files a/config/hypr/wallpapers/groove/material.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/platform.jpg b/config/hypr/wallpapers/groove/platform.jpg deleted file mode 100644 index 15e7834f..00000000 Binary files a/config/hypr/wallpapers/groove/platform.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/groove/powerstation.png b/config/hypr/wallpapers/groove/powerstation.png deleted file mode 100644 index 127d4d4e..00000000 Binary files a/config/hypr/wallpapers/groove/powerstation.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/samurai2.png b/config/hypr/wallpapers/groove/samurai2.png deleted file mode 100644 index 88dc1b3d..00000000 Binary files a/config/hypr/wallpapers/groove/samurai2.png and /dev/null differ diff --git a/config/hypr/wallpapers/groove/sushi-streets.jpg b/config/hypr/wallpapers/groove/sushi-streets.jpg deleted file mode 100644 index c0ebfdf1..00000000 Binary files a/config/hypr/wallpapers/groove/sushi-streets.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/astronautred.png b/config/hypr/wallpapers/onedark/astronautred.png deleted file mode 100644 index 507e3a47..00000000 Binary files a/config/hypr/wallpapers/onedark/astronautred.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/chad.png b/config/hypr/wallpapers/onedark/chad.png deleted file mode 100644 index 60e1c7f5..00000000 Binary files a/config/hypr/wallpapers/onedark/chad.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/city.png b/config/hypr/wallpapers/onedark/city.png deleted file mode 100644 index 5aaaa3b8..00000000 Binary files a/config/hypr/wallpapers/onedark/city.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/flower.png b/config/hypr/wallpapers/onedark/flower.png deleted file mode 100644 index 8e4ce6ca..00000000 Binary files a/config/hypr/wallpapers/onedark/flower.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/neon-car-6058x3408.png b/config/hypr/wallpapers/onedark/neon-car-6058x3408.png deleted file mode 100644 index 4de3b195..00000000 Binary files a/config/hypr/wallpapers/onedark/neon-car-6058x3408.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/neon.png b/config/hypr/wallpapers/onedark/neon.png deleted file mode 100644 index b2b8c319..00000000 Binary files a/config/hypr/wallpapers/onedark/neon.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/neonread.png b/config/hypr/wallpapers/onedark/neonread.png deleted file mode 100644 index 4265c544..00000000 Binary files a/config/hypr/wallpapers/onedark/neonread.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/od_waves.jpg b/config/hypr/wallpapers/onedark/od_waves.jpg deleted file mode 100644 index bc182d1e..00000000 Binary files a/config/hypr/wallpapers/onedark/od_waves.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/space.jpg b/config/hypr/wallpapers/onedark/space.jpg deleted file mode 100644 index de4fc55f..00000000 Binary files a/config/hypr/wallpapers/onedark/space.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/street.png b/config/hypr/wallpapers/onedark/street.png deleted file mode 100644 index 25d707f3..00000000 Binary files a/config/hypr/wallpapers/onedark/street.png and /dev/null differ diff --git a/config/hypr/wallpapers/onedark/window-samurai-onedark.png b/config/hypr/wallpapers/onedark/window-samurai-onedark.png deleted file mode 100644 index d0db2b15..00000000 Binary files a/config/hypr/wallpapers/onedark/window-samurai-onedark.png and /dev/null differ diff --git a/config/hypr/wallpapers/rose/endofworld.jpeg b/config/hypr/wallpapers/rose/endofworld.jpeg deleted file mode 100644 index 544ae8ad..00000000 Binary files a/config/hypr/wallpapers/rose/endofworld.jpeg and /dev/null differ diff --git a/config/hypr/wallpapers/rose/floating.jpg b/config/hypr/wallpapers/rose/floating.jpg deleted file mode 100644 index ec275176..00000000 Binary files a/config/hypr/wallpapers/rose/floating.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/rose/palmtrees.jpg b/config/hypr/wallpapers/rose/palmtrees.jpg deleted file mode 100644 index 9866c6ac..00000000 Binary files a/config/hypr/wallpapers/rose/palmtrees.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/rose/pinkflowers.jpg b/config/hypr/wallpapers/rose/pinkflowers.jpg deleted file mode 100644 index 04eb13dc..00000000 Binary files a/config/hypr/wallpapers/rose/pinkflowers.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/rose/scenemono.png b/config/hypr/wallpapers/rose/scenemono.png deleted file mode 100644 index a0b83e9e..00000000 Binary files a/config/hypr/wallpapers/rose/scenemono.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/abstract.png b/config/hypr/wallpapers/verdant/abstract.png deleted file mode 100644 index 8b109712..00000000 Binary files a/config/hypr/wallpapers/verdant/abstract.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/clouds.png b/config/hypr/wallpapers/verdant/clouds.png deleted file mode 100644 index ef197202..00000000 Binary files a/config/hypr/wallpapers/verdant/clouds.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/coffee_cup.png b/config/hypr/wallpapers/verdant/coffee_cup.png deleted file mode 100644 index 0d3c8370..00000000 Binary files a/config/hypr/wallpapers/verdant/coffee_cup.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/darkleaves.jpg b/config/hypr/wallpapers/verdant/darkleaves.jpg deleted file mode 100644 index 273a462e..00000000 Binary files a/config/hypr/wallpapers/verdant/darkleaves.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/flowa.jpg b/config/hypr/wallpapers/verdant/flowa.jpg deleted file mode 100644 index 4b18a798..00000000 Binary files a/config/hypr/wallpapers/verdant/flowa.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/flower.jpg b/config/hypr/wallpapers/verdant/flower.jpg deleted file mode 100644 index c5dc73c3..00000000 Binary files a/config/hypr/wallpapers/verdant/flower.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/flowermono.jpg b/config/hypr/wallpapers/verdant/flowermono.jpg deleted file mode 100644 index d578fa5f..00000000 Binary files a/config/hypr/wallpapers/verdant/flowermono.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/moreroses.jpg b/config/hypr/wallpapers/verdant/moreroses.jpg deleted file mode 100644 index 777a21fe..00000000 Binary files a/config/hypr/wallpapers/verdant/moreroses.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/morocco.jpg b/config/hypr/wallpapers/verdant/morocco.jpg deleted file mode 100644 index 78218baf..00000000 Binary files a/config/hypr/wallpapers/verdant/morocco.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/nix.png b/config/hypr/wallpapers/verdant/nix.png deleted file mode 100644 index d1c6490c..00000000 Binary files a/config/hypr/wallpapers/verdant/nix.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/nixwall.png b/config/hypr/wallpapers/verdant/nixwall.png deleted file mode 100644 index 6a31430f..00000000 Binary files a/config/hypr/wallpapers/verdant/nixwall.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/pattern-blue.png b/config/hypr/wallpapers/verdant/pattern-blue.png deleted file mode 100644 index 35bcdb76..00000000 Binary files a/config/hypr/wallpapers/verdant/pattern-blue.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/pattern.png b/config/hypr/wallpapers/verdant/pattern.png deleted file mode 100644 index e005bfbb..00000000 Binary files a/config/hypr/wallpapers/verdant/pattern.png and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/rock.jpeg b/config/hypr/wallpapers/verdant/rock.jpeg deleted file mode 100644 index 08faec41..00000000 Binary files a/config/hypr/wallpapers/verdant/rock.jpeg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/satellitee.jpeg b/config/hypr/wallpapers/verdant/satellitee.jpeg deleted file mode 100644 index eee6a683..00000000 Binary files a/config/hypr/wallpapers/verdant/satellitee.jpeg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/seaside.jpg b/config/hypr/wallpapers/verdant/seaside.jpg deleted file mode 100644 index e67ef286..00000000 Binary files a/config/hypr/wallpapers/verdant/seaside.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/verdant/swa.png b/config/hypr/wallpapers/verdant/swa.png deleted file mode 100644 index 8360d664..00000000 Binary files a/config/hypr/wallpapers/verdant/swa.png and /dev/null differ diff --git a/config/hypr/wallpapers/wave/anotherwave.jpg b/config/hypr/wallpapers/wave/anotherwave.jpg deleted file mode 100644 index 33dce4b6..00000000 Binary files a/config/hypr/wallpapers/wave/anotherwave.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/astronaut.png b/config/hypr/wallpapers/wave/astronaut.png deleted file mode 100644 index 001854f4..00000000 Binary files a/config/hypr/wallpapers/wave/astronaut.png and /dev/null differ diff --git a/config/hypr/wallpapers/wave/birdseye.jpg b/config/hypr/wallpapers/wave/birdseye.jpg deleted file mode 100644 index 44383603..00000000 Binary files a/config/hypr/wallpapers/wave/birdseye.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/blue-moon.jpg b/config/hypr/wallpapers/wave/blue-moon.jpg deleted file mode 100644 index 830bba89..00000000 Binary files a/config/hypr/wallpapers/wave/blue-moon.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/clouds3.jpg b/config/hypr/wallpapers/wave/clouds3.jpg deleted file mode 100644 index 7934093b..00000000 Binary files a/config/hypr/wallpapers/wave/clouds3.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/fishing.jpg b/config/hypr/wallpapers/wave/fishing.jpg deleted file mode 100644 index a441e4e2..00000000 Binary files a/config/hypr/wallpapers/wave/fishing.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/fractal.jpg b/config/hypr/wallpapers/wave/fractal.jpg deleted file mode 100644 index 5d006026..00000000 Binary files a/config/hypr/wallpapers/wave/fractal.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/satellitee.jpeg b/config/hypr/wallpapers/wave/satellitee.jpeg deleted file mode 100644 index 01f1e82a..00000000 Binary files a/config/hypr/wallpapers/wave/satellitee.jpeg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/sea.jpg b/config/hypr/wallpapers/wave/sea.jpg deleted file mode 100644 index a759a2af..00000000 Binary files a/config/hypr/wallpapers/wave/sea.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/shore.png b/config/hypr/wallpapers/wave/shore.png deleted file mode 100644 index 601f08ce..00000000 Binary files a/config/hypr/wallpapers/wave/shore.png and /dev/null differ diff --git a/config/hypr/wallpapers/wave/skyscraper.png b/config/hypr/wallpapers/wave/skyscraper.png deleted file mode 100644 index a75b7326..00000000 Binary files a/config/hypr/wallpapers/wave/skyscraper.png and /dev/null differ diff --git a/config/hypr/wallpapers/wave/stardew3.png b/config/hypr/wallpapers/wave/stardew3.png deleted file mode 100644 index af500c90..00000000 Binary files a/config/hypr/wallpapers/wave/stardew3.png and /dev/null differ diff --git a/config/hypr/wallpapers/wave/wave.jpg b/config/hypr/wallpapers/wave/wave.jpg deleted file mode 100644 index 41f4bc8c..00000000 Binary files a/config/hypr/wallpapers/wave/wave.jpg and /dev/null differ diff --git a/config/hypr/wallpapers/wave/waves.jpg b/config/hypr/wallpapers/wave/waves.jpg deleted file mode 100644 index bf1e1e8f..00000000 Binary files a/config/hypr/wallpapers/wave/waves.jpg and /dev/null differ diff --git a/config/wlogout/layout b/config/wlogout/layout deleted file mode 100755 index 488aa5bb..00000000 --- a/config/wlogout/layout +++ /dev/null @@ -1,36 +0,0 @@ -{ - "label" : "lock", - "action" : "swaylock", - "text" : "Lock", - "keybind" : "l" -} -{ - "label" : "hibernate", - "action" : "systemctl hibernate", - "text" : "Hibernate", - "keybind" : "h" -} -{ - "label" : "logout", - "action" : "loginctl terminate-user $USER", - "text" : "Logout", - "keybind" : "e" -} -{ - "label" : "shutdown", - "action" : "systemctl poweroff", - "text" : "Shutdown", - "keybind" : "s" -} -{ - "label" : "suspend", - "action" : "systemctl suspend", - "text" : "Suspend", - "keybind" : "u" -} -{ - "label" : "reboot", - "action" : "systemctl reboot", - "text" : "Reboot", - "keybind" : "r" -} diff --git a/config/wlogout/noise.png b/config/wlogout/noise.png deleted file mode 100755 index 028b188b..00000000 Binary files a/config/wlogout/noise.png and /dev/null differ diff --git a/config/wlogout/style.css b/config/wlogout/style.css deleted file mode 100755 index 7278b2b2..00000000 --- a/config/wlogout/style.css +++ /dev/null @@ -1,66 +0,0 @@ -* { - background-image: none; - transition: 0ms; -} - -window { - background-color: rgba(12, 12, 12, 0.1); - background-image: url('./noise.png'); -} - -button { - color: #FFFFFF; - border-style: solid; - border-width: 2px; - background-repeat: no-repeat; - background-position: center; - background-size: 25%; - - background-color: rgba(108, 112, 134, 0.4); - border: 1px solid rgba(108, 112, 134, 0.3); - border-top: 1px solid rgba(108, 112, 134, 0.3); -} - -button:focus, -button:active, -button:hover { - background-color: rgba(156, 161, 192, 0.5); - border: 1px solid rgba(108, 112, 134, 0.15); - border-top: 1px solid rgba(108, 112, 134, 0.15); -} - -#lock { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png")); */ -} - -#logout { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png")); */ -} - -#suspend { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png")); */ -} - -#hibernate { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png")); */ -} - -#shutdown { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png")); */ -} - -#reboot { - margin: 10px; - border-radius: 20px; - /* background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png")); */ -}