diff --git a/.config/ags/lib/statusicons.js b/.config/ags/lib/statusicons.js index 609ed916f..1e9425787 100644 --- a/.config/ags/lib/statusicons.js +++ b/.config/ags/lib/statusicons.js @@ -73,10 +73,10 @@ export const NotificationIndicator = (notifCenterName = 'sideright') => { export const BluetoothIndicator = () => Widget.Stack({ transition: 'slide_up_down', - items: [ - ['false', Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth_disabled' })], - ['true', Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth' })], - ], + children: { + 'false': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth_disabled' }), + 'true': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth' }), + }, setup: (self) => self .hook(Bluetooth, stack => { stack.shown = String(Bluetooth.enabled); @@ -87,13 +87,13 @@ export const BluetoothIndicator = () => Widget.Stack({ const NetworkWiredIndicator = () => Widget.Stack({ transition: 'slide_up_down', - items: [ - ['fallback', SimpleNetworkIndicator()], - ['unknown', Widget.Label({ className: 'txt-norm icon-material', label: 'wifi_off' })], - ['disconnected', Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' })], - ['connected', Widget.Label({ className: 'txt-norm icon-material', label: 'lan' })], - ['connecting', Widget.Label({ className: 'txt-norm icon-material', label: 'settings_ethernet' })], - ], + children: { + 'fallback': SimpleNetworkIndicator(), + 'unknown': Widget.Label({ className: 'txt-norm icon-material', label: 'wifi_off' }), + 'disconnected': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' }), + 'connected': Widget.Label({ className: 'txt-norm icon-material', label: 'lan' }), + 'connecting': Widget.Label({ className: 'txt-norm icon-material', label: 'settings_ethernet' }), + }, setup: (self) => self.hook(Network, stack => { if (!Network.wired) return; @@ -118,16 +118,16 @@ const SimpleNetworkIndicator = () => Widget.Icon({ const NetworkWifiIndicator = () => Widget.Stack({ transition: 'slide_up_down', - items: [ - ['disabled', Widget.Label({ className: 'txt-norm icon-material', label: 'wifi_off' })], - ['disconnected', Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' })], - ['connecting', Widget.Label({ className: 'txt-norm icon-material', label: 'settings_ethernet' })], - ['0', Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_0_bar' })], - ['1', Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_1_bar' })], - ['2', Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_2_bar' })], - ['3', Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_3_bar' })], - ['4', Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_4_bar' })], - ], + children: { + 'disabled': Widget.Label({ className: 'txt-norm icon-material', label: 'wifi_off' }), + 'disconnected': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' }), + 'connecting': Widget.Label({ className: 'txt-norm icon-material', label: 'settings_ethernet' }), + '0': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_0_bar' }), + '1': Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_1_bar' }), + '2': Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_2_bar' }), + '3': Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_3_bar' }), + '4': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_4_bar' }), + }, setup: (self) => self.hook(Network, (stack) => { if (!Network.wifi) { return; @@ -143,11 +143,11 @@ const NetworkWifiIndicator = () => Widget.Stack({ export const NetworkIndicator = () => Widget.Stack({ transition: 'slide_up_down', - items: [ - ['fallback', SimpleNetworkIndicator()], - ['wifi', NetworkWifiIndicator()], - ['wired', NetworkWiredIndicator()], - ], + children: { + 'fallback': SimpleNetworkIndicator(), + 'wifi': NetworkWifiIndicator(), + 'wired': NetworkWiredIndicator(), + }, setup: (self) => self.hook(Network, stack => { if (!Network.primary) { stack.shown = 'wifi'; @@ -176,14 +176,21 @@ const HyprlandXkbKeyboardLayout = async ({ useFlag } = {}) => { } languageStackArray = Array.from({ length: initLangs.length }, (_, i) => { const lang = languages.find(lang => lang.layout == initLangs[i]); - if (!lang) return [ - initLangs[i], - Widget.Label({ label: initLangs[i] }) - ]; - return [ - lang.layout, - Widget.Label({ label: (useFlag ? lang.flag : lang.layout) }) - ]; + // if (!lang) return [ + // initLangs[i], + // Widget.Label({ label: initLangs[i] }) + // ]; + // return [ + // lang.layout, + // Widget.Label({ label: (useFlag ? lang.flag : lang.layout) }) + // ]; + // Object + if (!lang) return { + [initLangs[i]]: Widget.Label({ label: initLangs[i] }) + }; + return { + [lang.layout]: Widget.Label({ label: (useFlag ? lang.flag : lang.layout) }) + }; }); }; updateCurrentKeyboards(); @@ -192,12 +199,15 @@ const HyprlandXkbKeyboardLayout = async ({ useFlag } = {}) => { transition: 'slide_left', revealChild: languageStackArray.length > 1, }); + const widgetKids = { + ...languageStackArray.reduce((obj, lang) => { + return { ...obj, ...lang }; + }, {}), + 'undef': Widget.Label({ label: '?' }), + } const widgetContent = Widget.Stack({ transition: 'slide_up_down', - items: [ - ...languageStackArray, - ['undef', Widget.Label({ label: '?' })] - ], + children: widgetKids, setup: (self) => self.hook(Hyprland, (stack, kbName, layoutName) => { if (!kbName) { return; diff --git a/.config/ags/scripts/color_generation/colorgen.sh b/.config/ags/scripts/color_generation/colorgen.sh index 43a5c7f68..32daa20b9 100755 --- a/.config/ags/scripts/color_generation/colorgen.sh +++ b/.config/ags/scripts/color_generation/colorgen.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # check if no arguments if [ $# -eq 0 ]; then diff --git a/.config/ags/scripts/color_generation/generate_colors_material.py b/.config/ags/scripts/color_generation/generate_colors_material.py index 4af7dd5c9..deb34bf83 100755 --- a/.config/ags/scripts/color_generation/generate_colors_material.py +++ b/.config/ags/scripts/color_generation/generate_colors_material.py @@ -1,4 +1,4 @@ -#!/bin/python3 +#!/usr/bin/env python3 from material_color_utilities_python import * from pathlib import Path import sys diff --git a/.config/ags/scripts/color_generation/switchcolor.sh b/.config/ags/scripts/color_generation/switchcolor.sh index de59f04cc..6e7e6b320 100755 --- a/.config/ags/scripts/color_generation/switchcolor.sh +++ b/.config/ags/scripts/color_generation/switchcolor.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash color=$(hyprpicker --no-fancy) diff --git a/.config/ags/scripts/color_generation/switchwall.sh b/.config/ags/scripts/color_generation/switchwall.sh index 64bb4a031..1129ae02b 100755 --- a/.config/ags/scripts/color_generation/switchwall.sh +++ b/.config/ags/scripts/color_generation/switchwall.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash if [ "$1" == "--noswitch" ]; then imgpath=$(swww query | awk -F 'image: ' '{print $2}') diff --git a/.config/ags/scripts/hyprland/workspace_action.sh b/.config/ags/scripts/hyprland/workspace_action.sh index 8f390cf65..33f100866 100755 --- a/.config/ags/scripts/hyprland/workspace_action.sh +++ b/.config/ags/scripts/hyprland/workspace_action.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash hyprctl dispatch "$1" $(((($(hyprctl activeworkspace -j | gojq -r .id) - 1) / 10) * 10 + $2)) diff --git a/.config/ags/scripts/sway/swayToRelativeWs.sh b/.config/ags/scripts/sway/swayToRelativeWs.sh index 557b385ec..c97ebdb93 100755 --- a/.config/ags/scripts/sway/swayToRelativeWs.sh +++ b/.config/ags/scripts/sway/swayToRelativeWs.sh @@ -1,4 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash + +# Check if sway is running +if ! pgrep -x sway > /dev/null; then + echo "Sway is not running" + exit 1 +fi + # Get the current workspace number current=$(swaymsg -t get_workspaces | gojq '.[] | select(.focused==true) | .num') @@ -20,4 +27,4 @@ if [[ $2 == 'move' ]]; then swaymsg move container to workspace $new_workspace else swaymsg workspace $new_workspace -fi \ No newline at end of file +fi diff --git a/.config/ags/scripts/templates/gradience/preset.json b/.config/ags/scripts/templates/gradience/preset.json index 095d5b526..243111683 100644 --- a/.config/ags/scripts/templates/gradience/preset.json +++ b/.config/ags/scripts/templates/gradience/preset.json @@ -87,9 +87,9 @@ "BLACK_500": "#393634", "BLACK_700": "#33302F", "BLACK_900": "#2B2928", - "accent_bg_color": "#e4b5ff", - "accent_fg_color": "#471868", - "accent_color": "#e4b5ff", + "accent_bg_color": "#ffb1c3", + "accent_fg_color": "#66002a", + "accent_color": "#ffb1c3", "destructive_bg_color": "#ffb4a9", "destructive_fg_color": "#680003", "destructive_color": "#ffb4a9", @@ -99,22 +99,22 @@ "warning_fg_color": "rgba(0, 0, 0, 0.87)", "error_bg_color": "#ffb4a9", "error_fg_color": "#680003", - "window_bg_color": "#111012", - "window_fg_color": "#e7e0e5", - "view_bg_color": "#1d1b1e", - "view_fg_color": "#e7e0e5", + "window_bg_color": "#130F10", + "window_fg_color": "#ecdfe0", + "view_bg_color": "#201a1b", + "view_fg_color": "#ecdfe0", "headerbar_bg_color": "mix(@dialog_bg_color, @window_bg_color, 0.5)", - "headerbar_fg_color": "#eedcf5", - "headerbar_border_color": "#4f4256", + "headerbar_fg_color": "#ffd9df", + "headerbar_border_color": "#5c3f45", "headerbar_backdrop_color": "@headerbar_bg_color", "headerbar_shade_color": "rgba(0, 0, 0, 0.09)", - "card_bg_color": "#111012", - "card_fg_color": "#eedcf5", + "card_bg_color": "#130F10", + "card_fg_color": "#ffd9df", "card_shade_color": "rgba(0, 0, 0, 0.09)", - "dialog_bg_color": "#4f4256", - "dialog_fg_color": "#eedcf5", - "popover_bg_color": "#4f4256", - "popover_fg_color": "#eedcf5", + "dialog_bg_color": "#5c3f45", + "dialog_fg_color": "#ffd9df", + "popover_bg_color": "#5c3f45", + "popover_fg_color": "#ffd9df", "thumbnail_bg_color": "#1a1b26", "thumbnail_fg_color": "#AEE5FA", "shade_color": "rgba(0, 0, 0, 0.36)", diff --git a/.config/ags/scss/_lib_mixins.scss b/.config/ags/scss/_lib_mixins.scss index 7091791cd..ba5babffc 100644 --- a/.config/ags/scss/_lib_mixins.scss +++ b/.config/ags/scss/_lib_mixins.scss @@ -42,7 +42,7 @@ $rounding_large: 1.705rem; @mixin icon-material { // Material Design Icons - font-family: "Material Symbols Rounded", "Material Symbols Outlined", + font-family: "Material Symbols Rounded", "MaterialSymbolsRounded", "Material Symbols Outlined", "Material Symbols Sharp"; } diff --git a/.config/ags/scss/_material.scss b/.config/ags/scss/_material.scss index 7607c9a74..2bce3c53d 100644 --- a/.config/ags/scss/_material.scss +++ b/.config/ags/scss/_material.scss @@ -1,29 +1,29 @@ $darkmode: true; -$primary: #e4b5ff; -$onPrimary: #471868; -$primaryContainer: #5f3280; -$onPrimaryContainer: #f4d9ff; -$secondary: #d2c1d9; -$onSecondary: #372c3e; -$secondaryContainer: #4f4256; -$onSecondaryContainer: #eedcf5; -$tertiary: #f4b7ba; -$onTertiary: #4b2528; -$tertiaryContainer: #663b3e; -$onTertiaryContainer: #ffdadc; +$primary: #ffb1c3; +$onPrimary: #66002a; +$primaryContainer: #861c40; +$onPrimaryContainer: #ffd9e0; +$secondary: #e4bcc3; +$onSecondary: #42292e; +$secondaryContainer: #5c3f45; +$onSecondaryContainer: #ffd9df; +$tertiary: #ecbe91; +$onTertiary: #462a08; +$tertiaryContainer: #60401d; +$onTertiaryContainer: #ffdcb9; $error: #ffb4a9; $onError: #680003; $errorContainer: #930006; $onErrorContainer: #ffb4a9; -$colorbarbg: #111012; -$background: #111012; -$onBackground: #e7e0e5; -$surface: #1d1b1e; -$onSurface: #e7e0e5; -$surfaceVariant: #4b454d; -$onSurfaceVariant: #cdc3ce; -$outline: #968e98; +$colorbarbg: #130F10; +$background: #130F10; +$onBackground: #ecdfe0; +$surface: #201a1b; +$onSurface: #ecdfe0; +$surfaceVariant: #514345; +$onSurfaceVariant: #d6c1c4; +$outline: #9f8c8f; $shadow: #000000; -$inverseSurface: #e7e0e5; -$inverseOnSurface: #322f33; -$inversePrimary: #784a9a; +$inverseSurface: #ecdfe0; +$inverseOnSurface: #362f30; +$inversePrimary: #a53557; diff --git a/.config/ags/widgets/bar/system.js b/.config/ags/widgets/bar/system.js index e75db46ba..1ca2fcc9a 100644 --- a/.config/ags/widgets/bar/system.js +++ b/.config/ags/widgets/bar/system.js @@ -135,14 +135,14 @@ const BarGroup = ({ child }) => Widget.Box({ const BatteryModule = () => Stack({ transition: 'slide_up_down', transitionDuration: 150, - items: [ - ['laptop', Box({ + children: { + 'laptop': Box({ className: 'spacing-h-5', children: [ BarGroup({ child: Utilities() }), BarGroup({ child: BarBattery() }), ] - })], - ['desktop', BarGroup({ + }), + 'desktop': BarGroup({ child: Box({ hexpand: true, hpack: 'center', @@ -191,8 +191,8 @@ const BatteryModule = () => Stack({ })); }), }) - })], - ], + }), + }, setup: (stack) => Utils.timeout(10, () => { if (!Battery.available) stack.shown = 'desktop'; else stack.shown = 'laptop'; diff --git a/.config/ags/widgets/desktopbackground/wallpaper.js b/.config/ags/widgets/desktopbackground/wallpaper.js index 0b3cce444..ad1272adc 100644 --- a/.config/ags/widgets/desktopbackground/wallpaper.js +++ b/.config/ags/widgets/desktopbackground/wallpaper.js @@ -99,10 +99,10 @@ export default (monitor = 0) => { const stack = Stack({ transition: 'crossfade', transitionDuration: 180, - items: [ - ['image', wallpaperImage], - ['prompt', wallpaperPrompt], - ], + children: { + 'image': wallpaperImage, + 'prompt': wallpaperPrompt, + }, setup: (self) => self .hook(Wallpaper, (self) => { const wallPath = Wallpaper.get(monitor); diff --git a/.config/ags/widgets/sideleft/apis/ai_chatmessage.js b/.config/ags/widgets/sideleft/apis/ai_chatmessage.js index 22f32f64b..66b589cd1 100644 --- a/.config/ags/widgets/sideleft/apis/ai_chatmessage.js +++ b/.config/ags/widgets/sideleft/apis/ai_chatmessage.js @@ -1,4 +1,5 @@ const { Gdk, Gio, GLib, Gtk } = imports.gi; +import GtkSource from "gi://GtkSource?version=3.0"; import App from 'resource:///com/github/Aylur/ags/app.js'; import Widget from 'resource:///com/github/Aylur/ags/widget.js'; import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; @@ -6,12 +7,12 @@ const { Box, Button, Label, Scrollable } = Widget; const { execAsync, exec } = Utils; import { MaterialIcon } from "../../../lib/materialicon.js"; import md2pango from "../../../lib/md2pango.js"; -import GtkSource from "gi://GtkSource?version=3.0"; + const CUSTOM_SOURCEVIEW_SCHEME_PATH = `${App.configDir}/data/sourceviewtheme.xml`; const CUSTOM_SCHEME_ID = 'custom'; const USERNAME = GLib.get_user_name(); -const CHATGPT_CURSOR = ' (o) '; +const CHATGPT_CURSOR = ' ...'; /////////////////////// Custom source view colorscheme ///////////////////////// diff --git a/.config/ags/widgets/sideleft/apis/waifu.js b/.config/ags/widgets/sideleft/apis/waifu.js index c5a61531b..ef31b6d66 100644 --- a/.config/ags/widgets/sideleft/apis/waifu.js +++ b/.config/ags/widgets/sideleft/apis/waifu.js @@ -72,12 +72,12 @@ const WaifuImage = (taglist) => { homogeneous: false, transition: 'slide_up_down', transitionDuration: 150, - items: [ - ['api', ImageState('api', 'Calling API')], - ['download', ImageState('downloading', 'Downloading image')], - ['done', ImageState('done', 'Finished!')], - ['error', ImageState('error', 'Error')], - ] + children: { + 'api': ImageState('api', 'Calling API'), + 'download': ImageState('downloading', 'Downloading image'), + 'done': ImageState('done', 'Finished!'), + 'error': ImageState('error', 'Error'), + }, }); const downloadIndicator = MarginRevealer({ vpack: 'center', diff --git a/.config/ags/widgets/sideright/calendar.js b/.config/ags/widgets/sideright/calendar.js index 73505fae7..579a21f50 100644 --- a/.config/ags/widgets/sideright/calendar.js +++ b/.config/ags/widgets/sideright/calendar.js @@ -146,11 +146,11 @@ const CalendarWidget = () => { const defaultShown = 'calendar'; const contentStack = Widget.Stack({ hexpand: true, - items: [ - ['calendar', CalendarWidget()], - ['todo', TodoWidget()], - // ['stars', Widget.Label({ label: 'GitHub feed will be here' })], - ], + children: { + 'calendar': CalendarWidget(), + 'todo': TodoWidget(), + // 'stars': Widget.Label({ label: 'GitHub feed will be here' }), + }, transition: 'slide_up_down', transitionDuration: 180, setup: (stack) => Utils.timeout(1, () => { diff --git a/.config/ags/widgets/sideright/notificationlist.js b/.config/ags/widgets/sideright/notificationlist.js index 11ca20c81..f3fa95111 100644 --- a/.config/ags/widgets/sideright/notificationlist.js +++ b/.config/ags/widgets/sideright/notificationlist.js @@ -122,10 +122,10 @@ export default (props) => { const listContents = Stack({ transition: 'crossfade', transitionDuration: 150, - items: [ - ['empty', notifEmptyContent], - ['list', notifList] - ], + children: { + 'empty': notifEmptyContent, + 'list': notifList, + }, setup: (self) => self .hook(Notifications, (self) => self.shown = (Notifications.notifications.length > 0 ? 'list' : 'empty')) , diff --git a/.config/ags/widgets/sideright/sideright.js b/.config/ags/widgets/sideright/sideright.js index 6105ae0a8..911ed1411 100644 --- a/.config/ags/widgets/sideright/sideright.js +++ b/.config/ags/widgets/sideright/sideright.js @@ -25,9 +25,10 @@ const timeRow = Box({ className: 'txt-small txt', setup: (self) => self .poll(5000, label => { - execAsync(['bash', '-c', `uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'`]).then(upTimeString => { - label.label = `Uptime: ${upTimeString}`; - }).catch(print); + execAsync(['bash', '-c', `w | sed -n '1p' | cut -d, -f1 | cut -d' ' -f4-`]) + .then(upTimeString => { + label.label = `Uptime: ${upTimeString}`; + }).catch(print); }) , }), diff --git a/.config/ags/widgets/sideright/todolist.js b/.config/ags/widgets/sideright/todolist.js index 7ef455320..3efea6ad6 100644 --- a/.config/ags/widgets/sideright/todolist.js +++ b/.config/ags/widgets/sideright/todolist.js @@ -202,10 +202,10 @@ const UndoneTodoList = () => { const todoItemsBox = Widget.Stack({ vpack: 'fill', transition: 'slide_left_right', - items: [ - ['undone', UndoneTodoList()], - ['done', todoItems(true)], - ], + children: { + 'undone': UndoneTodoList(), + 'done': todoItems(true), + }, }); export const TodoWidget = () => {