diff --git a/.config/ags/i18n/locales/Default.json b/.config/ags/i18n/locales/Default.json index b9c15503f..4b1debd6c 100644 --- a/.config/ags/i18n/locales/Default.json +++ b/.config/ags/i18n/locales/Default.json @@ -145,7 +145,6 @@ "Options": "Options", "Dark Mode": "Dark Mode", "Ya should go to sleep!": "Ya should go to sleep!", - "Use Gradience": "Use Gradience", "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)": "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)", "Scheme styles": "Scheme styles", "Vibrant": "Vibrant", diff --git a/.config/ags/i18n/locales/fa_IR.json b/.config/ags/i18n/locales/fa_IR.json index 17a4e40b0..1ff44b553 100644 --- a/.config/ags/i18n/locales/fa_IR.json +++ b/.config/ags/i18n/locales/fa_IR.json @@ -134,7 +134,6 @@ "Options": "گزینه‌ها", "Dark Mode": "حالت تاریک", "Ya should go to sleep!": "پاشو برو بخواب!", - "Use Gradience": "بکارگیری رنگ شیب دار(Gradience)", "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)": "برنامه‌های GTK را با بکارگیری رنگ تأکید پوسته گذاری کنید\n(معایب: تغییر حالت تاریک/روشن نیاز به باز راه‌اندازی دارد)", "Scheme styles": "سبک‌های طرح", "Vibrant": "زنده", diff --git a/.config/ags/i18n/locales/fr_FR.json b/.config/ags/i18n/locales/fr_FR.json index 9e42757ab..4c9a8e80f 100644 --- a/.config/ags/i18n/locales/fr_FR.json +++ b/.config/ags/i18n/locales/fr_FR.json @@ -134,7 +134,6 @@ "Options": "Options", "Dark Mode": "Mode sombre", "Ya should go to sleep!": "Tu devrais aller dormir !", - "Use Gradience": "Utiliser Gradience", "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)": "Thématiser les applications GTK avec la couleur d'accent\n(inconvénient : le changement de mode sombre/clair nécessite un redémarrage)", "Scheme styles": "Styles de schéma", "Vibrant": "Vibrant", diff --git a/.config/ags/i18n/locales/it_IT.json b/.config/ags/i18n/locales/it_IT.json index 79e8277ea..b572d1b92 100644 --- a/.config/ags/i18n/locales/it_IT.json +++ b/.config/ags/i18n/locales/it_IT.json @@ -134,7 +134,6 @@ "Options": "Opzioni", "Dark Mode": "Modalità scura", "Ya should go to sleep!": "Dovresti andare a dormire!", - "Use Gradience": "Usa Gradience", "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)": "Tema le app GTK usando il colore di accento\n(svantaggio: il passaggio tra modalità scura/chiara richiede un riavvio)", "Scheme styles": "Stili dello schema", "Vibrant": "Vivace", diff --git a/.config/ags/i18n/locales/zh_CN.json b/.config/ags/i18n/locales/zh_CN.json index 5fadb11cb..906090be5 100644 --- a/.config/ags/i18n/locales/zh_CN.json +++ b/.config/ags/i18n/locales/zh_CN.json @@ -134,7 +134,6 @@ "Options": "选项", "Dark Mode": "深色模式", "Ya should go to sleep!": "你应该去睡觉!", - "Use Gradience": "GTK 主题", "Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)": "使用强调色对 GTK 应用程序进行主题化\n(缺点:深色/浅色模式切换需要重启)", "Scheme styles": "样式方案", "Vibrant": "鲜艳", diff --git a/.config/ags/modules/.commonwidgets/configwidgets_apps.js b/.config/ags/modules/.commonwidgets/configwidgets_apps.js index 7a2e63e31..3bf7ce712 100644 --- a/.config/ags/modules/.commonwidgets/configwidgets_apps.js +++ b/.config/ags/modules/.commonwidgets/configwidgets_apps.js @@ -1,3 +1,4 @@ +const { GLib } = imports.gi; import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; const { execAsync, exec } = Utils; @@ -5,7 +6,7 @@ import { getNestedProperty, updateNestedProperty } from "../.miscutils/objects.j import { ConfigSpinButton, ConfigToggle } from "./configwidgets.js"; const AGS_CONFIG_FILE = `${App.configDir}/user_options.jsonc`; -const HYPRLAND_CONFIG_FILE = `\${XDG_CONFIG_HOME:-$HOME/.config}/hypr/custom/general.conf`; +const HYPRLAND_CONFIG_FILE = `${GLib.get_user_config_dir()}/hypr/custom/general.conf`; export const AgsToggle = ({ icon, name, desc = null, diff --git a/.config/ags/modules/.commonwidgets/notification.js b/.config/ags/modules/.commonwidgets/notification.js index 567092392..b9486a2f0 100644 --- a/.config/ags/modules/.commonwidgets/notification.js +++ b/.config/ags/modules/.commonwidgets/notification.js @@ -38,17 +38,13 @@ function guessMessageType(summary) { return 'chat'; } -function exists(widget) { - return widget !== null; -} - function processNotificationBody(body, appEntry) { - // Only process Chrome/Chromium notifications + let processedBody = body; if (appEntry?.toLowerCase().includes('chrome')) { - // Remove the first line - return body.split('\n\n').slice(1).join('\n\n'); + processedBody = body.split('\n\n').slice(1).join('\n\n'); } - return body; + processedBody = processedBody.replace(/<[^>]*>/g, ''); + return processedBody; } const getFriendlyNotifTimeString = (timeObject) => { diff --git a/.config/ags/modules/.configuration/default_options.jsonc b/.config/ags/modules/.configuration/default_options.jsonc index e20975e1b..ef19f14e4 100644 --- a/.config/ags/modules/.configuration/default_options.jsonc +++ b/.config/ags/modules/.configuration/default_options.jsonc @@ -199,6 +199,7 @@ "firefox", "org.gnome.Nautilus" ], + "ignoredAppsRegex": [], "layer": "top", "monitorExclusivity": true, // Dock will move to other monitor along with focus if enabled "searchPinnedAppIcons": false, // Try to search for the correct icon if the app class isn't an icon name @@ -241,6 +242,7 @@ "wps": "wps-office2019-kprometheus", "wpsoffice": "wps-office2019-kprometheus", "footclient": "foot", + "zen": "zen-browser", "": "image-missing" }, "regexSubstitutions": [ diff --git a/.config/ags/modules/bar/normal/music.js b/.config/ags/modules/bar/normal/music.js index dbdc40943..88c9bf816 100644 --- a/.config/ags/modules/bar/normal/music.js +++ b/.config/ags/modules/bar/normal/music.js @@ -2,7 +2,7 @@ const { GLib } = imports.gi; import Widget from 'resource:///com/github/Aylur/ags/widget.js'; import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js'; -const { Box, Button, EventBox, Label, Overlay, Revealer, Scrollable } = Widget; +const { Box, Button, EventBox, Label, Overlay, Revealer } = Widget; const { execAsync, exec } = Utils; import { AnimatedCircProg } from "../../.commonwidgets/cairo_circularprogress.js"; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; @@ -136,8 +136,8 @@ export default () => { setup: (self) => self.hook(Mpris, label => { const mpris = Mpris.getPlayer(''); if (!mpris) return; - label.toggleClassName('bar-music-playstate-playing', mpris !== null && mpris.playBackStatus == 'Playing'); - label.toggleClassName('bar-music-playstate', mpris !== null || mpris.playBackStatus == 'Paused'); + label.toggleClassName('bar-music-playstate-playing', mpris.playBackStatus == 'Playing'); + label.toggleClassName('bar-music-playstate', mpris.playBackStatus == 'Paused'); }), }), overlays: [ @@ -210,7 +210,7 @@ export default () => { }), setup: (self) => self.hook(Mpris, label => { const mpris = Mpris.getPlayer(''); - self.revealChild = (!mpris || userOptions.bar.alwaysShowFullResources); + self.revealChild = (!mpris || mpris.playBackStatus !== 'Playing' || userOptions.bar.alwaysShowFullResources); }), }) ], diff --git a/.config/ags/modules/bar/normal/spaceleft.js b/.config/ags/modules/bar/normal/spaceleft.js index 377d64cd3..d7f861271 100644 --- a/.config/ags/modules/bar/normal/spaceleft.js +++ b/.config/ags/modules/bar/normal/spaceleft.js @@ -29,9 +29,14 @@ const WindowTitle = async () => { truncate: 'end', maxWidthChars: 1, // Doesn't matter, just needs to be non negative className: 'txt-smallie bar-wintitle-txt', - setup: (self) => self.hook(Hyprland.active.client, label => { // Hyprland.active.client - label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; - }), + setup: (self) => { + self.hook(Hyprland.active.client, label => { // Hyprland.active.client + label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; + }); + self.hook(Hyprland.active.workspace, label => { // Hyprland.active.client + label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; + }); + } }) ] }) diff --git a/.config/ags/modules/cheatsheet/data_periodictable.js b/.config/ags/modules/cheatsheet/data_periodictable.js index 47eb8da21..f7f47a0e0 100644 --- a/.config/ags/modules/cheatsheet/data_periodictable.js +++ b/.config/ags/modules/cheatsheet/data_periodictable.js @@ -62,7 +62,7 @@ export const periodicTable = [ { name: 'Argon', symbol: 'Ar', number: 18, weight: 39.95, type: 'noblegas' }, ], [ - { name: 'Kalium', symbol: 'K', number: 19, weight: 39.098, type: 'metal' }, + { name: 'Potassium', symbol: 'K', number: 19, weight: 39.098, type: 'metal' }, { name: 'Calcium', symbol: 'Ca', number: 20, weight: 40.078, type: 'metal' }, { name: 'Scandium', symbol: 'Sc', number: 21, weight: 44.956, type: 'metal' }, { name: 'Titanium', symbol: 'Ti', number: 22, weight: 47.87, type: 'metal' }, diff --git a/.config/ags/modules/dock/dock.js b/.config/ags/modules/dock/dock.js index 8e318410f..bd8297f93 100755 --- a/.config/ags/modules/dock/dock.js +++ b/.config/ags/modules/dock/dock.js @@ -119,6 +119,21 @@ const Taskbar = (monitor) => Widget.Box({ const client = Hyprland.clients[i]; if (client["pid"] == -1) return; const appClass = substitute(client.class); + const ignoredAppsRegex = userOptions.dock.ignoredAppsRegex || []; + let isIgnored = false; + + for (const regex of ignoredAppsRegex) { + try { + const pattern = new RegExp(regex); + if (pattern.test(appClass)) { + isIgnored = true; + break; + } + } catch (e) {} + } + + if (isIgnored) continue; + // for (const appName of userOptions.dock.pinnedApps) { // if (appClass.includes(appName.toLowerCase())) // return null; diff --git a/.config/ags/modules/indicators/colorscheme.js b/.config/ags/modules/indicators/colorscheme.js index db6501e07..f43a41fa4 100644 --- a/.config/ags/modules/indicators/colorscheme.js +++ b/.config/ags/modules/indicators/colorscheme.js @@ -142,34 +142,6 @@ const ColorSchemeSettings = () => Widget.Box({ .catch(print); }, }), - Widget.Box({ - tooltipText: getString('Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)'), - className: 'txt spacing-h-5 configtoggle-box', - children: [ - MaterialIcon('imagesearch_roller', 'norm'), - Widget.Label({ - className: 'txt txt-small', - label: getString('Use Gradience'), - }), - Widget.Box({ hexpand: true }), - ConfigMulipleSelection({ - hpack: 'center', - vpack: 'center', - optionsArr: [ - [{ name: 'Off', value: 0 }, { name: 'On', value: 1 }], - ], - initIndex: [-1, -1], - onChange: (value, name) => { - const ADWAITA_BLUE = "#3584E4"; - if (value) execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh - --yes-gradience`, `&`]) - .catch(print); - else execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh "${ADWAITA_BLUE}" --no-gradience`, `&`]) - .catch(print); - - }, - }), - ] - }), ] }), Widget.Box({ diff --git a/.config/ags/modules/indicators/indicatorvalues.js b/.config/ags/modules/indicators/indicatorvalues.js index 4fde189b8..f8d08bfc3 100644 --- a/.config/ags/modules/indicators/indicatorvalues.js +++ b/.config/ags/modules/indicators/indicatorvalues.js @@ -5,9 +5,10 @@ const { Box, Label, ProgressBar } = Widget; import { MarginRevealer } from '../.widgethacks/advancedrevealers.js'; import Brightness from '../../services/brightness.js'; import Indicator from '../../services/indicator.js'; +import { MaterialIcon } from '../.commonwidgets/materialicon.js'; const OsdValue = ({ - name, nameSetup = undefined, labelSetup, progressSetup, + name, icon, nameSetup = undefined, labelSetup, progressSetup, extraClassName = '', extraProgressClassName = '', ...rest }) => { @@ -22,27 +23,33 @@ const OsdValue = ({ setup: labelSetup, }); return Box({ // Volume - vertical: true, hexpand: true, - className: `osd-bg osd-value ${extraClassName}`, + className: `osd-bg osd-value ${extraClassName} spacing-h-5`, attribute: { 'disable': () => { valueNumber.label = '󰖭'; } }, children: [ + MaterialIcon(icon, 'hugeass', {vpack: 'center'}), Box({ - vexpand: true, + vertical: true, + className: 'spacing-v-5', + vpack: 'center', children: [ - valueName, - valueNumber, + Box({ + children: [ + valueName, + valueNumber, + ] + }), + ProgressBar({ + className: `osd-progress ${extraProgressClassName}`, + hexpand: true, + vertical: false, + setup: progressSetup, + }) ] - }), - ProgressBar({ - className: `osd-progress ${extraProgressClassName}`, - hexpand: true, - vertical: false, - setup: progressSetup, }) ], ...rest, @@ -52,6 +59,7 @@ const OsdValue = ({ export default (monitor = 0) => { const brightnessIndicator = OsdValue({ name: 'Brightness', + icon: 'light_mode', extraClassName: 'osd-brightness', extraProgressClassName: 'osd-brightness-progress', labelSetup: (self) => self.hook(Brightness[monitor], self => { @@ -66,6 +74,7 @@ export default (monitor = 0) => { const volumeIndicator = OsdValue({ name: 'Volume', + icon: 'volume_up', extraClassName: 'osd-volume', extraProgressClassName: 'osd-volume-progress', attribute: { headphones: undefined , device: undefined}, diff --git a/.config/ags/modules/indicators/musiccontrols.js b/.config/ags/modules/indicators/musiccontrols.js index 0613ada1b..5f5183462 100644 --- a/.config/ags/modules/indicators/musiccontrols.js +++ b/.config/ags/modules/indicators/musiccontrols.js @@ -210,7 +210,6 @@ const CoverArt = ({ player, ...rest }) => { `${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode ${darkMode.value ? 'dark' : 'light'} > ${GLib.get_user_state_dir()}/ags/scss/_musicmaterial.scss`]) .then(() => { const dominantColor = `#${Utils.exec(`sh -c "magick '${coverPath}' -scale 1x1\\! -format '%[fx:int(255*r+.5)],%[fx:int(255*g+.5)],%[fx:int(255*b+.5)]' info: | sed 's/,/\\n/g' | xargs -L 1 printf '%02x' ; echo"`)}` - console.log(dominantColor); // exec(`${App.configDir}/scripts/color_generation/pywal.sh -i "${player.coverPath}" -n -t -s -e -q ${darkMode.value ? '' : '-l'}`) // exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss`); exec(`cp '${App.configDir}/scripts/templates/wal/_musicwal.scss' '${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`); diff --git a/.config/ags/modules/overview/miscfunctions.js b/.config/ags/modules/overview/miscfunctions.js index 18abdd2c4..196f5a7f0 100644 --- a/.config/ags/modules/overview/miscfunctions.js +++ b/.config/ags/modules/overview/miscfunctions.js @@ -44,29 +44,11 @@ export function launchCustomCommand(command) { .then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`])) .catch(print); } - else if (args[0] == '>adw' || args[0] == '>adwaita') { - const ADWAITA_BLUE = "#3584E4"; - execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh "${ADWAITA_BLUE}" --no-gradience`, `&`]) - .catch(print); - } - else if (args[0] == '>grad' || args[0] == '>gradience') { - execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh - --yes-gradience`, `&`]) - .catch(print); - } - else if (args[0] == '>nograd' || args[0] == '>nogradience') { - execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh - --no-gradience`, `&`]) - .catch(print); - } else if (args[0] == '>material') { // Use material colors execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_state_dir()}/ags/user && echo "material" > ${GLib.get_user_state_dir()}/ags/user/colorbackend.txt`]).catch(print) .then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchwall.sh --noswitch`]).catch(print)) .catch(print); } - else if (args[0] == '>pywal') { // Use Pywal (ik it looks shit but I'm not removing) - execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_state_dir()}/ags/user && echo "pywal" > ${GLib.get_user_state_dir()}/ags/user/colorbackend.txt`]).catch(print) - .then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchwall.sh --noswitch`]).catch(print)) - .catch(print); - } else if (args[0] == '>todo') { // Todo Todo.add(args.slice(1).join(' ')); } diff --git a/.config/ags/modules/sideleft/apis/waifu.js b/.config/ags/modules/sideleft/apis/waifu.js index 85c104a35..5a1a2c019 100644 --- a/.config/ags/modules/sideleft/apis/waifu.js +++ b/.config/ags/modules/sideleft/apis/waifu.js @@ -14,7 +14,7 @@ import WaifuService from '../../../services/waifus.js'; import { darkMode } from '../../.miscutils/system.js'; async function getImageViewerApp(preferredApp) { - Utils.execAsync(['bash', '-c', `command -v ${preferredApp}`]) + return Utils.execAsync(['bash', '-c', `command -v ${preferredApp}`]) .then((output) => { if (output != '') return preferredApp; else return 'xdg-open'; diff --git a/.config/ags/modules/sideright/centermodules/bluetooth.js b/.config/ags/modules/sideright/centermodules/bluetooth.js index b0f410aa8..86648be28 100644 --- a/.config/ags/modules/sideright/centermodules/bluetooth.js +++ b/.config/ags/modules/sideright/centermodules/bluetooth.js @@ -56,9 +56,13 @@ const BluetoothDevice = (device) => { onChange: (self, newValue) => { device.setConnection(newValue); }, - extraSetup: (self) => self.hook(device, (self) => { - Utils.timeout(200, () => self.enabled.value = device.connected); - }), + extraSetup: (self) => { + self.hook(device, () => { + const enabledState = self.attribute.enabled; + if (enabledState.value !== device.connected) + enabledState.value = device.connected; + }); + }, }) const deviceRemoveButton = Button({ vpack: 'center', diff --git a/.config/ags/scripts/hyprland/get_keybinds.py b/.config/ags/scripts/hyprland/get_keybinds.py index 3e4dcd140..559ba8a47 100755 --- a/.config/ags/scripts/hyprland/get_keybinds.py +++ b/.config/ags/scripts/hyprland/get_keybinds.py @@ -1,4 +1,4 @@ -#!/usr/bin/env -S\_/bin/sh\_-xc\_"source\_\$(eval\_echo\_\$ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate&&exec\_python\_-E\_"\$0"\_"\$@"" +#!/usr/bin/env -S\_/bin/sh\_-c\_"source\_\$(eval\_echo\_\$ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate&&exec\_python\_-E\_"\$0"\_"\$@"" import argparse import re import os diff --git a/.config/ags/scripts/templates/gtk/gtk-colors.css b/.config/ags/scripts/templates/gtk/gtk-colors.css new file mode 100644 index 000000000..b8ed1a4c7 --- /dev/null +++ b/.config/ags/scripts/templates/gtk/gtk-colors.css @@ -0,0 +1,21 @@ +/* +* GTK Colors +*/ + +@define-color accent_color {{ $primary }}; +@define-color accent_fg_color {{ $onPrimary }}; +@define-color accent_bg_color {{ $primary }}; +@define-color window_bg_color {{ $background }}; +@define-color window_fg_color {{ $onBackground }}; +@define-color headerbar_bg_color {{ $surfaceDim }}; +@define-color headerbar_fg_color {{ $onSurface }}; +@define-color popover_bg_color {{ $surfaceDim }}; +@define-color popover_fg_color {{ $onSurface }}; +@define-color view_bg_color {{ $surface }}; +@define-color view_fg_color {{ $onSurface }}; +@define-color card_bg_color {{ $surface }}; +@define-color card_fg_color {{ $onSurface }}; +@define-color sidebar_bg_color @window_bg_color; +@define-color sidebar_fg_color @window_fg_color; +@define-color sidebar_border_color @window_bg_color; +@define-color sidebar_backdrop_color @window_bg_color; diff --git a/.config/ags/scripts/templates/hypr/hyprlock.conf b/.config/ags/scripts/templates/hypr/hyprlock.conf index 1bb5e79f5..41342ef35 100644 --- a/.config/ags/scripts/templates/hypr/hyprlock.conf +++ b/.config/ags/scripts/templates/hypr/hyprlock.conf @@ -30,6 +30,17 @@ input-field { valign = center } +label { # Caps Lock Warning + monitor = + text = cmd[update:250] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/check-capslock.sh + color = $text_color + font_size = 13 + font_family = $font_family + position = 0, -25 + halign = center + valign = center +} + label { # Clock monitor = text = $TIME diff --git a/.config/ags/scss/_osd.scss b/.config/ags/scss/_osd.scss index ef21f435c..44b808120 100644 --- a/.config/ags/scss/_osd.scss +++ b/.config/ags/scss/_osd.scss @@ -4,28 +4,27 @@ .osd-bg { min-width: 8.864rem; - min-height: 3.409rem; } .osd-value { @include elevation-border; @include elevation2; + @include full-rounding; background-color: $layer0; - border-radius: 1.023rem; - padding: 0.625rem 1.023rem; - padding-top: 0.313rem; + padding: 0.341rem 1.023rem 0.341rem 0.682rem; + min-width: 9.545rem; } .osd-progress { - min-height: 0.955rem; - min-width: 0.068rem; + min-height: 0.682rem; + min-width: 8.182rem; padding: 0rem; border-radius: 10rem; @include fluent_decel; trough { - min-height: 0.954rem; - min-width: 0.068rem; + min-height: 0.682rem; + min-width: 8.182rem; border-radius: 10rem; background-color: $layer2; // border: 0.068rem solid $onSecondaryContainer; @@ -33,8 +32,8 @@ progress { @include fluent_decel; - min-height: 0.680rem; - min-width: 0.680rem; + min-height: 0.409rem; + min-width: 0.409rem; margin: 0rem 0.137rem; border-radius: 10rem; background-color: $onLayer2; @@ -44,12 +43,10 @@ .osd-label { font-size: 1.023rem; font-weight: 500; - margin-top: 0.341rem; } .osd-value-txt { - @include titlefont; - font-size: 1.688rem; + font-size: 1.023rem; font-weight: 500; color: $onLayer0; } diff --git a/.config/ags/services/brightness.js b/.config/ags/services/brightness.js index 4f0e59761..1800d162d 100644 --- a/.config/ags/services/brightness.js +++ b/.config/ags/services/brightness.js @@ -90,27 +90,44 @@ class BrightnessDdcService extends BrightnessServiceBase { async function listDdcMonitorsSnBus() { let ddcSnBus = {}; try { - const out = await Utils.execAsync('ddcutil detect --brief'); + // Its' better not to use --brief. This way if a serial number is not + // found we can still use the binary serial number as an alternative + const out = await Utils.execAsync('ddcutil detect'); const displays = out.split('\n\n'); displays.forEach(display => { - const reg = /^Display \d+/; - if (!reg.test(display)) + const reg = /[Dd]isplay/; + if (!reg.test(display)) { return; + } const lines = display.split('\n'); let sn, busNum; + let unresponsive = false; for (let line of lines) { line = line.trim() - if (line.startsWith('Monitor:')) { - sn = line.split(':')[3]; + + // Sometimes ddcutils will report a DP monitor twice, one of the + // two copies of the monitor will "not support DDC/CI". Just ignore it + // See https://www.ddcutil.com/faq/#duplicate_displayport + if (line.includes('unresponsive')) { + unresponsive = true; + } + if (line.startsWith('Serial')) { + sn = line.split(':')[1].trim(); + // Sometimes sn can be empty. In this cases let's relay on binary sn + } else if (line.startsWith('Binary') && !sn) { + // Make the serial number upper case except for the leading '0x' since Hyprland + // seems to use upper case for the rest of the string and ddcutil uses + // lower case for all the binary sn + sn = '0x'+line.split('(')[1].slice(2,-1).toUpperCase(); } else if (line.startsWith('I2C bus:')) { busNum = line.split('/dev/i2c-')[1]; } } - if (sn && busNum) + if (sn && busNum && !unresponsive){ ddcSnBus[sn] = busNum; + } }); } catch (err) { - print(err); } return ddcSnBus; } @@ -133,10 +150,12 @@ for (let i = 0; i < service.length; i++) { service[i] = new BrightnessDdcService(ddcSnBus[monitorSn]); break; case "auto": - if (monitorSn in ddcSnBus && !!exec(`bash -c 'command -v ddcutil'`)) + if (monitorSn in ddcSnBus && !!exec(`bash -c 'command -v ddcutil'`)){ service[i] = new BrightnessDdcService(ddcSnBus[monitorSn]); - else + } + else { service[i] = new BrightnessCtlService(); + } break; default: throw new Error(`Unknown brightness controller ${preferredController}`); diff --git a/.config/ags/services/gpt.js b/.config/ags/services/gpt.js index b28e4ed98..9279af0b1 100644 --- a/.config/ags/services/gpt.js +++ b/.config/ags/services/gpt.js @@ -44,16 +44,6 @@ const PROVIDERS = Object.assign({ "key_file": "openrouter_key.txt", "model": "meta-llama/llama-3-70b-instruct", }, - "openai": { - "name": "OpenAI - GPT-3.5", - "logo_name": "openai-symbolic", - "description": getString('Official OpenAI API.\nPricing: Free for the first $5 or 3 months, whichever is less.'), - "base_url": "https://api.openai.com/v1/chat/completions", - "key_get_url": "https://platform.openai.com/api-keys", - "requires_key": true, - "key_file": "openai_key.txt", - "model": "gpt-3.5-turbo", - }, }, userOptions.ai.extraGptModels) const installedOllamaModels = JSON.parse( @@ -76,7 +66,7 @@ installedOllamaModels.forEach(model => { // Custom prompt const initMessages = [ - { role: "user", content: getString("You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!"), }, + { role: "user", content: getString("You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don't have enough information to provide a confident answer, simply say \"I don't know\" or \"I'm not sure.\". \nThanks!") }, { role: "assistant", content: "- Got it!", }, { role: "user", content: "\"He rushed to where the event was supposed to be hold, he didn't know it got canceled\"", }, { role: "assistant", content: "## Grammar correction\nErrors:\n\"He rushed to where the event was supposed to be __hold____,__ he didn't know it got canceled\"\nCorrection + minor improvements:\n\"He rushed to the place where the event was supposed to be __held____, but__ he didn't know that it got canceled\"", }, @@ -105,6 +95,8 @@ class GPTMessage extends Service { _role = ''; _content = ''; + _hasReasoningContent = false; + _parsedReasoningContent = false; _lastContentLength = 0; _thinking; _done = false; @@ -112,6 +104,8 @@ class GPTMessage extends Service { constructor(role, content, thinking = true, done = false) { super(); this._role = role; + this._hasReasoningContent = false; + this._parsedReasoningContent = false; this._content = content; this._thinking = thinking; this._done = done; @@ -123,6 +117,18 @@ class GPTMessage extends Service { get role() { return this._role } set role(role) { this._role = role; this.emit('changed') } + get hasReasoningContent() { return this._hasReasoningContent } + set hasReasoningContent(value) { + this._hasReasoningContent = value; + this.emit('changed') + } + + get parsedReasoningContent() { return this._parsedReasoningContent } + set parsedReasoningContent(value) { + this._parsedReasoningContent = value; + this.emit('changed') + } + get content() { return this._content } set content(content) { this._content = content; @@ -143,6 +149,7 @@ class GPTMessage extends Service { } addDelta(delta) { + if (delta == null) return; if (this.thinking) { this.thinking = false; this.content = delta; @@ -242,16 +249,43 @@ class GPTService extends Service { const [bytes] = stream.read_line_finish(res); const line = this._decoder.decode(bytes); if (line && line != '') { + + // Ignore SSE comments (lines starting with ":") + if (line.startsWith(':')) { + this.readResponse(stream, aiResponse); + return; + } + let data = line.substr(6); if (data == '[DONE]') return; try { const result = JSON.parse(data); if (result.choices[0].finish_reason === 'stop') { + // If the stop payload has content, add it to the response + if (result.choices[0].delta.content) { + aiResponse.addDelta(result.choices[0].delta.content); + } aiResponse.done = true; return; } - aiResponse.addDelta(result.choices[0].delta.content); - // print(result.choices[0]) + + // aiResponse.addDelta(result.choices[0].delta.content); + if (!result.choices[0].delta.content && result.choices[0].delta.reasoning_content) { + if (!aiResponse.hasReasoningContent) { + aiResponse.hasReasoningContent = true; + aiResponse.addDelta(`\n${result.choices[0].delta.reasoning_content}`); + } + else { + aiResponse.addDelta(`${result.choices[0].delta.reasoning_content}`); + } + } + else { + if (aiResponse.hasReasoningContent) { + aiResponse.parsedReasoningContent = true; + aiResponse.addDelta(`\n\n`); + } + aiResponse.addDelta(result.choices[0].delta.content); + } } catch { aiResponse.addDelta(line + '\n'); @@ -300,17 +334,4 @@ class GPTService extends Service { } } -export default new GPTService(); - - - - - - - - - - - - - +export default new GPTService(); \ No newline at end of file diff --git a/.config/ags/user_options.jsonc b/.config/ags/user_options.jsonc index 9cd094f75..4c44fe01c 100644 --- a/.config/ags/user_options.jsonc +++ b/.config/ags/user_options.jsonc @@ -2,7 +2,7 @@ // ~/.config/ags/modules/.configuration/default_options.jsonc // // vscode: ctrl+click this: file://./modules/.configuration/default_options.jsonc -// vim : `:vsp` to split window, move cursor to the path, press `gf`. +// vim: `:vsp` to split window, move cursor to the path, press `gf`. // `Ctrl-w` twice to switch between the files // // Limitations of this file: diff --git a/.config/hypr/custom/scripts/__restore_video_wallpaper.sh b/.config/hypr/custom/scripts/__restore_video_wallpaper.sh new file mode 100644 index 000000000..ea4b4fbd3 --- /dev/null +++ b/.config/hypr/custom/scripts/__restore_video_wallpaper.sh @@ -0,0 +1,2 @@ +#!/bin/bash +# The content of this script will be generated by switchwall.sh - Don't modify it by yourself. diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index eed207898..48648f475 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -18,4 +18,3 @@ source=~/.config/hypr/custom/execs.conf source=~/.config/hypr/custom/general.conf source=~/.config/hypr/custom/rules.conf source=~/.config/hypr/custom/keybinds.conf - diff --git a/.config/hypr/hyprland/execs.conf b/.config/hypr/hyprland/execs.conf index 3301f2452..953b43323 100644 --- a/.config/hypr/hyprland/execs.conf +++ b/.config/hypr/hyprland/execs.conf @@ -1,5 +1,6 @@ # Bar, wallpaper exec-once = swww-daemon --format xrgb +exec-once = bash ~/.config/hypr/custom/scripts/__restore_video_wallpaper.sh exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep exec-once = qs & diff --git a/Extras/emacs/material-theme.el b/Extras/emacs/material-theme.el new file mode 100644 index 000000000..41c6bdcbc --- /dev/null +++ b/Extras/emacs/material-theme.el @@ -0,0 +1,366 @@ +;;; material-theme.el --- Theme using Matugen SCSS variables + +;; Copyright (C) 2025 + +;; Author: Generated (Improved) +;; Version: 1.2 +;; Package-Requires: ((emacs "24.1")) +;; Keywords: faces + +;;; Commentary: + +;; A theme using Matugen SCSS variables with quality of life improvements: +;; - Better source block distinction +;; - Improved text visibility when selected +;; - Refined org-mode styling with hidden asterisks +;; - Enhanced contrast and readability +;; - Seamless integration of source blocks with consistent styling + +;;; Code: + +(deftheme material "Theme using Matugen SCSS variables with quality of life improvements.") + +;; Define function to read SCSS variables +(defun material-get-color-from-scss (var-name) + "Extract color value for VAR-NAME from material_colors.scss file." + (let* ((scss-file (expand-file-name "~/.cache/ags/user/generated/material_colors.scss")) + (scss-content (with-temp-buffer + (insert-file-contents scss-file) + (buffer-string))) + (var-pattern (concat "\\$" var-name ":\\s-+\\(#[0-9a-fA-F]\\{6\\}\\);")) + (match (string-match var-pattern scss-content))) + (if match + (match-string 1 scss-content) + (message "Could not find color variable: %s" var-name) + "#000000"))) + +;; Define function to adjust color brightness +(defun material-adjust-color (hex-color factor) + "Adjust HEX-COLOR brightness by FACTOR (0-2). +Values < 1 darken, values > 1 lighten." + (let* ((r (string-to-number (substring hex-color 1 3) 16)) + (g (string-to-number (substring hex-color 3 5) 16)) + (b (string-to-number (substring hex-color 5 7) 16)) + (adjust-channel (lambda (channel) + (max 0 (min 255 (round (* channel factor)))))) + (new-r (funcall adjust-channel r)) + (new-g (funcall adjust-channel g)) + (new-b (funcall adjust-channel b))) + (format "#%02x%02x%02x" new-r new-g new-b))) + +;; Define all the color variables +(let* ((bg (material-get-color-from-scss "background")) + (err (material-get-color-from-scss "error")) + (err-container (material-get-color-from-scss "errorContainer")) + (inverse-on-surface (material-get-color-from-scss "inverseOnSurface")) + (inverse-primary (material-get-color-from-scss "inversePrimary")) + (inverse-surface (material-get-color-from-scss "inverseSurface")) + (on-background (material-get-color-from-scss "onBackground")) + (on-err (material-get-color-from-scss "onError")) + (on-err-container (material-get-color-from-scss "onErrorContainer")) + (on-primary (material-get-color-from-scss "onPrimary")) + (on-primary-container (material-get-color-from-scss "onPrimaryContainer")) + (on-primary-fixed (material-get-color-from-scss "onPrimaryFixed")) + (on-primary-fixed-variant (material-get-color-from-scss "onPrimaryFixedVariant")) + (on-secondary (material-get-color-from-scss "onSecondary")) + (on-secondary-container (material-get-color-from-scss "onSecondaryContainer")) + (on-secondary-fixed (material-get-color-from-scss "onSecondaryFixed")) + (on-secondary-fixed-variant (material-get-color-from-scss "onSecondaryFixedVariant")) + (on-surface (material-get-color-from-scss "onSurface")) + (on-surface-variant (material-get-color-from-scss "onSurfaceVariant")) + (on-tertiary (material-get-color-from-scss "onTertiary")) + (on-tertiary-container (material-get-color-from-scss "onTertiaryContainer")) + (on-tertiary-fixed (material-get-color-from-scss "onTertiaryFixed")) + (on-tertiary-fixed-variant (material-get-color-from-scss "onTertiaryFixedVariant")) + (outline-color (material-get-color-from-scss "outline")) + (outline-variant (material-get-color-from-scss "outlineVariant")) + (primary (material-get-color-from-scss "primary")) + (primary-container (material-get-color-from-scss "primaryContainer")) + (primary-fixed (material-get-color-from-scss "primaryFixed")) + (primary-fixed-dim (material-get-color-from-scss "primaryFixedDim")) + (scrim (material-get-color-from-scss "scrim")) + (secondary (material-get-color-from-scss "secondary")) + (secondary-container (material-get-color-from-scss "secondaryContainer")) + (secondary-fixed (material-get-color-from-scss "secondaryFixed")) + (secondary-fixed-dim (material-get-color-from-scss "secondaryFixedDim")) + (shadow (material-get-color-from-scss "shadow")) + (surface (material-get-color-from-scss "surface")) + (surface-bright (material-get-color-from-scss "surfaceBright")) + (surface-container (material-get-color-from-scss "surfaceContainer")) + (surface-container-high (material-get-color-from-scss "surfaceContainerHigh")) + (surface-container-highest (material-get-color-from-scss "surfaceContainerHighest")) + (surface-container-low (material-get-color-from-scss "surfaceContainerLow")) + (surface-container-lowest (material-get-color-from-scss "surfaceContainerLowest")) + (surface-dim (material-get-color-from-scss "surfaceDim")) + (surface-tint (material-get-color-from-scss "surfaceTint")) + (surface-variant (material-get-color-from-scss "surfaceVariant")) + (tertiary (material-get-color-from-scss "tertiary")) + (tertiary-container (material-get-color-from-scss "tertiaryContainer")) + (tertiary-fixed (material-get-color-from-scss "tertiaryFixed")) + (tertiary-fixed-dim (material-get-color-from-scss "tertiaryFixedDim")) + (success (material-get-color-from-scss "success")) + (on-success (material-get-color-from-scss "onSuccess")) + (success-container (material-get-color-from-scss "successContainer")) + (on-success-container (material-get-color-from-scss "onSuccessContainer")) + (term0 (material-get-color-from-scss "term0")) + (term1 (material-get-color-from-scss "term1")) + (term2 (material-get-color-from-scss "term2")) + (term3 (material-get-color-from-scss "term3")) + (term4 (material-get-color-from-scss "term4")) + (term5 (material-get-color-from-scss "term5")) + (term6 (material-get-color-from-scss "term6")) + (term7 (material-get-color-from-scss "term7")) + (term8 (material-get-color-from-scss "term8")) + (term9 (material-get-color-from-scss "term9")) + (term10 (material-get-color-from-scss "term10")) + (term11 (material-get-color-from-scss "term11")) + (term12 (material-get-color-from-scss "term12")) + (term13 (material-get-color-from-scss "term13")) + (term14 (material-get-color-from-scss "term14")) + (term15 (material-get-color-from-scss "term15"))) + + (custom-theme-set-faces + 'material + ;; Basic faces + `(default ((t (:background ,bg :foreground ,on-background)))) + `(cursor ((t (:background ,primary)))) + `(highlight ((t (:background ,primary-container :foreground ,on-primary-container)))) + `(region ((t (:background ,primary-container :foreground ,on-primary-container :extend t)))) + `(secondary-selection ((t (:background ,secondary-container :foreground ,on-secondary-container :extend t)))) + `(isearch ((t (:background ,tertiary-container :foreground ,on-tertiary-container :weight bold)))) + `(lazy-highlight ((t (:background ,secondary-container :foreground ,on-secondary-container)))) + `(vertical-border ((t (:foreground ,surface-variant)))) + `(border ((t (:background ,surface-variant :foreground ,surface-variant)))) + `(fringe ((t (:background ,surface :foreground ,outline-variant)))) + `(shadow ((t (:foreground ,outline-variant)))) + `(link ((t (:foreground ,primary :underline t)))) + `(link-visited ((t (:foreground ,tertiary :underline t)))) + `(success ((t (:foreground ,success)))) + `(warning ((t (:foreground ,secondary)))) + `(error ((t (:foreground ,err)))) + `(match ((t (:background ,secondary-container :foreground ,on-secondary-container)))) + + ;; Font-lock + `(font-lock-builtin-face ((t (:foreground ,primary)))) + `(font-lock-comment-face ((t (:foreground ,outline-color :slant italic)))) + `(font-lock-comment-delimiter-face ((t (:foreground ,outline-variant)))) + `(font-lock-constant-face ((t (:foreground ,tertiary :weight bold)))) + `(font-lock-doc-face ((t (:foreground ,on-surface-variant :slant italic)))) + `(font-lock-function-name-face ((t (:foreground ,primary :weight bold)))) + `(font-lock-keyword-face ((t (:foreground ,secondary :weight bold)))) + `(font-lock-string-face ((t (:foreground ,tertiary)))) + `(font-lock-type-face ((t (:foreground ,primary-fixed)))) + `(font-lock-variable-name-face ((t (:foreground ,on-surface)))) + `(font-lock-warning-face ((t (:foreground ,err :weight bold)))) + `(font-lock-preprocessor-face ((t (:foreground ,secondary-fixed-dim)))) + `(font-lock-negation-char-face ((t (:foreground ,tertiary-fixed)))) + + ;; Show paren + `(show-paren-match ((t (:background ,primary-container :foreground ,on-primary-container :weight bold)))) + `(show-paren-mismatch ((t (:background ,err-container :foreground ,on-err-container :weight bold)))) + + ;; Mode line - improved status bar styling + `(mode-line ((t (:background ,surface-container :foreground ,on-surface :box nil)))) + `(mode-line-inactive ((t (:background ,surface :foreground ,on-surface-variant :box nil)))) + `(mode-line-buffer-id ((t (:foreground ,primary :weight bold)))) + `(mode-line-emphasis ((t (:foreground ,primary :weight bold)))) + `(mode-line-highlight ((t (:foreground ,primary :box nil)))) + + ;; Improved Source blocks - make them integrated with the theme + `(org-block ((t (:background ,surface-container-low :extend t :inherit fixed-pitch)))) + `(org-block-begin-line ((t (:background ,surface-container-low :foreground ,primary-fixed-dim :extend t :slant italic :inherit fixed-pitch)))) + `(org-block-end-line ((t (:background ,surface-container-low :foreground ,primary-fixed-dim :extend t :slant italic :inherit fixed-pitch)))) + `(org-code ((t (:background ,surface-container-low :foreground ,tertiary-fixed :inherit fixed-pitch)))) + `(org-verbatim ((t (:background ,surface-container-low :foreground ,primary-fixed :inherit fixed-pitch)))) + `(org-meta-line ((t (:foreground ,outline-color :slant italic)))) + + ;; Org mode with hidden asterisks + `(org-level-1 ((t (:foreground ,primary :weight bold :height 1.2)))) + `(org-level-2 ((t (:foreground ,primary-container :weight bold :height 1.1)))) + `(org-level-3 ((t (:foreground ,secondary :weight bold)))) + `(org-level-4 ((t (:foreground ,secondary-container :weight bold)))) + `(org-level-5 ((t (:foreground ,tertiary :weight bold)))) + `(org-level-6 ((t (:foreground ,tertiary-container :weight bold)))) + `(org-level-7 ((t (:foreground ,primary-fixed :weight bold)))) + `(org-level-8 ((t (:foreground ,primary-fixed-dim :weight bold)))) + `(org-document-title ((t (:foreground ,primary :weight bold :height 1.3)))) + `(org-document-info ((t (:foreground ,primary-container)))) + `(org-todo ((t (:foreground ,err :weight bold)))) + `(org-done ((t (:foreground ,success :weight bold)))) + `(org-headline-done ((t (:foreground ,on-surface-variant)))) + `(org-hide ((t (:foreground ,bg)))) ;; Hide leading asterisks + `(org-ellipsis ((t (:foreground ,tertiary :underline nil)))) ;; Style for folded content indicator + `(org-table ((t (:foreground ,secondary-fixed :inherit fixed-pitch)))) + `(org-formula ((t (:foreground ,tertiary :inherit fixed-pitch)))) + `(org-checkbox ((t (:foreground ,primary :weight bold :inherit fixed-pitch)))) + `(org-date ((t (:foreground ,secondary-fixed :underline t)))) + `(org-special-keyword ((t (:foreground ,on-surface-variant :slant italic)))) + `(org-tag ((t (:foreground ,outline-color :weight normal)))) + + ;; Magit + `(magit-section-highlight ((t (:background ,surface-container-low)))) + `(magit-diff-hunk-heading ((t (:background ,surface-container :foreground ,on-surface-variant)))) + `(magit-diff-hunk-heading-highlight ((t (:background ,surface-container-high :foreground ,on-surface)))) + `(magit-diff-context ((t (:foreground ,on-surface-variant)))) + `(magit-diff-context-highlight ((t (:background ,surface-container-low :foreground ,on-surface)))) + `(magit-diff-added ((t (:background ,success-container :foreground ,on-success-container)))) + `(magit-diff-added-highlight ((t (:background ,success-container :foreground ,on-success-container :weight bold)))) + `(magit-diff-removed ((t (:background ,err-container :foreground ,on-err-container)))) + `(magit-diff-removed-highlight ((t (:background ,err-container :foreground ,on-err-container :weight bold)))) + `(magit-hash ((t (:foreground ,outline-color)))) + `(magit-branch-local ((t (:foreground ,tertiary :weight bold)))) + `(magit-branch-remote ((t (:foreground ,primary :weight bold)))) + + ;; Company + `(company-tooltip ((t (:background ,surface-container :foreground ,on-surface)))) + `(company-tooltip-selection ((t (:background ,primary-container :foreground ,on-primary-container)))) + `(company-tooltip-common ((t (:foreground ,primary)))) + `(company-tooltip-common-selection ((t (:foreground ,on-primary-container :weight bold)))) + `(company-tooltip-annotation ((t (:foreground ,tertiary)))) + `(company-scrollbar-fg ((t (:background ,primary)))) + `(company-scrollbar-bg ((t (:background ,surface-variant)))) + `(company-preview ((t (:foreground ,on-surface-variant :slant italic)))) + `(company-preview-common ((t (:foreground ,primary :slant italic)))) + + ;; Ido + `(ido-first-match ((t (:foreground ,primary :weight bold)))) + `(ido-only-match ((t (:foreground ,tertiary :weight bold)))) + `(ido-subdir ((t (:foreground ,secondary)))) + `(ido-indicator ((t (:foreground ,err)))) + `(ido-virtual ((t (:foreground ,outline-color)))) + + ;; Helm + `(helm-selection ((t (:background ,primary-container :foreground ,on-primary-container)))) + `(helm-match ((t (:foreground ,primary :weight bold)))) + `(helm-source-header ((t (:background ,surface-container-high :foreground ,primary :weight bold :height 1.1)))) + `(helm-candidate-number ((t (:foreground ,tertiary :weight bold)))) + `(helm-ff-directory ((t (:foreground ,primary :weight bold)))) + `(helm-ff-file ((t (:foreground ,on-surface)))) + `(helm-ff-executable ((t (:foreground ,tertiary)))) + + ;; Which-key + `(which-key-key-face ((t (:foreground ,primary :weight bold)))) + `(which-key-separator-face ((t (:foreground ,outline-variant)))) + `(which-key-command-description-face ((t (:foreground ,on-surface)))) + `(which-key-group-description-face ((t (:foreground ,secondary)))) + `(which-key-special-key-face ((t (:foreground ,tertiary :weight bold)))) + + ;; Line numbers + `(line-number ((t (:foreground ,outline-variant :inherit fixed-pitch)))) + `(line-number-current-line ((t (:foreground ,primary :weight bold :inherit fixed-pitch)))) + + ;; Parenthesis matching + `(sp-show-pair-match-face ((t (:background ,primary-container :foreground ,on-primary-container)))) + `(sp-show-pair-mismatch-face ((t (:background ,err-container :foreground ,on-err-container)))) + + ;; Rainbow delimiters + `(rainbow-delimiters-depth-1-face ((t (:foreground ,primary)))) + `(rainbow-delimiters-depth-2-face ((t (:foreground ,secondary)))) + `(rainbow-delimiters-depth-3-face ((t (:foreground ,tertiary)))) + `(rainbow-delimiters-depth-4-face ((t (:foreground ,primary-fixed)))) + `(rainbow-delimiters-depth-5-face ((t (:foreground ,secondary-fixed)))) + `(rainbow-delimiters-depth-6-face ((t (:foreground ,tertiary-fixed)))) + `(rainbow-delimiters-depth-7-face ((t (:foreground ,primary-fixed-dim)))) + `(rainbow-delimiters-depth-8-face ((t (:foreground ,secondary-fixed-dim)))) + `(rainbow-delimiters-depth-9-face ((t (:foreground ,tertiary-fixed-dim)))) + `(rainbow-delimiters-mismatched-face ((t (:foreground ,err :weight bold)))) + `(rainbow-delimiters-unmatched-face ((t (:foreground ,err :weight bold)))) + + ;; Dired + `(dired-directory ((t (:foreground ,primary :weight bold)))) + `(dired-ignored ((t (:foreground ,outline-variant)))) + `(dired-flagged ((t (:foreground ,err)))) + `(dired-marked ((t (:foreground ,tertiary :weight bold)))) + `(dired-symlink ((t (:foreground ,secondary :slant italic)))) + `(dired-header ((t (:foreground ,primary :weight bold :height 1.1)))) + + ;; Terminal colors + `(term-color-black ((t (:foreground ,term0 :background ,term0)))) + `(term-color-red ((t (:foreground ,term1 :background ,term1)))) + `(term-color-green ((t (:foreground ,term2 :background ,term2)))) + `(term-color-yellow ((t (:foreground ,term3 :background ,term3)))) + `(term-color-blue ((t (:foreground ,term4 :background ,term4)))) + `(term-color-magenta ((t (:foreground ,term5 :background ,term5)))) + `(term-color-cyan ((t (:foreground ,term6 :background ,term6)))) + `(term-color-white ((t (:foreground ,term7 :background ,term7)))) + + ;; EShell + `(eshell-prompt ((t (:foreground ,primary :weight bold)))) + `(eshell-ls-directory ((t (:foreground ,primary :weight bold)))) + `(eshell-ls-symlink ((t (:foreground ,secondary :slant italic)))) + `(eshell-ls-executable ((t (:foreground ,tertiary)))) + `(eshell-ls-archive ((t (:foreground ,on-tertiary-container)))) + `(eshell-ls-backup ((t (:foreground ,outline-variant)))) + `(eshell-ls-clutter ((t (:foreground ,err)))) + `(eshell-ls-missing ((t (:foreground ,err)))) + `(eshell-ls-product ((t (:foreground ,on-surface-variant)))) + `(eshell-ls-readonly ((t (:foreground ,on-surface-variant)))) + `(eshell-ls-special ((t (:foreground ,secondary-fixed)))) + `(eshell-ls-unreadable ((t (:foreground ,outline-variant)))) + + ;; Improved markdown mode + `(markdown-header-face ((t (:foreground ,primary :weight bold)))) + `(markdown-header-face-1 ((t (:foreground ,primary :weight bold :height 1.2)))) + `(markdown-header-face-2 ((t (:foreground ,primary-container :weight bold :height 1.1)))) + `(markdown-header-face-3 ((t (:foreground ,secondary :weight bold)))) + `(markdown-header-face-4 ((t (:foreground ,secondary-container :weight bold)))) + `(markdown-inline-code-face ((t (:foreground ,tertiary-fixed :background ,surface-container-low :inherit fixed-pitch)))) + `(markdown-code-face ((t (:background ,surface-container-low :extend t :inherit fixed-pitch)))) + `(markdown-pre-face ((t (:background ,surface-container-low :inherit fixed-pitch)))) + `(markdown-table-face ((t (:foreground ,secondary-fixed :inherit fixed-pitch)))) + + ;; Web mode + `(web-mode-html-tag-face ((t (:foreground ,primary)))) + `(web-mode-html-tag-bracket-face ((t (:foreground ,on-surface-variant)))) + `(web-mode-html-attr-name-face ((t (:foreground ,secondary)))) + `(web-mode-html-attr-value-face ((t (:foreground ,tertiary)))) + `(web-mode-css-selector-face ((t (:foreground ,primary)))) + `(web-mode-css-property-name-face ((t (:foreground ,secondary)))) + `(web-mode-css-string-face ((t (:foreground ,tertiary)))) + + ;; Flycheck + `(flycheck-error ((t (:underline (:style wave :color ,err))))) + `(flycheck-warning ((t (:underline (:style wave :color ,secondary))))) + `(flycheck-info ((t (:underline (:style wave :color ,tertiary))))) + `(flycheck-fringe-error ((t (:foreground ,err)))) + `(flycheck-fringe-warning ((t (:foreground ,secondary)))) + `(flycheck-fringe-info ((t (:foreground ,tertiary)))) + + ;; Mini-buffer customization + `(minibuffer-prompt ((t (:foreground ,primary :weight bold)))) + + ;; Improved search highlighting + `(lsp-face-highlight-textual ((t (:background ,primary-container :foreground ,on-primary-container :weight bold)))) + `(lsp-face-highlight-read ((t (:background ,secondary-container :foreground ,on-secondary-container :weight bold)))) + `(lsp-face-highlight-write ((t (:background ,tertiary-container :foreground ,on-tertiary-container :weight bold)))) + + ;; Info and help modes + `(info-title-1 ((t (:foreground ,primary :weight bold :height 1.3)))) + `(info-title-2 ((t (:foreground ,primary-container :weight bold :height 1.2)))) + `(info-title-3 ((t (:foreground ,secondary :weight bold :height 1.1)))) + `(info-title-4 ((t (:foreground ,secondary-container :weight bold)))) + `(Info-quoted ((t (:foreground ,tertiary)))) + `(info-menu-header ((t (:foreground ,primary :weight bold)))) + `(info-menu-star ((t (:foreground ,primary)))) + `(info-node ((t (:foreground ,tertiary :weight bold)))) + + ;; Fixed-pitch faces + `(fixed-pitch ((t (:family "monospace")))) + `(fixed-pitch-serif ((t (:family "monospace serif")))) + + ;; Variable-pitch face + `(variable-pitch ((t (:family "sans serif")))) + )) + +;; Add org-mode hooks for hiding leading stars +(with-eval-after-load 'org + (setq org-hide-leading-stars t) + (setq org-startup-indented t)) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'material) +;;; material-theme.el ends here diff --git a/README.md b/README.md index e21992d39..a845e4899 100644 --- a/README.md +++ b/README.md @@ -71,9 +71,9 @@ It's ready if you don't need localization... so quite likely
Help improve these dotfiles - - - Join the [discussions](https://github.com/end-4/dots-hyprland/discussions) - - If you'd like to suggest fixes or a new widget, feel free to [open an issue](https://github.com/end-4/dots-hyprland/issues/new/choose) + + - Try the Quickshell-powered version at [`ii-qs` branch](https://github.com/end-4/dots-hyprland/tree/ii-qs) - It comes with major improvements, and you're free to make suggestions 👉 [#1276](https://github.com/end-4/dots-hyprland/pull/1276) +
diff --git a/arch-packages/illogical-impulse-python/PKGBUILD b/arch-packages/illogical-impulse-python/PKGBUILD index fc51fb7fa..fc1ac1e05 100644 --- a/arch-packages/illogical-impulse-python/PKGBUILD +++ b/arch-packages/illogical-impulse-python/PKGBUILD @@ -1,10 +1,11 @@ pkgname=illogical-impulse-python pkgver=1.1 -pkgrel=3 +pkgrel=4 pkgdesc='Illogical Impulse Python Dependencies' arch=(any) license=(None) depends=( + clang uv gtk4 libadwaita diff --git a/diagnose b/diagnose index ed3d79aa2..7edbcbd1a 100755 --- a/diagnose +++ b/diagnose @@ -35,6 +35,7 @@ ii_check_distro() { } ii_check_venv() { source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate + which python deactivate } ii_check_ags() { diff --git a/install.sh b/install.sh index 0f4608d81..89ee391ef 100755 --- a/install.sh +++ b/install.sh @@ -94,7 +94,7 @@ install-local-pkgbuild() { source ./PKGBUILD x yay -S $installflags --asdeps "${depends[@]}" - x makepkg -si --noconfirm + x makepkg -Asi --noconfirm x popd } @@ -294,7 +294,7 @@ case $existed_ags_opt in # printf "\e[33mPlease use \"$XDG_CONFIG_HOME/ags/user_options.jsonc.new\" as a reference for a proper format.\e[0m\n" ;;esac case $existed_hypr_conf_firstrun in - y) printf "\n\e[33m[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before. As it seems it is your firstrun, we replaced it with a new one. \e[0m\n" + y) printf "\n\e[33m[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before. As it seems it is your first run, we replaced it with a new one. \e[0m\n" printf "\e[33mAs it seems it is your first run, we replaced it with a new one. The old one has been renamed to \"$XDG_CONFIG_HOME/hypr/hyprland.conf.old\".\e[0m\n" ;;esac case $existed_hypr_conf in diff --git a/scriptdata/installers b/scriptdata/installers index 90d439c2d..7de00454c 100644 --- a/scriptdata/installers +++ b/scriptdata/installers @@ -124,19 +124,18 @@ install-uv (){ install-python-packages (){ UV_NO_MODIFY_PATH=1 ILLOGICAL_IMPULSE_VIRTUAL_ENV=$XDG_STATE_HOME/quickshell/.venv - x mkdir -p $ILLOGICAL_IMPULSE_VIRTUAL_ENV + x mkdir -p $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) # we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089 - x uv venv --prompt .venv $ILLOGICAL_IMPULSE_VIRTUAL_ENV -p 3.12 - x source $ILLOGICAL_IMPULSE_VIRTUAL_ENV/bin/activate + x uv venv --prompt .venv $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) -p 3.12 + x source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate x uv pip install -r scriptdata/requirements.txt - x deactivate # We don't need the virtual environment anymore } # Only for Arch(based) distro. handle-deprecated-dependencies (){ printf "\e[36m[$0]: Removing deprecated dependencies:\e[0m\n" - for i in illogical-impulse-{microtex,pymyc-aur,ags} {hyprutils,hyprpicker,hyprlang,hypridle,hyprland-qt-support,hyprland-qtutils,hyprlock,xdg-desktop-portal-hyprland,hyprcursor,hyprwayland-scanner,hyprland}-git;do try sudo pacman --noconfirm -Rdd $i;done + for i in illogical-impulse-{microtex,pymyc-aur,ags,agsv1} {hyprutils,hyprpicker,hyprlang,hypridle,hyprland-qt-support,hyprland-qtutils,hyprlock,xdg-desktop-portal-hyprland,hyprcursor,hyprwayland-scanner,hyprland}-git;do try sudo pacman --noconfirm -Rdd $i;done # Convert old dependencies to non explicit dependencies so that they can be orphaned if not in meta packages remove_bashcomments_emptylines ./scriptdata/previous_dependencies.conf ./cache/old_deps_stripped.conf readarray -t old_deps_list < ./cache/old_deps_stripped.conf diff --git a/scriptdata/requirements.in b/scriptdata/requirements.in index 3112fc73c..0b4ac323e 100644 --- a/scriptdata/requirements.in +++ b/scriptdata/requirements.in @@ -1,6 +1,5 @@ build pillow -pywal setuptools-scm wheel pywayland diff --git a/scriptdata/requirements.txt b/scriptdata/requirements.txt index fa9c4c84e..802304132 100644 --- a/scriptdata/requirements.txt +++ b/scriptdata/requirements.txt @@ -26,7 +26,7 @@ pycparser==2.22 # via cffi pyproject-hooks==1.2.0 # via build -pywal==3.3.0 +# pywal==3.3.0 # via -r scriptdata/requirements.in pywayland==0.4.18 # via -r scriptdata/requirements.in diff --git a/uninstall.sh b/uninstall.sh index a2fbbfcc2..390092bf7 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -54,6 +54,6 @@ v sudo rm /etc/modules-load.d/i2c-dev.conf read -p "Do you want to uninstall packages used by the dotfiles?\nCtrl+C to exit, or press Enter to proceed" # Removing installed yay packages and dependencies -v yay -Rns illogical-impulse-{ags,audio,backlight,basic,bibata-modern-classic-bin,fonts-themes,gnome,gtk,hyprland,microtex-git,oneui4-icons-git,portal,python,screencapture,widgets} plasma-browser-integration +v yay -Rns illogical-impulse-{agsv1,audio,backlight,basic,bibata-modern-classic-bin,fonts-themes,gnome,gtk,hyprland,microtex-git,oneui4-icons-git,portal,python,screencapture,widgets} plasma-browser-integration printf '\e[36mUninstall Complete.\n\e[97m'