diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 4a86ee4f8..8e0c95bf3 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -20,6 +20,7 @@ end alias pamcan pacman alias ls 'eza --icons' alias clear "printf '\033[2J\033[3J\033[1;1H'" +alias q 'qs -c ii' # function fish_prompt diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 48648f475..5698f5945 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,6 +1,7 @@ # This file sources other files in `hyprland` and `custom` folders # You wanna add your stuff in files in `custom` +$qsConfig = ii exec = hyprctl dispatch submap global # DO NOT REMOVE THIS OR YOU WON'T BE ABLE TO USE ANY KEYBIND submap = global # This is required for catchall to work diff --git a/.config/hypr/hyprland/execs.conf b/.config/hypr/hyprland/execs.conf index d4945605b..33fc3ffb7 100644 --- a/.config/hypr/hyprland/execs.conf +++ b/.config/hypr/hyprland/execs.conf @@ -1,8 +1,8 @@ # Bar, wallpaper -exec-once = swww-daemon --format xrgb --no-cache -exec-once = sleep 0.5; swww img "$(cat ~/.local/state/quickshell/user/generated/wallpaper/path.txt)" --transition-step 100 --transition-fps 120 --transition-type grow --transition-angle 30 --transition-duration 1 -exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep -exec-once = qs & +exec-once = ~/.config/hypr/hyprland/scripts/start_geoclue_agent.sh & gammastep +exec-once = sleep 0.7; [ "$(hyprctl monitors -j | jq 'length')" -eq 1 ] && swww-daemon --format xrgb --no-cache || swww-daemon --format xrgb +exec-once = sleep 0.7; swww img "$(cat ~/.local/state/quickshell/user/generated/wallpaper/path.txt)" --transition-step 100 --transition-fps 120 --transition-type grow --transition-angle 30 --transition-duration 1 +exec-once = qs -c $qsConfig & # Input method exec-once = fcitx5 diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index a1ded9f09..d7c208648 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -5,7 +5,7 @@ ##! Shell # These absolutely need to be on top, or they won't work consistently bindid = Super, Super_L, Toggle overview, global, quickshell:overviewToggleRelease # Toggle overview/launcher -bind = Super, Super_L, exec, qs ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback) +bind = Super, Super_L, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback) binditn = Super, catchall, global, quickshell:overviewToggleReleaseInterrupt # [hidden] bind = Ctrl, Super_L, global, quickshell:overviewToggleReleaseInterrupt # [hidden] bind = Super, mouse:272, global, quickshell:overviewToggleReleaseInterrupt # [hidden] @@ -30,11 +30,12 @@ bindd = Super, Slash, Toggle cheatsheet, global, quickshell:cheatsheetToggle # T bindd = Super, K, Toggle on-screen keyboard, global, quickshell:oskToggle # Toggle on-screen keyboard bindd = Super, M, Toggle media controls, global, quickshell:mediaControlsToggle # Toggle media controls bindd = Ctrl+Alt, Delete, Toggle session menu, global, quickshell:sessionToggle # Toggle session menu -bind = Ctrl+Alt, Delete, exec, qs ipc call TEST_ALIVE || pkill wlogout || wlogout -p layer-shell # [hidden] Session menu (fallback) -bind = Shift+Super+Alt, Slash, exec, qs -p ~/.config/quickshell/welcome.qml # [hidden] Launch welcome app +bindd = Super, J, Toggle bar, global, quickshell:barToggle # Toggle bar +bind = Ctrl+Alt, Delete, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill wlogout || wlogout -p layer-shell # [hidden] Session menu (fallback) +bind = Shift+Super+Alt, Slash, exec, qs -p ~/.config/quickshell/$qsConfig/welcome.qml # [hidden] Launch welcome app -bindle=, XF86MonBrightnessUp, exec, qs ipc call brightness increment || brightnessctl s 5%+ # [hidden] -bindle=, XF86MonBrightnessDown, exec, qs ipc call brightness decrement || brightnessctl s 5%- # [hidden] +bindle=, XF86MonBrightnessUp, exec, qs -c $qsConfig ipc call brightness increment || brightnessctl s 5%+ # [hidden] +bindle=, XF86MonBrightnessDown, exec, qs -c $qsConfig ipc call brightness decrement || brightnessctl s 5%- # [hidden] bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+ # [hidden] bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- # [hidden] @@ -43,14 +44,14 @@ bindld = Super+Shift,M, Toggle mute, exec, wpctl set-mute @DEFAULT_SINK@ toggle bindl = Alt ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden] bindl = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden] bindld = Super+Alt,M, Toggle mic, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden] -bindd = Ctrl+Super, T, Change wallpaper, exec, ~/.config/quickshell/scripts/colors/switchwall.sh # Change wallpaper -bind = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool qs quickshell; qs & # Restart widgets +bindd = Ctrl+Super, T, Change wallpaper, exec, ~/.config/quickshell/$qsConfig/scripts/colors/switchwall.sh # Change wallpaper +bind = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool qs quickshell; qs -c $qsConfig & # Restart widgets ##! Utilities # Screenshot, Record, OCR, Color picker, Clipboard history -bindd = Super, V, Copy clipboard history entry, exec, qs ipc call TEST_ALIVE || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy # [hidden] Clipboard history >> clipboard (fallback) -bindd = Super, Period, Copy an emoji, exec, qs ipc call TEST_ALIVE || pkill fuzzel || ~/.config/hypr/hyprland/scripts/fuzzel-emoji.sh copy # [hidden] Emoji >> clipboard (fallback) -bindd = Super+Shift, S, Screen snip, exec, qs -p ~/.config/quickshell/screenshot.qml || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent # Screen snip +bindd = Super, V, Copy clipboard history entry, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy # [hidden] Clipboard history >> clipboard (fallback) +bindd = Super, Period, Copy an emoji, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || ~/.config/hypr/hyprland/scripts/fuzzel-emoji.sh copy # [hidden] Emoji >> clipboard (fallback) +bindd = Super+Shift, S, Screen snip, exec, qs -p ~/.config/quickshell/$qsConfig/screenshot.qml || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent # Screen snip # OCR bindd = Super+Shift, T, Character recognition,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png" # [hidden] # Color picker @@ -183,8 +184,10 @@ bindd = Ctrl+Shift+Alt+Super, Delete, Shutdown, exec, systemctl poweroff || logi ##! Screen # Zoom -binde = Super, Minus, exec, ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # Zoom out -binde = Super, Equal, exec, ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # Zoom in +binde = Super, Minus, exec, qs -c $qsConfig ipc call zoom zoomOut # Zoom out +binde = Super, Equal, exec, qs -c $qsConfig ipc call zoom zoomIn # Zoom in +binde = Super, Minus, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out +binde = Super, Equal, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in ##! Media bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track @@ -203,12 +206,12 @@ bind = Super, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh bind = Ctrl+Alt, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] Kitty (for Ubuntu people) bind = Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "kitty -1 fish -c yazi" # File manager bind = Super, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "google-chrome-stable" "zen-browser" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" # Browser -bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "zed" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" # Code editor +bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" # Code editor bind = Super+Shift, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" # Office software bind = Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" # Text editor bind = Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" # Volume mixer -bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/settings.qml" "systemsettings" "gnome-control-center" "better-control" # Settings app -bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitzor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # Task manager +bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control" # Settings app +bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # Task manager # Cursed stuff ## Make window not amogus large diff --git a/.config/hypr/hyprland/rules.conf b/.config/hypr/hyprland/rules.conf index 2465cc0b8..6b6922a5b 100644 --- a/.config/hypr/hyprland/rules.conf +++ b/.config/hypr/hyprland/rules.conf @@ -27,12 +27,17 @@ windowrulev2 = float, class:.*bluedevilwizard windowrulev2 = float, title:.*Welcome windowrulev2 = float, title:^(illogical-impulse Settings)$ windowrulev2 = float, class:org.freedesktop.impl.portal.desktop.kde +windowrulev2 = float, class:^(Zotero)$ +windowrulev2 = size 45%, class:^(Zotero)$ -# No appearance + +# Move # kde-material-you-colors spawns a window when changing dark/light theme. This is to make sure it doesn't interfere at all. windowrulev2 = float, class:^(plasma-changeicons)$ windowrulev2 = noinitialfocus, class:^(plasma-changeicons)$ windowrulev2 = move 999999 999999, class:^(plasma-changeicons)$ +# stupid dolphin copy +windowrulev2 = move 40 80, title:^(Copying — Dolphin)$ # Tiling windowrulev2 = tile, class:^dev\.warp\.Warp$ @@ -135,6 +140,7 @@ layerrule = animation fade, quickshell:notificationPopup layerrule = blur, quickshell:backgroundWidgets layerrule = ignorealpha 0.05, quickshell:backgroundWidgets layerrule = noanim, quickshell:screenshot +layerrule = animation popin 120%, quickshell:screenCorners # Launchers need to be FAST diff --git a/.config/hypr/hyprland/scripts/start_geoclue_agent.sh b/.config/hypr/hyprland/scripts/start_geoclue_agent.sh new file mode 100755 index 000000000..e464d0531 --- /dev/null +++ b/.config/hypr/hyprland/scripts/start_geoclue_agent.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Check if GeoClue agent is already running +if pgrep -f 'geoclue-2.0/demos/agent' > /dev/null; then + echo "GeoClue agent is already running." + exit 0 +fi + +# List of known possible GeoClue agent paths +AGENT_PATHS=" +/usr/libexec/geoclue-2.0/demos/agent +/usr/lib/geoclue-2.0/demos/agent +" + +# Find the first valid agent path +for path in $AGENT_PATHS; do + if [ -x "$path" ]; then + echo "Starting GeoClue agent from: $path" + "$path" & # starts in the background + exit 0 + fi +done + +# If we got here, none of the paths worked +echo "GeoClue agent not found in known paths." +echo "Please install GeoClue or update the script with the correct path." +exit 1 diff --git a/.config/kde-material-you-colors/config.conf b/.config/kde-material-you-colors/config.conf index 1d63c8405..caa1fb8a4 100644 --- a/.config/kde-material-you-colors/config.conf +++ b/.config/kde-material-you-colors/config.conf @@ -10,7 +10,7 @@ monitor = 0 # File containing absolute path of an image (Takes precedence over automatic wallpaper detection) # Commented by default -file = /home/end/.local/state/quickshell/user/wallpaper.txt +file = ~/.local/state/quickshell/user/generated/wallpaper/path.txt # List of 7 space separated colors (hex or rgb) to be used for text in pywal/konsole/KSyntaxHighlighting instead of wallpaper ones # Accepted values are hex e.g #ff0000 and rgb e.g 255,0,0 colors (rgb is converted to hex) diff --git a/.config/qt6ct/qt6ct.conf b/.config/qt6ct/qt6ct.conf index e8163baa7..f7bfd6003 100644 --- a/.config/qt6ct/qt6ct.conf +++ b/.config/qt6ct/qt6ct.conf @@ -1,5 +1,5 @@ [Appearance] -color_scheme_path=/home/end/.config/qt6ct/style-colors.conf +color_scheme_path=~/.config/qt6ct/style-colors.conf custom_palette=true icon_theme=OneUI standard_dialogs=default diff --git a/.config/quickshell/.qmlformat.ini b/.config/quickshell/ii/.qmlformat.ini similarity index 100% rename from .config/quickshell/.qmlformat.ini rename to .config/quickshell/ii/.qmlformat.ini diff --git a/.config/quickshell/GlobalStates.qml b/.config/quickshell/ii/GlobalStates.qml similarity index 68% rename from .config/quickshell/GlobalStates.qml rename to .config/quickshell/ii/GlobalStates.qml index b4179a8ff..037ffe0c4 100644 --- a/.config/quickshell/GlobalStates.qml +++ b/.config/quickshell/ii/GlobalStates.qml @@ -9,12 +9,21 @@ pragma ComponentBehavior: Bound Singleton { id: root + property bool barOpen: true property bool sidebarLeftOpen: false property bool sidebarRightOpen: false property bool overviewOpen: false property bool workspaceShowNumbers: false property bool superReleaseMightTrigger: true + property real screenZoom: 1 + onScreenZoomChanged: { + Quickshell.execDetached(["hyprctl", "keyword", "cursor:zoom_factor", root.screenZoom.toString()]); + } + Behavior on screenZoom { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + // When user is not reluctant while pressing super, they probably don't need to see workspace numbers onSuperReleaseMightTriggerChanged: { workspaceShowNumbersTimer.stop() @@ -42,4 +51,16 @@ Singleton { workspaceShowNumbers = false } } + + IpcHandler { + target: "zoom" + + function zoomIn() { + screenZoom = Math.min(screenZoom + 0.4, 3.0) + } + + function zoomOut() { + screenZoom = Math.max(screenZoom - 0.4, 1) + } + } } \ No newline at end of file diff --git a/.config/quickshell/ReloadPopup.qml b/.config/quickshell/ii/ReloadPopup.qml similarity index 100% rename from .config/quickshell/ReloadPopup.qml rename to .config/quickshell/ii/ReloadPopup.qml diff --git a/.config/quickshell/assets/icons/ai-openai-symbolic.svg b/.config/quickshell/ii/assets/icons/ai-openai-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/ai-openai-symbolic.svg rename to .config/quickshell/ii/assets/icons/ai-openai-symbolic.svg diff --git a/.config/quickshell/assets/icons/arch-symbolic.svg b/.config/quickshell/ii/assets/icons/arch-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/arch-symbolic.svg rename to .config/quickshell/ii/assets/icons/arch-symbolic.svg diff --git a/.config/quickshell/assets/icons/cachyos-symbolic.svg b/.config/quickshell/ii/assets/icons/cachyos-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/cachyos-symbolic.svg rename to .config/quickshell/ii/assets/icons/cachyos-symbolic.svg diff --git a/.config/quickshell/assets/icons/cloudflare-dns-symbolic.svg b/.config/quickshell/ii/assets/icons/cloudflare-dns-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/cloudflare-dns-symbolic.svg rename to .config/quickshell/ii/assets/icons/cloudflare-dns-symbolic.svg diff --git a/.config/quickshell/assets/icons/crosshair-symbolic.svg b/.config/quickshell/ii/assets/icons/crosshair-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/crosshair-symbolic.svg rename to .config/quickshell/ii/assets/icons/crosshair-symbolic.svg diff --git a/.config/quickshell/assets/icons/debian-symbolic.svg b/.config/quickshell/ii/assets/icons/debian-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/debian-symbolic.svg rename to .config/quickshell/ii/assets/icons/debian-symbolic.svg diff --git a/.config/quickshell/assets/icons/deepseek-symbolic.svg b/.config/quickshell/ii/assets/icons/deepseek-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/deepseek-symbolic.svg rename to .config/quickshell/ii/assets/icons/deepseek-symbolic.svg diff --git a/.config/quickshell/assets/icons/desktop-symbolic.svg b/.config/quickshell/ii/assets/icons/desktop-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/desktop-symbolic.svg rename to .config/quickshell/ii/assets/icons/desktop-symbolic.svg diff --git a/.config/quickshell/assets/icons/endeavouros-symbolic.svg b/.config/quickshell/ii/assets/icons/endeavouros-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/endeavouros-symbolic.svg rename to .config/quickshell/ii/assets/icons/endeavouros-symbolic.svg diff --git a/.config/quickshell/assets/icons/fedora-symbolic.svg b/.config/quickshell/ii/assets/icons/fedora-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/fedora-symbolic.svg rename to .config/quickshell/ii/assets/icons/fedora-symbolic.svg diff --git a/.config/quickshell/assets/icons/flatpak-symbolic.svg b/.config/quickshell/ii/assets/icons/flatpak-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/flatpak-symbolic.svg rename to .config/quickshell/ii/assets/icons/flatpak-symbolic.svg diff --git a/.config/quickshell/assets/icons/github-symbolic.svg b/.config/quickshell/ii/assets/icons/github-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/github-symbolic.svg rename to .config/quickshell/ii/assets/icons/github-symbolic.svg diff --git a/.config/quickshell/assets/icons/google-gemini-symbolic.svg b/.config/quickshell/ii/assets/icons/google-gemini-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/google-gemini-symbolic.svg rename to .config/quickshell/ii/assets/icons/google-gemini-symbolic.svg diff --git a/.config/quickshell/assets/icons/linux-symbolic.svg b/.config/quickshell/ii/assets/icons/linux-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/linux-symbolic.svg rename to .config/quickshell/ii/assets/icons/linux-symbolic.svg diff --git a/.config/quickshell/assets/icons/microsoft-symbolic.svg b/.config/quickshell/ii/assets/icons/microsoft-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/microsoft-symbolic.svg rename to .config/quickshell/ii/assets/icons/microsoft-symbolic.svg diff --git a/.config/quickshell/assets/icons/nixos-symbolic.svg b/.config/quickshell/ii/assets/icons/nixos-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/nixos-symbolic.svg rename to .config/quickshell/ii/assets/icons/nixos-symbolic.svg diff --git a/.config/quickshell/assets/icons/ollama-symbolic.svg b/.config/quickshell/ii/assets/icons/ollama-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/ollama-symbolic.svg rename to .config/quickshell/ii/assets/icons/ollama-symbolic.svg diff --git a/.config/quickshell/assets/icons/openai-symbolic.svg b/.config/quickshell/ii/assets/icons/openai-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/openai-symbolic.svg rename to .config/quickshell/ii/assets/icons/openai-symbolic.svg diff --git a/.config/quickshell/assets/icons/openrouter-symbolic.svg b/.config/quickshell/ii/assets/icons/openrouter-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/openrouter-symbolic.svg rename to .config/quickshell/ii/assets/icons/openrouter-symbolic.svg diff --git a/.config/quickshell/assets/icons/spark-symbolic.svg b/.config/quickshell/ii/assets/icons/spark-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/spark-symbolic.svg rename to .config/quickshell/ii/assets/icons/spark-symbolic.svg diff --git a/.config/quickshell/assets/icons/ubuntu-symbolic.svg b/.config/quickshell/ii/assets/icons/ubuntu-symbolic.svg similarity index 100% rename from .config/quickshell/assets/icons/ubuntu-symbolic.svg rename to .config/quickshell/ii/assets/icons/ubuntu-symbolic.svg diff --git a/.config/quickshell/assets/images/default_wallpaper.png b/.config/quickshell/ii/assets/images/default_wallpaper.png similarity index 100% rename from .config/quickshell/assets/images/default_wallpaper.png rename to .config/quickshell/ii/assets/images/default_wallpaper.png diff --git a/.config/quickshell/defaults/ai/prompts/NoPrompt.md b/.config/quickshell/ii/defaults/ai/prompts/NoPrompt.md similarity index 100% rename from .config/quickshell/defaults/ai/prompts/NoPrompt.md rename to .config/quickshell/ii/defaults/ai/prompts/NoPrompt.md diff --git a/.config/quickshell/defaults/ai/prompts/ii-Default.md b/.config/quickshell/ii/defaults/ai/prompts/ii-Default.md similarity index 100% rename from .config/quickshell/defaults/ai/prompts/ii-Default.md rename to .config/quickshell/ii/defaults/ai/prompts/ii-Default.md diff --git a/.config/quickshell/defaults/ai/prompts/ii-Imouto.md b/.config/quickshell/ii/defaults/ai/prompts/ii-Imouto.md similarity index 100% rename from .config/quickshell/defaults/ai/prompts/ii-Imouto.md rename to .config/quickshell/ii/defaults/ai/prompts/ii-Imouto.md diff --git a/.config/quickshell/defaults/ai/prompts/w-FourPointedSparkle.md b/.config/quickshell/ii/defaults/ai/prompts/w-FourPointedSparkle.md similarity index 100% rename from .config/quickshell/defaults/ai/prompts/w-FourPointedSparkle.md rename to .config/quickshell/ii/defaults/ai/prompts/w-FourPointedSparkle.md diff --git a/.config/quickshell/defaults/ai/prompts/w-OpenMechanicalFlower.md b/.config/quickshell/ii/defaults/ai/prompts/w-OpenMechanicalFlower.md similarity index 100% rename from .config/quickshell/defaults/ai/prompts/w-OpenMechanicalFlower.md rename to .config/quickshell/ii/defaults/ai/prompts/w-OpenMechanicalFlower.md diff --git a/.config/quickshell/modules/backgroundWidgets/BackgroundWidgets.qml b/.config/quickshell/ii/modules/backgroundWidgets/BackgroundWidgets.qml similarity index 97% rename from .config/quickshell/modules/backgroundWidgets/BackgroundWidgets.qml rename to .config/quickshell/ii/modules/backgroundWidgets/BackgroundWidgets.qml index 4197e4959..35f30534e 100644 --- a/.config/quickshell/modules/backgroundWidgets/BackgroundWidgets.qml +++ b/.config/quickshell/ii/modules/backgroundWidgets/BackgroundWidgets.qml @@ -80,9 +80,9 @@ Scope { right: true } color: "transparent" - HyprlandWindow.visibleMask: Region { - item: widgetBackground - } + // HyprlandWindow.visibleMask: Region { // Buggy with scaled monitors + // item: widgetBackground + // } Rectangle { id: widgetBackground diff --git a/.config/quickshell/modules/bar/ActiveWindow.qml b/.config/quickshell/ii/modules/bar/ActiveWindow.qml similarity index 56% rename from .config/quickshell/modules/bar/ActiveWindow.qml rename to .config/quickshell/ii/modules/bar/ActiveWindow.qml index 0c4838fc6..b0f8e0492 100644 --- a/.config/quickshell/modules/bar/ActiveWindow.qml +++ b/.config/quickshell/ii/modules/bar/ActiveWindow.qml @@ -1,3 +1,4 @@ +import "root:/services" import "root:/modules/common" import "root:/modules/common/widgets" import "root:/services/" @@ -12,6 +13,10 @@ Item { readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen) readonly property Toplevel activeWindow: ToplevelManager.activeToplevel + property string activeWindowAddress: `0x${activeWindow.HyprlandToplevel.address}` + property bool focusingThisMonitor: HyprlandData.activeWorkspace.monitor == monitor.name + property var biggestWindow: HyprlandData.biggestWindowForWorkspace(HyprlandData.monitors[root.monitor.id].activeWorkspace.id) + implicitWidth: colLayout.implicitWidth ColumnLayout { @@ -27,7 +32,10 @@ Item { font.pixelSize: Appearance.font.pixelSize.smaller color: Appearance.colors.colSubtext elide: Text.ElideRight - text: root.activeWindow?.activated ? root.activeWindow?.appId : Translation.tr("Desktop") + text: root.focusingThisMonitor && root.activeWindow?.activated && root.biggestWindow ? + root.activeWindow?.appId : + (root.biggestWindow?.class) ?? Translation.tr("Desktop") + } StyledText { @@ -35,7 +43,9 @@ Item { font.pixelSize: Appearance.font.pixelSize.small color: Appearance.colors.colOnLayer0 elide: Text.ElideRight - text: root.activeWindow?.activated ? root.activeWindow?.title : `${Translation.tr("Workspace")} ${monitor.activeWorkspace?.id}` + text: root.focusingThisMonitor && root.activeWindow?.activated && root.biggestWindow ? + root.activeWindow?.title : + (root.biggestWindow?.title) ?? `${Translation.tr("Workspace")} ${monitor.activeWorkspace?.id}` } } diff --git a/.config/quickshell/ii/modules/bar/Bar.qml b/.config/quickshell/ii/modules/bar/Bar.qml new file mode 100644 index 000000000..eeb77f993 --- /dev/null +++ b/.config/quickshell/ii/modules/bar/Bar.qml @@ -0,0 +1,615 @@ +import "root:/" +import "root:/services" +import "root:/modules/common/" +import "root:/modules/common/widgets" +import "root:/modules/common/functions/color_utils.js" as ColorUtils +import "root:/modules/bar/weather" +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Qt5Compat.GraphicalEffects +import Quickshell +import Quickshell.Io +import Quickshell.Wayland +import Quickshell.Hyprland +import Quickshell.Services.UPower + +Scope { + id: bar + + readonly property int osdHideMouseMoveThreshold: 20 + property bool showBarBackground: Config.options.bar.showBackground + + component VerticalBarSeparator: Rectangle { + Layout.topMargin: Appearance.sizes.baseBarHeight / 3 + Layout.bottomMargin: Appearance.sizes.baseBarHeight / 3 + Layout.fillHeight: true + implicitWidth: 1 + color: Appearance.colors.colOutlineVariant + } + + Variants { + // For each monitor + model: { + const screens = Quickshell.screens; + const list = Config.options.bar.screenList; + if (!list || list.length === 0) + return screens; + return screens.filter(screen => list.includes(screen.name)); + } + LazyLoader { + id: barLoader + activeAsync: GlobalStates.barOpen + required property ShellScreen modelData + component: PanelWindow { // Bar window + id: barRoot + screen: barLoader.modelData + + property var brightnessMonitor: Brightness.getMonitorForScreen(barLoader.modelData) + property real useShortenedForm: (Appearance.sizes.barHellaShortenScreenWidthThreshold >= screen.width) ? 2 : (Appearance.sizes.barShortenScreenWidthThreshold >= screen.width) ? 1 : 0 + readonly property int centerSideModuleWidth: (useShortenedForm == 2) ? Appearance.sizes.barCenterSideModuleWidthHellaShortened : (useShortenedForm == 1) ? Appearance.sizes.barCenterSideModuleWidthShortened : Appearance.sizes.barCenterSideModuleWidth + + WlrLayershell.namespace: "quickshell:bar" + implicitHeight: Appearance.sizes.barHeight + Appearance.rounding.screenRounding + exclusiveZone: Appearance.sizes.baseBarHeight + (Config.options.bar.cornerStyle === 1 ? Appearance.sizes.hyprlandGapsOut : 0) + mask: Region { + item: barContent + } + color: "transparent" + + anchors { + top: !Config.options.bar.bottom + bottom: Config.options.bar.bottom + left: true + right: true + } + + Item { // Bar content region + id: barContent + anchors { + right: parent.right + left: parent.left + top: parent.top + bottom: undefined + } + implicitHeight: Appearance.sizes.barHeight + height: Appearance.sizes.barHeight + + states: State { + name: "bottom" + when: Config.options.bar.bottom + AnchorChanges { + target: barContent + anchors { + right: parent.right + left: parent.left + top: undefined + bottom: parent.bottom + } + } + } + + // Background shadow + Loader { + active: showBarBackground && Config.options.bar.cornerStyle === 1 + anchors.fill: barBackground + sourceComponent: StyledRectangularShadow { + anchors.fill: undefined // The loader's anchors act on this, and this should not have any anchor + target: barBackground + } + } + // Background + Rectangle { + id: barBackground + anchors { + fill: parent + margins: Config.options.bar.cornerStyle === 1 ? (Appearance.sizes.hyprlandGapsOut) : 0 // idk why but +1 is needed + } + color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" + radius: Config.options.bar.cornerStyle === 1 ? Appearance.rounding.windowRounding : 0 + border.width: Config.options.bar.cornerStyle === 1 ? 1 : 0 + border.color: Appearance.m3colors.m3outlineVariant + } + + MouseArea { // Left side | scroll to change brightness + id: barLeftSideMouseArea + anchors.left: parent.left + implicitHeight: Appearance.sizes.baseBarHeight + height: Appearance.sizes.barHeight + width: (barRoot.width - middleSection.width) / 2 + property bool hovered: false + property real lastScrollX: 0 + property real lastScrollY: 0 + property bool trackingScroll: false + acceptedButtons: Qt.LeftButton + hoverEnabled: true + propagateComposedEvents: true + onEntered: event => { + barLeftSideMouseArea.hovered = true; + } + onExited: event => { + barLeftSideMouseArea.hovered = false; + barLeftSideMouseArea.trackingScroll = false; + } + onPressed: event => { + if (event.button === Qt.LeftButton) { + Hyprland.dispatch('global quickshell:sidebarLeftOpen'); + } + } + // Scroll to change brightness + WheelHandler { + onWheel: event => { + if (event.angleDelta.y < 0) + barRoot.brightnessMonitor.setBrightness(barRoot.brightnessMonitor.brightness - 0.05); + else if (event.angleDelta.y > 0) + barRoot.brightnessMonitor.setBrightness(barRoot.brightnessMonitor.brightness + 0.05); + // Store the mouse position and start tracking + barLeftSideMouseArea.lastScrollX = event.x; + barLeftSideMouseArea.lastScrollY = event.y; + barLeftSideMouseArea.trackingScroll = true; + } + acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad + } + onPositionChanged: mouse => { + if (barLeftSideMouseArea.trackingScroll) { + const dx = mouse.x - barLeftSideMouseArea.lastScrollX; + const dy = mouse.y - barLeftSideMouseArea.lastScrollY; + if (Math.sqrt(dx * dx + dy * dy) > osdHideMouseMoveThreshold) { + Hyprland.dispatch('global quickshell:osdBrightnessHide'); + barLeftSideMouseArea.trackingScroll = false; + } + } + } + Item { + // Left section + anchors.fill: parent + implicitHeight: leftSectionRowLayout.implicitHeight + implicitWidth: leftSectionRowLayout.implicitWidth + + ScrollHint { + reveal: barLeftSideMouseArea.hovered + icon: "light_mode" + tooltipText: qsTr("Scroll to change brightness") + side: "left" + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + } + + RowLayout { // Content + id: leftSectionRowLayout + anchors.fill: parent + spacing: 10 + + RippleButton { + // Left sidebar button + Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter + Layout.leftMargin: Appearance.rounding.screenRounding + Layout.fillWidth: false + property real buttonPadding: 5 + implicitWidth: distroIcon.width + buttonPadding * 2 + implicitHeight: distroIcon.height + buttonPadding * 2 + + buttonRadius: Appearance.rounding.full + colBackground: barLeftSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : ColorUtils.transparentize(Appearance.colors.colLayer1Hover, 1) + colBackgroundHover: Appearance.colors.colLayer1Hover + colRipple: Appearance.colors.colLayer1Active + colBackgroundToggled: Appearance.colors.colSecondaryContainer + colBackgroundToggledHover: Appearance.colors.colSecondaryContainerHover + colRippleToggled: Appearance.colors.colSecondaryContainerActive + toggled: GlobalStates.sidebarLeftOpen + property color colText: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer0 + + onPressed: { + Hyprland.dispatch('global quickshell:sidebarLeftToggle'); + } + + CustomIcon { + id: distroIcon + anchors.centerIn: parent + width: 19.5 + height: 19.5 + source: Config.options.bar.topLeftIcon == 'distro' ? SystemInfo.distroIcon : "spark-symbolic" + colorize: true + color: Appearance.colors.colOnLayer0 + } + } + + ActiveWindow { + visible: barRoot.useShortenedForm === 0 + Layout.rightMargin: Appearance.rounding.screenRounding + Layout.fillWidth: true + Layout.fillHeight: true + bar: barRoot + } + } + } + } + + RowLayout { // Middle section + id: middleSection + anchors.centerIn: parent + spacing: Config.options?.bar.borderless ? 4 : 8 + + BarGroup { + id: leftCenterGroup + Layout.preferredWidth: barRoot.centerSideModuleWidth + Layout.fillHeight: true + + Resources { + alwaysShowAllResources: barRoot.useShortenedForm === 2 + Layout.fillWidth: barRoot.useShortenedForm === 2 + } + + Media { + visible: barRoot.useShortenedForm < 2 + Layout.fillWidth: true + } + } + + VerticalBarSeparator { + visible: Config.options?.bar.borderless + } + + BarGroup { + id: middleCenterGroup + padding: workspacesWidget.widgetPadding + Layout.fillHeight: true + + Workspaces { + id: workspacesWidget + bar: barRoot + Layout.fillHeight: true + MouseArea { + // Right-click to toggle overview + anchors.fill: parent + acceptedButtons: Qt.RightButton + + onPressed: event => { + if (event.button === Qt.RightButton) { + Hyprland.dispatch('global quickshell:overviewToggle'); + } + } + } + } + } + + VerticalBarSeparator { + visible: Config.options?.bar.borderless + } + + MouseArea { + id: rightCenterGroup + implicitWidth: rightCenterGroupContent.implicitWidth + implicitHeight: rightCenterGroupContent.implicitHeight + Layout.preferredWidth: barRoot.centerSideModuleWidth + Layout.fillHeight: true + + onPressed: { + Hyprland.dispatch('global quickshell:sidebarRightToggle'); + } + + BarGroup { + id: rightCenterGroupContent + anchors.fill: parent + + ClockWidget { + showDate: (Config.options.bar.verbose && barRoot.useShortenedForm < 2) + Layout.alignment: Qt.AlignVCenter + Layout.fillWidth: true + } + + UtilButtons { + visible: (Config.options.bar.verbose && barRoot.useShortenedForm === 0) + Layout.alignment: Qt.AlignVCenter + } + + BatteryIndicator { + visible: (barRoot.useShortenedForm < 2 && UPower.displayDevice.isLaptopBattery) + Layout.alignment: Qt.AlignVCenter + } + } + } + + VerticalBarSeparator { + visible: Config.options.bar.borderless && Config.options.bar.weather.enable + } + } + + MouseArea { // Right side | scroll to change volume + id: barRightSideMouseArea + + anchors.right: parent.right + implicitHeight: Appearance.sizes.baseBarHeight + height: Appearance.sizes.barHeight + width: (barRoot.width - middleSection.width) / 2 + + property bool hovered: false + property real lastScrollX: 0 + property real lastScrollY: 0 + property bool trackingScroll: false + + acceptedButtons: Qt.LeftButton + hoverEnabled: true + propagateComposedEvents: true + onEntered: event => { + barRightSideMouseArea.hovered = true; + } + onExited: event => { + barRightSideMouseArea.hovered = false; + barRightSideMouseArea.trackingScroll = false; + } + onPressed: event => { + if (event.button === Qt.LeftButton) { + Hyprland.dispatch('global quickshell:sidebarRightOpen'); + } else if (event.button === Qt.RightButton) { + MprisController.activePlayer.next(); + } + } + // Scroll to change volume + WheelHandler { + onWheel: event => { + const currentVolume = Audio.value; + const step = currentVolume < 0.1 ? 0.01 : 0.02 || 0.2; + if (event.angleDelta.y < 0) + Audio.sink.audio.volume -= step; + else if (event.angleDelta.y > 0) + Audio.sink.audio.volume = Math.min(1, Audio.sink.audio.volume + step); + // Store the mouse position and start tracking + barRightSideMouseArea.lastScrollX = event.x; + barRightSideMouseArea.lastScrollY = event.y; + barRightSideMouseArea.trackingScroll = true; + } + acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad + } + onPositionChanged: mouse => { + if (barRightSideMouseArea.trackingScroll) { + const dx = mouse.x - barRightSideMouseArea.lastScrollX; + const dy = mouse.y - barRightSideMouseArea.lastScrollY; + if (Math.sqrt(dx * dx + dy * dy) > osdHideMouseMoveThreshold) { + Hyprland.dispatch('global quickshell:osdVolumeHide'); + barRightSideMouseArea.trackingScroll = false; + } + } + } + + Item { + anchors.fill: parent + implicitHeight: rightSectionRowLayout.implicitHeight + implicitWidth: rightSectionRowLayout.implicitWidth + + ScrollHint { + reveal: barRightSideMouseArea.hovered + icon: "volume_up" + tooltipText: qsTr("Scroll to change volume") + side: "right" + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + } + + RowLayout { + id: rightSectionRowLayout + anchors.fill: parent + spacing: 5 + layoutDirection: Qt.RightToLeft + + RippleButton { // Right sidebar button + id: rightSidebarButton + + Layout.alignment: Qt.AlignRight | Qt.AlignVCenter + Layout.rightMargin: Appearance.rounding.screenRounding + Layout.fillWidth: false + + implicitWidth: indicatorsRowLayout.implicitWidth + 10 * 2 + implicitHeight: indicatorsRowLayout.implicitHeight + 5 * 2 + + buttonRadius: Appearance.rounding.full + colBackground: barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : ColorUtils.transparentize(Appearance.colors.colLayer1Hover, 1) + colBackgroundHover: Appearance.colors.colLayer1Hover + colRipple: Appearance.colors.colLayer1Active + colBackgroundToggled: Appearance.colors.colSecondaryContainer + colBackgroundToggledHover: Appearance.colors.colSecondaryContainerHover + colRippleToggled: Appearance.colors.colSecondaryContainerActive + toggled: GlobalStates.sidebarRightOpen + property color colText: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer0 + + Behavior on colText { + animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) + } + + onPressed: { + Hyprland.dispatch('global quickshell:sidebarRightToggle'); + } + + RowLayout { + id: indicatorsRowLayout + anchors.centerIn: parent + property real realSpacing: 15 + spacing: 0 + + Revealer { + reveal: Audio.sink?.audio?.muted ?? false + Layout.fillHeight: true + Layout.rightMargin: reveal ? indicatorsRowLayout.realSpacing : 0 + Behavior on Layout.rightMargin { + NumberAnimation { + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + } + } + MaterialSymbol { + text: "volume_off" + iconSize: Appearance.font.pixelSize.larger + color: rightSidebarButton.colText + } + } + Revealer { + reveal: Audio.source?.audio?.muted ?? false + Layout.fillHeight: true + Layout.rightMargin: reveal ? indicatorsRowLayout.realSpacing : 0 + Behavior on Layout.rightMargin { + NumberAnimation { + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + } + } + MaterialSymbol { + text: "mic_off" + iconSize: Appearance.font.pixelSize.larger + color: rightSidebarButton.colText + } + } + MaterialSymbol { + Layout.rightMargin: indicatorsRowLayout.realSpacing + text: Network.materialSymbol + iconSize: Appearance.font.pixelSize.larger + color: rightSidebarButton.colText + } + MaterialSymbol { + text: Bluetooth.bluetoothConnected ? "bluetooth_connected" : Bluetooth.bluetoothEnabled ? "bluetooth" : "bluetooth_disabled" + iconSize: Appearance.font.pixelSize.larger + color: rightSidebarButton.colText + } + } + } + + SysTray { + bar: barRoot + visible: barRoot.useShortenedForm === 0 + Layout.fillWidth: false + Layout.fillHeight: true + } + + Item { + Layout.fillWidth: true + Layout.fillHeight: true + } + + // Weather + Loader { + Layout.leftMargin: 8 + Layout.fillHeight: true + active: Config.options.bar.weather.enable + sourceComponent: BarGroup { + implicitHeight: Appearance.sizes.baseBarHeight + WeatherBar {} + } + } + } + } + } + } + + // Round decorators + Loader { + id: roundDecorators + anchors { + left: parent.left + right: parent.right + } + y: Appearance.sizes.barHeight + width: parent.width + height: Appearance.rounding.screenRounding + active: showBarBackground && Config.options.bar.cornerStyle === 0 // Hug + + states: State { + name: "bottom" + when: Config.options.bar.bottom + PropertyChanges { + roundDecorators.y: 0 + } + } + + sourceComponent: Item { + implicitHeight: Appearance.rounding.screenRounding + RoundCorner { + id: leftCorner + anchors { + top: parent.top + bottom: parent.bottom + left: parent.left + } + + size: Appearance.rounding.screenRounding + color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" + opacity: 1.0 - Appearance.transparency + + corner: RoundCorner.CornerEnum.TopLeft + states: State { + name: "bottom" + when: Config.options.bar.bottom + PropertyChanges { + leftCorner.corner: RoundCorner.CornerEnum.BottomLeft + } + } + } + RoundCorner { + id: rightCorner + anchors { + right: parent.right + top: !Config.options.bar.bottom ? parent.top : undefined + bottom: Config.options.bar.bottom ? parent.bottom : undefined + } + size: Appearance.rounding.screenRounding + color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" + opacity: 1.0 - Appearance.transparency + + corner: RoundCorner.CornerEnum.TopRight + states: State { + name: "bottom" + when: Config.options.bar.bottom + PropertyChanges { + rightCorner.corner: RoundCorner.CornerEnum.BottomRight + } + } + } + } + } + } + } + } + + IpcHandler { + target: "bar" + + function toggle(): void { + GlobalStates.barOpen = !GlobalStates.barOpen + } + + function close(): void { + GlobalStates.barOpen = false + } + + function open(): void { + GlobalStates.barOpen = true + } + } + + GlobalShortcut { + name: "barToggle" + description: qsTr("Toggles bar on press") + + onPressed: { + GlobalStates.barOpen = !GlobalStates.barOpen; + } + } + + GlobalShortcut { + name: "barOpen" + description: qsTr("Opens bar on press") + + onPressed: { + GlobalStates.barOpen = true; + } + } + + GlobalShortcut { + name: "barClose" + description: qsTr("Closes bar on press") + + onPressed: { + GlobalStates.barOpen = false; + } + } +} diff --git a/.config/quickshell/modules/bar/BarGroup.qml b/.config/quickshell/ii/modules/bar/BarGroup.qml similarity index 100% rename from .config/quickshell/modules/bar/BarGroup.qml rename to .config/quickshell/ii/modules/bar/BarGroup.qml diff --git a/.config/quickshell/modules/bar/BatteryIndicator.qml b/.config/quickshell/ii/modules/bar/BatteryIndicator.qml similarity index 100% rename from .config/quickshell/modules/bar/BatteryIndicator.qml rename to .config/quickshell/ii/modules/bar/BatteryIndicator.qml diff --git a/.config/quickshell/modules/bar/CircleUtilButton.qml b/.config/quickshell/ii/modules/bar/CircleUtilButton.qml similarity index 100% rename from .config/quickshell/modules/bar/CircleUtilButton.qml rename to .config/quickshell/ii/modules/bar/CircleUtilButton.qml diff --git a/.config/quickshell/modules/bar/ClockWidget.qml b/.config/quickshell/ii/modules/bar/ClockWidget.qml similarity index 100% rename from .config/quickshell/modules/bar/ClockWidget.qml rename to .config/quickshell/ii/modules/bar/ClockWidget.qml diff --git a/.config/quickshell/modules/bar/Media.qml b/.config/quickshell/ii/modules/bar/Media.qml similarity index 100% rename from .config/quickshell/modules/bar/Media.qml rename to .config/quickshell/ii/modules/bar/Media.qml diff --git a/.config/quickshell/modules/bar/Resource.qml b/.config/quickshell/ii/modules/bar/Resource.qml similarity index 100% rename from .config/quickshell/modules/bar/Resource.qml rename to .config/quickshell/ii/modules/bar/Resource.qml diff --git a/.config/quickshell/modules/bar/Resources.qml b/.config/quickshell/ii/modules/bar/Resources.qml similarity index 100% rename from .config/quickshell/modules/bar/Resources.qml rename to .config/quickshell/ii/modules/bar/Resources.qml diff --git a/.config/quickshell/modules/bar/ScrollHint.qml b/.config/quickshell/ii/modules/bar/ScrollHint.qml similarity index 100% rename from .config/quickshell/modules/bar/ScrollHint.qml rename to .config/quickshell/ii/modules/bar/ScrollHint.qml diff --git a/.config/quickshell/modules/bar/SysTray.qml b/.config/quickshell/ii/modules/bar/SysTray.qml similarity index 100% rename from .config/quickshell/modules/bar/SysTray.qml rename to .config/quickshell/ii/modules/bar/SysTray.qml diff --git a/.config/quickshell/modules/bar/SysTrayItem.qml b/.config/quickshell/ii/modules/bar/SysTrayItem.qml similarity index 100% rename from .config/quickshell/modules/bar/SysTrayItem.qml rename to .config/quickshell/ii/modules/bar/SysTrayItem.qml diff --git a/.config/quickshell/modules/bar/UtilButtons.qml b/.config/quickshell/ii/modules/bar/UtilButtons.qml similarity index 100% rename from .config/quickshell/modules/bar/UtilButtons.qml rename to .config/quickshell/ii/modules/bar/UtilButtons.qml diff --git a/.config/quickshell/modules/bar/Workspaces.qml b/.config/quickshell/ii/modules/bar/Workspaces.qml similarity index 91% rename from .config/quickshell/modules/bar/Workspaces.qml rename to .config/quickshell/ii/modules/bar/Workspaces.qml index 060113707..f4d7c73d0 100644 --- a/.config/quickshell/modules/bar/Workspaces.qml +++ b/.config/quickshell/ii/modules/bar/Workspaces.qml @@ -173,14 +173,7 @@ Item { id: workspaceButtonBackground implicitWidth: workspaceButtonWidth implicitHeight: workspaceButtonWidth - property var biggestWindow: { - const windowsInThisWorkspace = HyprlandData.windowList.filter(w => w.workspace.id == button.workspaceValue) - return windowsInThisWorkspace.reduce((maxWin, win) => { - const maxArea = (maxWin?.size?.[0] ?? 0) * (maxWin?.size?.[1] ?? 0) - const winArea = (win?.size?.[0] ?? 0) * (win?.size?.[1] ?? 0) - return winArea > maxArea ? win : maxWin - }, null) - } + property var biggestWindow: HyprlandData.biggestWindowForWorkspace(button.workspaceValue) property var mainAppIconSource: Quickshell.iconPath(AppSearch.guessIcon(biggestWindow?.class), "image-missing") StyledText { // Workspace number text @@ -206,6 +199,7 @@ Item { } } Rectangle { // Dot instead of ws number + id: wsDot opacity: (Config.options?.bar.workspaces.alwaysShowNumbers || GlobalStates.workspaceShowNumbers || (Config.options?.bar.workspaces.showAppIcons && workspaceButtonBackground.biggestWindow) @@ -257,6 +251,25 @@ Item { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } } + + Loader { + active: Config.options.bar.workspaces.monochromeIcons + anchors.fill: mainAppIcon + sourceComponent: Item { + Desaturate { + id: desaturatedIcon + visible: false // There's already color overlay + anchors.fill: parent + source: mainAppIcon + desaturation: 0.8 + } + ColorOverlay { + anchors.fill: desaturatedIcon + source: desaturatedIcon + color: ColorUtils.transparentize(wsDot.color, 0.9) + } + } + } } } diff --git a/.config/quickshell/ii/modules/bar/weather/WeatherBar.qml b/.config/quickshell/ii/modules/bar/weather/WeatherBar.qml new file mode 100644 index 000000000..eae1b6132 --- /dev/null +++ b/.config/quickshell/ii/modules/bar/weather/WeatherBar.qml @@ -0,0 +1,58 @@ +pragma ComponentBehavior: Bound +import "root:/modules/common" +import "root:/modules/common/widgets" +import "root:/services" +import Quickshell +import QtQuick +import QtQuick.Layouts + +MouseArea { + id: root + property real margin: 10 + property bool hovered: false + implicitWidth: rowLayout.implicitWidth + margin * 2 + implicitHeight: rowLayout.implicitHeight + + hoverEnabled: true + + RowLayout { + id: rowLayout + anchors.centerIn: parent + + MaterialSymbol { + fill: 0 + text: WeatherIcons.codeToName[Weather.data.wCode] + iconSize: Appearance.font.pixelSize.large + color: Appearance.colors.colOnLayer1 + Layout.alignment: Qt.AlignVCenter + } + + StyledText { + visible: true + font.pixelSize: Appearance.font.pixelSize.small + color: Appearance.colors.colOnLayer1 + text: Weather.data.temp + Layout.alignment: Qt.AlignVCenter + } + } + + LazyLoader { + id: popupLoader + active: root.containsMouse + + component: PopupWindow { + id: popupWindow + visible: true + implicitWidth: weatherPopup.implicitWidth + implicitHeight: weatherPopup.implicitHeight + anchor.item: root + anchor.edges: Edges.Bottom + anchor.rect.x: (root.implicitWidth - popupWindow.implicitWidth) / 2 + anchor.rect.y: root.implicitHeight + 10 + color: "transparent" + WeatherPopup { + id: weatherPopup + } + } + } +} diff --git a/.config/quickshell/ii/modules/bar/weather/WeatherCard.qml b/.config/quickshell/ii/modules/bar/weather/WeatherCard.qml new file mode 100644 index 000000000..7b81fe543 --- /dev/null +++ b/.config/quickshell/ii/modules/bar/weather/WeatherCard.qml @@ -0,0 +1,43 @@ +import QtQuick +import QtQuick.Layouts + +import "root:/modules/common" +import "root:/modules/common/widgets" + +Rectangle { + id: root + radius: Appearance.rounding.small + color: Appearance.colors.colLayer1 + implicitWidth: columnLayout.implicitWidth * 2 + implicitHeight: columnLayout.implicitHeight * 2 + Layout.fillWidth: parent + + property alias title: title.text + property alias value: value.text + property alias symbol: symbol.text + + ColumnLayout { + id: columnLayout + anchors.fill: parent + spacing: -10 + RowLayout { + Layout.alignment: Qt.AlignHCenter + MaterialSymbol { + id: symbol + fill: 0 + iconSize: Appearance.font.pixelSize.normal + } + StyledText { + id: title + font.pixelSize: Appearance.font.pixelSize.smaller + color: Appearance.colors.colOnLayer1 + } + } + StyledText { + id: value + Layout.alignment: Qt.AlignHCenter + font.pixelSize: Appearance.font.pixelSize.normal + color: Appearance.colors.colOnLayer1 + } + } +} diff --git a/.config/quickshell/ii/modules/bar/weather/WeatherIcons.qml b/.config/quickshell/ii/modules/bar/weather/WeatherIcons.qml new file mode 100644 index 000000000..bd74d4e17 --- /dev/null +++ b/.config/quickshell/ii/modules/bar/weather/WeatherIcons.qml @@ -0,0 +1,59 @@ +pragma Singleton + +import Quickshell + +Singleton { + // credits: calestia + // this snippet is taken from + // https://github.com/caelestia-dots/shell + readonly property var codeToName: ({ + "113": "clear_day", + "116": "partly_cloudy_day", + "119": "cloud", + "122": "cloud", + "143": "foggy", + "176": "rainy", + "179": "rainy", + "182": "rainy", + "185": "rainy", + "200": "thunderstorm", + "227": "cloudy_snowing", + "230": "snowing_heavy", + "248": "foggy", + "260": "foggy", + "263": "rainy", + "266": "rainy", + "281": "rainy", + "284": "rainy", + "293": "rainy", + "296": "rainy", + "299": "rainy", + "302": "weather_hail", + "305": "rainy", + "308": "weather_hail", + "311": "rainy", + "314": "rainy", + "317": "rainy", + "320": "cloudy_snowing", + "323": "cloudy_snowing", + "326": "cloudy_snowing", + "329": "snowing_heavy", + "332": "snowing_heavy", + "335": "snowing", + "338": "snowing_heavy", + "350": "rainy", + "353": "rainy", + "356": "rainy", + "359": "weather_hail", + "362": "rainy", + "365": "rainy", + "368": "cloudy_snowing", + "371": "snowing", + "374": "rainy", + "377": "rainy", + "386": "thunderstorm", + "389": "thunderstorm", + "392": "thunderstorm", + "395": "snowing" + }) +} diff --git a/.config/quickshell/ii/modules/bar/weather/WeatherPopup.qml b/.config/quickshell/ii/modules/bar/weather/WeatherPopup.qml new file mode 100644 index 000000000..b39fffd37 --- /dev/null +++ b/.config/quickshell/ii/modules/bar/weather/WeatherPopup.qml @@ -0,0 +1,96 @@ +import "root:/services" +import "root:/modules/common" +import "root:/modules/common/widgets" + +import QtQuick +import QtQuick.Layouts + +Rectangle { + id: root + readonly property real margin: 10 + implicitWidth: columnLayout.implicitWidth + margin * 2 + implicitHeight: columnLayout.implicitHeight + margin * 2 + color: Appearance.colors.colLayer0 + radius: Appearance.rounding.small + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant + clip: true + + ColumnLayout { + id: columnLayout + spacing: 5 + anchors.centerIn: root + implicitWidth: Math.max(header.implicitWidth, gridLayout.implicitWidth) + implicitHeight: gridLayout.implicitHeight + + // Header + RowLayout { + id: header + spacing: 5 + Layout.fillWidth: parent + Layout.alignment: Qt.AlignHCenter + MaterialSymbol { + fill: 0 + text: "location_on" + iconSize: Appearance.font.pixelSize.huge + } + + StyledText { + text: Weather.data.city + font.pixelSize: Appearance.font.pixelSize.title + font.family: Appearance.font.family.title + color: Appearance.colors.colOnLayer0 + } + } + + // Metrics grid + GridLayout { + id: gridLayout + columns: 2 + rowSpacing: 5 + columnSpacing: 5 + uniformCellWidths: true + + WeatherCard { + title: "UV Index" + symbol: "wb_sunny" + value: Weather.data.uv + } + WeatherCard { + title: "Wind" + symbol: "air" + value: `(${Weather.data.windDir}) ${Weather.data.wind}` + } + WeatherCard { + title: "Precipitation" + symbol: "rainy_light" + value: Weather.data.precip + } + WeatherCard { + title: "Humidity" + symbol: "humidity_low" + value: Weather.data.humidity + } + WeatherCard { + title: "Visibility" + symbol: "visibility" + value: Weather.data.visib + } + WeatherCard { + title: "Pressure" + symbol: "readiness_score" + value: Weather.data.press + } + WeatherCard { + title: "Sunrise" + symbol: "wb_twilight" + value: Weather.data.sunrise + } + WeatherCard { + title: "Sunset" + symbol: "bedtime" + value: Weather.data.sunset + } + } + } +} diff --git a/.config/quickshell/modules/cheatsheet/Cheatsheet.qml b/.config/quickshell/ii/modules/cheatsheet/Cheatsheet.qml similarity index 54% rename from .config/quickshell/modules/cheatsheet/Cheatsheet.qml rename to .config/quickshell/ii/modules/cheatsheet/Cheatsheet.qml index 83d9fd654..ca9198f9d 100644 --- a/.config/quickshell/modules/cheatsheet/Cheatsheet.qml +++ b/.config/quickshell/ii/modules/cheatsheet/Cheatsheet.qml @@ -7,6 +7,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Effects import QtQuick.Layouts +import Qt5Compat.GraphicalEffects import Quickshell.Io import Quickshell import Quickshell.Widgets @@ -15,11 +16,22 @@ import Quickshell.Hyprland Scope { // Scope id: root + property var tabButtonList: [ + { + "icon": "keyboard", + "name": qsTr("Keybinds") + }, + { + "icon": "experiment", + "name": qsTr("Elements") + }, + ] + property int selectedTab: 0 Loader { id: cheatsheetLoader active: false - + sourceComponent: PanelWindow { // Window id: cheatsheetRoot visible: cheatsheetLoader.active @@ -32,7 +44,7 @@ Scope { // Scope } function hide() { - cheatsheetLoader.active = false + cheatsheetLoader.active = false; } exclusiveZone: 0 implicitWidth: cheatsheetBackground.width + Appearance.sizes.elevationMargin * 2 @@ -48,14 +60,14 @@ Scope { // Scope HyprlandFocusGrab { // Click outside to close id: grab - windows: [ cheatsheetRoot ] + windows: [cheatsheetRoot] active: cheatsheetRoot.visible onCleared: () => { - if (!active) cheatsheetRoot.hide() + if (!active) + cheatsheetRoot.hide(); } } - // Background StyledRectangularShadow { target: cheatsheetBackground @@ -64,14 +76,31 @@ Scope { // Scope id: cheatsheetBackground anchors.centerIn: parent color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant radius: Appearance.rounding.windowRounding property real padding: 30 implicitWidth: cheatsheetColumnLayout.implicitWidth + padding * 2 implicitHeight: cheatsheetColumnLayout.implicitHeight + padding * 2 - Keys.onPressed: (event) => { // Esc to close + Keys.onPressed: event => { // Esc to close if (event.key === Qt.Key_Escape) { - cheatsheetRoot.hide() + cheatsheetRoot.hide(); + } + if (event.modifiers === Qt.ControlModifier) { + if (event.key === Qt.Key_PageDown) { + root.selectedTab = Math.min(root.selectedTab + 1, root.tabButtonList.length - 1); + event.accepted = true; + } else if (event.key === Qt.Key_PageUp) { + root.selectedTab = Math.max(root.selectedTab - 1, 0); + event.accepted = true; + } else if (event.key === Qt.Key_Tab) { + root.selectedTab = (root.selectedTab + 1) % root.tabButtonList.length; + event.accepted = true; + } else if (event.key === Qt.Key_Backtab) { + root.selectedTab = (root.selectedTab - 1 + root.tabButtonList.length) % root.tabButtonList.length; + event.accepted = true; + } } } @@ -89,7 +118,7 @@ Scope { // Scope } onClicked: { - cheatsheetRoot.hide() + cheatsheetRoot.hide(); } contentItem: MaterialSymbol { @@ -112,10 +141,50 @@ Scope { // Scope font.pixelSize: Appearance.font.pixelSize.title text: Translation.tr("Cheat sheet") } - CheatsheetKeybinds {} + PrimaryTabBar { // Tab strip + id: tabBar + tabButtonList: root.tabButtonList + externalTrackedTab: root.selectedTab + function onCurrentIndexChanged(currentIndex) { + root.selectedTab = currentIndex; + } + } + + SwipeView { // Content pages + id: swipeView + Layout.topMargin: 5 + Layout.fillWidth: true + Layout.fillHeight: true + spacing: 10 + + Behavior on implicitWidth { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + + currentIndex: tabBar.externalTrackedTab + onCurrentIndexChanged: { + tabBar.enableIndicatorAnimation = true; + root.selectedTab = currentIndex; + } + + clip: true + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + width: swipeView.width + height: swipeView.height + radius: Appearance.rounding.small + } + } + + CheatsheetKeybinds {} + CheatsheetPeriodicTable {} + } } } - } } @@ -123,15 +192,15 @@ Scope { // Scope target: "cheatsheet" function toggle(): void { - cheatsheetLoader.active = !cheatsheetLoader.active + cheatsheetLoader.active = !cheatsheetLoader.active; } function close(): void { - cheatsheetLoader.active = false + cheatsheetLoader.active = false; } function open(): void { - cheatsheetLoader.active = true + cheatsheetLoader.active = true; } } @@ -161,5 +230,4 @@ Scope { // Scope cheatsheetLoader.active = false; } } - } diff --git a/.config/quickshell/modules/cheatsheet/CheatsheetKeybinds.qml b/.config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml similarity index 100% rename from .config/quickshell/modules/cheatsheet/CheatsheetKeybinds.qml rename to .config/quickshell/ii/modules/cheatsheet/CheatsheetKeybinds.qml diff --git a/.config/quickshell/ii/modules/cheatsheet/CheatsheetPeriodicTable.qml b/.config/quickshell/ii/modules/cheatsheet/CheatsheetPeriodicTable.qml new file mode 100644 index 000000000..774c522e3 --- /dev/null +++ b/.config/quickshell/ii/modules/cheatsheet/CheatsheetPeriodicTable.qml @@ -0,0 +1,73 @@ +import "root:/" +import "root:/services" +import "root:/modules/common" +import "root:/modules/common/widgets" +import "root:/modules/common/functions/file_utils.js" as FileUtils +import "periodic_table.js" as PTable +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import Quickshell.Io +import Quickshell.Widgets +import Quickshell.Hyprland + +Item { + id: root + readonly property var elements: PTable.elements + readonly property var series: PTable.series + property real spacing: 6 + implicitWidth: mainLayout.implicitWidth + implicitHeight: mainLayout.implicitHeight + + ColumnLayout { + id: mainLayout + spacing: root.spacing + + Repeater { // Main table rows + model: root.elements + + delegate: RowLayout { // Table cells + id: tableRow + spacing: root.spacing + required property var modelData + + Repeater { + model: tableRow.modelData + delegate: ElementTile { + required property var modelData + element: modelData + } + + } + } + + } + + Item { + id: gap + implicitHeight: 20 + } + + Repeater { // Main table rows + model: root.series + + delegate: RowLayout { // Table cells + id: seriesTableRow + spacing: root.spacing + required property var modelData + + Repeater { + model: seriesTableRow.modelData + delegate: ElementTile { + required property var modelData + element: modelData + } + + } + } + + } + } + +} \ No newline at end of file diff --git a/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml b/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml new file mode 100644 index 000000000..baeb72ad6 --- /dev/null +++ b/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml @@ -0,0 +1,59 @@ +import "root:/modules/common" +import "root:/modules/common/widgets" +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import Quickshell.Io + +RippleButton { + id: root + required property var element + opacity: element.type != "empty" ? 1 : 0 + implicitHeight: 60 + implicitWidth: 60 + colBackground: Appearance.colors.colLayer2 + buttonRadius: Appearance.rounding.small + + Rectangle { + anchors { + top: parent.top + left: parent.left + topMargin: 4 + leftMargin: 4 + } + color: Appearance.colors.colLayer2 + radius: Appearance.rounding.full + implicitWidth: Math.max(20, elementNumber.implicitWidth) + implicitHeight: Math.max(20, elementNumber.implicitHeight) + width: height + + StyledText { + id: elementNumber + anchors.centerIn: parent + color: Appearance.colors.colOnLayer2 + text: root.element.number + font.pixelSize: Appearance.font.pixelSize.smallest + } + } + + StyledText { + id: elementSymbol + anchors.centerIn: parent + color: Appearance.colors.colSecondary + font.pixelSize: Appearance.font.pixelSize.huge + text: root.element.symbol + } + + StyledText { + id: elementName + anchors { + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + bottomMargin: 4 + } + font.pixelSize: Appearance.font.pixelSize.smallest + color: Appearance.colors.colOnLayer2 + text: root.element.name + } +} diff --git a/.config/quickshell/ii/modules/cheatsheet/periodic_table.js b/.config/quickshell/ii/modules/cheatsheet/periodic_table.js new file mode 100644 index 000000000..45d69cc99 --- /dev/null +++ b/.config/quickshell/ii/modules/cheatsheet/periodic_table.js @@ -0,0 +1,196 @@ +// List of rows +const elements = [ + [ + { name: 'Hydrogen', symbol: 'H', number: 1, weight: 1.01, type: 'nonmetal' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: 'Helium', symbol: 'He', number: 2, weight: 4.00, type: 'noblegas' }, + ], + [ + { name: 'Lithium', symbol: 'Li', number: 3, weight: 6.94, type: 'metal' }, + { name: 'Beryllium', symbol: 'Be', number: 4, weight: 9.01, type: 'metal' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: 'Boron', symbol: 'B', number: 5, weight: 10.81, type: 'nonmetal' }, + { name: 'Carbon', symbol: 'C', number: 6, weight: 12.01, type: 'nonmetal' }, + { name: 'Nitrogen', symbol: 'N', number: 7, weight: 14.01, type: 'nonmetal' }, + { name: 'Oxygen', symbol: 'O', number: 8, weight: 16, type: 'nonmetal' }, + { name: 'Fluorine', symbol: 'F', number: 9, weight: 19, type: 'nonmetal' }, + { name: 'Neon', symbol: 'Ne', number: 10, weight: 20.18, type: 'noblegas' }, + + + ], + [ + { name: 'Sodium', symbol: 'Na', number: 11, weight: 22.99, type: 'metal' }, + { name: 'Magnesium', symbol: 'Mg', number: 12, weight: 24.31, type: 'metal' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: 'Aluminum', symbol: 'Al', number: 13, weight: 26.98, type: 'metal' }, + { name: 'Silicon', symbol: 'Si', number: 14, weight: 28.09, type: 'nonmetal' }, + { name: 'Phosphorus', symbol: 'P', number: 15, weight: 30.97, type: 'nonmetal' }, + { name: 'Sulfur', symbol: 'S', number: 16, weight: 32.07, type: 'nonmetal' }, + { name: 'Chlorine', symbol: 'Cl', number: 17, weight: 35.45, type: 'nonmetal' }, + { name: 'Argon', symbol: 'Ar', number: 18, weight: 39.95, type: 'noblegas' }, + ], + [ + { 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' }, + { name: 'Vanadium', symbol: 'V', number: 23, weight: 50.94, type: 'metal' }, + { name: 'Chromium', symbol: 'Cr', number: 24, weight: 52, type: 'metal'/*, icon: 'chromium-browser'*/ }, + { name: 'Manganese', symbol: 'Mn', number: 25, weight: 54.94, type: 'metal' }, + { name: 'Iron', symbol: 'Fe', number: 26, weight: 55.85, type: 'metal' }, + { name: 'Cobalt', symbol: 'Co', number: 27, weight: 58.93, type: 'metal' }, + { name: 'Nickel', symbol: 'Ni', number: 28, weight: 58.69, type: 'metal' }, + { name: 'Copper', symbol: 'Cu', number: 29, weight: 63.55, type: 'metal' }, + { name: 'Zinc', symbol: 'Zn', number: 30, weight: 65.38, type: 'metal' }, + { name: 'Gallium', symbol: 'Ga', number: 31, weight: 69.72, type: 'metal' }, + { name: 'Germanium', symbol: 'Ge', number: 32, weight: 72.63, type: 'metal' }, + { name: 'Arsenic', symbol: 'As', number: 33, weight: 74.92, type: 'nonmetal' }, + { name: 'Selenium', symbol: 'Se', number: 34, weight: 78.96, type: 'nonmetal' }, + { name: 'Bromine', symbol: 'Br', number: 35, weight: 79.904, type: 'nonmetal' }, + { name: 'Krypton', symbol: 'Kr', number: 36, weight: 83.8, type: 'noblegas' }, + ], + [ + { name: 'Rubidium', symbol: 'Rb', number: 37, weight: 85.47, type: 'metal' }, + { name: 'Strontium', symbol: 'Sr', number: 38, weight: 87.62, type: 'metal' }, + { name: 'Yttrium', symbol: 'Y', number: 39, weight: 88.91, type: 'metal' }, + { name: 'Zirconium', symbol: 'Zr', number: 40, weight: 91.22, type: 'metal' }, + { name: 'Niobium', symbol: 'Nb', number: 41, weight: 92.91, type: 'metal' }, + { name: 'Molybdenum', symbol: 'Mo', number: 42, weight: 95.94, type: 'metal' }, + { name: 'Technetium', symbol: 'Tc', number: 43, weight: 98, type: 'metal' }, + { name: 'Ruthenium', symbol: 'Ru', number: 44, weight: 101.07, type: 'metal' }, + { name: 'Rhodium', symbol: 'Rh', number: 45, weight: 102.91, type: 'metal' }, + { name: 'Palladium', symbol: 'Pd', number: 46, weight: 106.42, type: 'metal' }, + { name: 'Silver', symbol: 'Ag', number: 47, weight: 107.87, type: 'metal' }, + { name: 'Cadmium', symbol: 'Cd', number: 48, weight: 112.41, type: 'metal' }, + { name: 'Indium', symbol: 'In', number: 49, weight: 114.82, type: 'metal' }, + { name: 'Tin', symbol: 'Sn', number: 50, weight: 118.71, type: 'metal' }, + { name: 'Antimony', symbol: 'Sb', number: 51, weight: 121.76, type: 'metal' }, + { name: 'Tellurium', symbol: 'Te', number: 52, weight: 127.6, type: 'nonmetal' }, + { name: 'Iodine', symbol: 'I', number: 53, weight: 126.9, type: 'nonmetal' }, + { name: 'Xenon', symbol: 'Xe', number: 54, weight: 131.29, type: 'noblegas' }, + ], + [ + { name: 'Cesium', symbol: 'Cs', number: 55, weight: 132.91, type: 'metal' }, + { name: 'Barium', symbol: 'Ba', number: 56, weight: 137.33, type: 'metal' }, + { name: 'Lanthanum', symbol: 'La', number: 57, weight: 138.91, type: 'lanthanum' }, + { name: 'Hafnium', symbol: 'Hf', number: 72, weight: 178.49, type: 'metal' }, + { name: 'Tantalum', symbol: 'Ta', number: 73, weight: 180.95, type: 'metal' }, + { name: 'Tungsten', symbol: 'W', number: 74, weight: 183.84, type: 'metal' }, + { name: 'Rhenium', symbol: 'Re', number: 75, weight: 186.21, type: 'metal' }, + { name: 'Osmium', symbol: 'Os', number: 76, weight: 190.23, type: 'metal' }, + { name: 'Iridium', symbol: 'Ir', number: 77, weight: 192.22, type: 'metal' }, + { name: 'Platinum', symbol: 'Pt', number: 78, weight: 195.09, type: 'metal' }, + { name: 'Gold', symbol: 'Au', number: 79, weight: 196.97, type: 'metal' }, + { name: 'Mercury', symbol: 'Hg', number: 80, weight: 200.59, type: 'metal' }, + { name: 'Thallium', symbol: 'Tl', number: 81, weight: 204.38, type: 'metal' }, + { name: 'Lead', symbol: 'Pb', number: 82, weight: 207.2, type: 'metal' }, + { name: 'Bismuth', symbol: 'Bi', number: 83, weight: 208.98, type: 'metal' }, + { name: 'Polonium', symbol: 'Po', number: 84, weight: 209, type: 'metal' }, + { name: 'Astatine', symbol: 'At', number: 85, weight: 210, type: 'nonmetal' }, + { name: 'Radon', symbol: 'Rn', number: 86, weight: 222, type: 'noblegas' }, + ], + [ + { name: 'Francium', symbol: 'Fr', number: 87, weight: 223, type: 'metal' }, + { name: 'Radium', symbol: 'Ra', number: 88, weight: 226, type: 'metal' }, + { name: 'Actinium', symbol: 'Ac', number: 89, weight: 227, type: 'actinium' }, + { name: 'Rutherfordium', symbol: 'Rf', number: 104, weight: 267, type: 'metal' }, + { name: 'Dubnium', symbol: 'Db', number: 105, weight: 268, type: 'metal' }, + { name: 'Seaborgium', symbol: 'Sg', number: 106, weight: 271, type: 'metal' }, + { name: 'Bohrium', symbol: 'Bh', number: 107, weight: 272, type: 'metal' }, + { name: 'Hassium', symbol: 'Hs', number: 108, weight: 277, type: 'metal' }, + { name: 'Meitnerium', symbol: 'Mt', number: 109, weight: 278, type: 'metal' }, + { name: 'Darmstadtium', symbol: 'Ds', number: 110, weight: 281, type: 'metal' }, + { name: 'Roentgenium', symbol: 'Rg', number: 111, weight: 280, type: 'metal' }, + { name: 'Copernicium', symbol: 'Cn', number: 112, weight: 285, type: 'metal' }, + { name: 'Nihonium', symbol: 'Nh', number: 113, weight: 286, type: 'metal' }, + { name: 'Flerovium', symbol: 'Fl', number: 114, weight: 289, type: 'metal' }, + { name: 'Moscovium', symbol: 'Mc', number: 115, weight: 290, type: 'metal' }, + { name: 'Livermorium', symbol: 'Lv', number: 116, weight: 293, type: 'metal' }, + { name: 'Tennessine', symbol: 'Ts', number: 117, weight: 294, type: 'metal' }, + { name: 'Oganesson', symbol: 'Og', number: 118, weight: 294, type: 'noblegas' }, + ], +] + +const series = [ + [ + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: 'Cerium', symbol: 'Ce', number: 58, weight: 140.12, type: 'lanthanum' }, + { name: 'Praseodymium', symbol: 'Pr', number: 59, weight: 140.91, type: 'lanthanum' }, + { name: 'Neodymium', symbol: 'Nd', number: 60, weight: 144.24, type: 'lanthanum' }, + { name: 'Promethium', symbol: 'Pm', number: 61, weight: 145, type: 'lanthanum' }, + { name: 'Samarium', symbol: 'Sm', number: 62, weight: 150.36, type: 'lanthanum' }, + { name: 'Europium', symbol: 'Eu', number: 63, weight: 151.96, type: 'lanthanum' }, + { name: 'Gadolinium', symbol: 'Gd', number: 64, weight: 157.25, type: 'lanthanum' }, + { name: 'Terbium', symbol: 'Tb', number: 65, weight: 158.93, type: 'lanthanum' }, + { name: 'Dysprosium', symbol: 'Dy', number: 66, weight: 162.5, type: 'lanthanum' }, + { name: 'Holmium', symbol: 'Ho', number: 67, weight: 164.93, type: 'lanthanum' }, + { name: 'Erbium', symbol: 'Er', number: 68, weight: 167.26, type: 'lanthanum' }, + { name: 'Thulium', symbol: 'Tm', number: 69, weight: 168.93, type: 'lanthanum' }, + { name: 'Ytterbium', symbol: 'Yb', number: 70, weight: 173.04, type: 'lanthanum' }, + { name: 'Lutetium', symbol: 'Lu', number: 71, weight: 174.97, type: 'lanthanum' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + ], + [ + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + { name: 'Thorium', symbol: 'Th', number: 90, weight: 232.04, type: 'actinium' }, + { name: 'Protactinium', symbol: 'Pa', number: 91, weight: 231.04, type: 'actinium' }, + { name: 'Uranium', symbol: 'U', number: 92, weight: 238.03, type: 'actinium' }, + { name: 'Neptunium', symbol: 'Np', number: 93, weight: 237, type: 'actinium' }, + { name: 'Plutonium', symbol: 'Pu', number: 94, weight: 244, type: 'actinium' }, + { name: 'Americium', symbol: 'Am', number: 95, weight: 243, type: 'actinium' }, + { name: 'Curium', symbol: 'Cm', number: 96, weight: 247, type: 'actinium' }, + { name: 'Berkelium', symbol: 'Bk', number: 97, weight: 247, type: 'actinium' }, + { name: 'Californium', symbol: 'Cf', number: 98, weight: 251, type: 'actinium' }, + { name: 'Einsteinium', symbol: 'Es', number: 99, weight: 252, type: 'actinium' }, + { name: 'Fermium', symbol: 'Fm', number: 100, weight: 257, type: 'actinium' }, + { name: 'Mendelevium', symbol: 'Md', number: 101, weight: 258, type: 'actinium' }, + { name: 'Nobelium', symbol: 'No', number: 102, weight: 259, type: 'actinium' }, + { name: 'Lawrencium', symbol: 'Lr', number: 103, weight: 262, type: 'actinium' }, + { name: '', symbol: '', number: -1, weight: 0, type: 'empty' }, + ], +]; + +const niceTypes = { + 'metal': "Metal", + 'nonmetal': "Nonmetal", + 'noblegas': "Noble gas", + 'lanthanum': "Lanthanum", + 'actinium': "Actinium" +} diff --git a/.config/quickshell/modules/common/Appearance.qml b/.config/quickshell/ii/modules/common/Appearance.qml similarity index 98% rename from .config/quickshell/modules/common/Appearance.qml rename to .config/quickshell/ii/modules/common/Appearance.qml index 70437e12a..88e04bd30 100644 --- a/.config/quickshell/modules/common/Appearance.qml +++ b/.config/quickshell/ii/modules/common/Appearance.qml @@ -100,7 +100,7 @@ Singleton { colors: QtObject { property color colSubtext: m3colors.m3outline - property color colLayer0: ColorUtils.transparentize(m3colors.m3background, root.transparency) + property color colLayer0: ColorUtils.mix(ColorUtils.transparentize(m3colors.m3background, root.transparency), m3colors.m3primary, Config.options.appearance.extraBackgroundTint ? 0.99 : 1) property color colOnLayer0: m3colors.m3onBackground property color colLayer0Hover: ColorUtils.transparentize(ColorUtils.mix(colLayer0, colOnLayer0, 0.9, root.contentTransparency)) property color colLayer0Active: ColorUtils.transparentize(ColorUtils.mix(colLayer0, colOnLayer0, 0.8, root.contentTransparency)) diff --git a/.config/quickshell/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml similarity index 92% rename from .config/quickshell/modules/common/Config.qml rename to .config/quickshell/ii/modules/common/Config.qml index 09313be8e..5d427a977 100644 --- a/.config/quickshell/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -63,6 +63,7 @@ Singleton { } property JsonObject appearance: JsonObject { + property bool extraBackgroundTint: true property int fakeScreenRounding: 2 // 0: None | 1: Always | 2: When not fullscreen property bool transparency: false property JsonObject palette: JsonObject { @@ -117,11 +118,19 @@ Singleton { property bool monochromeIcons: true } property JsonObject workspaces: JsonObject { + property bool monochromeIcons: true property int shown: 10 property bool showAppIcons: true property bool alwaysShowNumbers: false property int showNumberDelay: 300 // milliseconds } + property JsonObject weather: JsonObject { + property bool enable: false + property bool enableGPS: true // gps based location + property string city: "" // When 'enableGPS' is false + property bool useUSCS: false // Instead of metric (SI) units + property int fetchInterval: 10 // minutes + } } property JsonObject battery: JsonObject { @@ -133,8 +142,9 @@ Singleton { property JsonObject dock: JsonObject { property bool enable: false + property bool monochromeIcons: true property real height: 60 - property real hoverRegionHeight: 3 + property real hoverRegionHeight: 2 property bool pinnedOnStartup: false property bool hoverToReveal: true // When false, only reveals on empty workspace property list pinnedApps: [ // IDs of pinned entries @@ -201,7 +211,7 @@ Singleton { property JsonObject time: JsonObject { // https://doc.qt.io/qt-6/qtime.html#toString property string format: "hh:mm" - property string dateFormat: "dddd, dd/MM" + property string dateFormat: "ddd, dd/MM" } property JsonObject windows: JsonObject { @@ -212,6 +222,10 @@ Singleton { property JsonObject hacks: JsonObject { property int arbitraryRaceConditionDelay: 20 // milliseconds } + + property JsonObject screenshotTool: JsonObject { + property bool showContentRegions: true + } } } } diff --git a/.config/quickshell/modules/common/Directories.qml b/.config/quickshell/ii/modules/common/Directories.qml similarity index 83% rename from .config/quickshell/modules/common/Directories.qml rename to .config/quickshell/ii/modules/common/Directories.qml index b058c2001..38cfd73d7 100644 --- a/.config/quickshell/modules/common/Directories.qml +++ b/.config/quickshell/ii/modules/common/Directories.qml @@ -16,7 +16,8 @@ Singleton { readonly property string downloads: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0] // Other dirs used by the shell, without "file://" - property string scriptPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts`) + property string assetsPath: Quickshell.configPath("assets") + property string scriptPath: Quickshell.configPath("scripts") property string favicons: FileUtils.trimFileProtocol(`${Directories.cache}/media/favicons`) property string coverArt: FileUtils.trimFileProtocol(`${Directories.cache}/media/coverart`) property string booruPreviews: FileUtils.trimFileProtocol(`${Directories.cache}/media/boorus`) @@ -30,17 +31,20 @@ Singleton { property string notificationsPath: FileUtils.trimFileProtocol(`${Directories.cache}/notifications/notifications.json`) property string generatedMaterialThemePath: FileUtils.trimFileProtocol(`${Directories.state}/user/generated/colors.json`) property string cliphistDecode: FileUtils.trimFileProtocol(`/tmp/quickshell/media/cliphist`) + property string screenshotTemp: "/tmp/quickshell/media/screenshot" property string wallpaperSwitchScriptPath: FileUtils.trimFileProtocol(`${Directories.scriptPath}/colors/switchwall.sh`) - property string defaultAiPrompts: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/defaults/ai/prompts`) + property string defaultAiPrompts: Quickshell.configPath("defaults/ai/prompts") property string userAiPrompts: FileUtils.trimFileProtocol(`${Directories.shellConfig}/ai/prompts`) + property string aiChats: FileUtils.trimFileProtocol(`${Directories.state}/user/ai/chats`) // Cleanup on init Component.onCompleted: { - Quickshell.execDetached(["bash", "-c", `mkdir -p '${shellConfig}'`]) - Quickshell.execDetached(["bash", "-c", `mkdir -p '${favicons}'`]) + Quickshell.execDetached(["mkdir", "-p", `${shellConfig}`]) + Quickshell.execDetached(["mkdir", "-p", `${favicons}`]) Quickshell.execDetached(["bash", "-c", `rm -rf '${coverArt}'; mkdir -p '${coverArt}'`]) Quickshell.execDetached(["bash", "-c", `rm -rf '${booruPreviews}'; mkdir -p '${booruPreviews}'`]) Quickshell.execDetached(["bash", "-c", `mkdir -p '${booruDownloads}' && mkdir -p '${booruDownloadsNsfw}'`]) Quickshell.execDetached(["bash", "-c", `rm -rf '${latexOutput}'; mkdir -p '${latexOutput}'`]) Quickshell.execDetached(["bash", "-c", `rm -rf '${cliphistDecode}'; mkdir -p '${cliphistDecode}'`]) + Quickshell.execDetached(["mkdir", "-p", `${aiChats}`]) } } diff --git a/.config/quickshell/modules/common/Persistent.qml b/.config/quickshell/ii/modules/common/Persistent.qml similarity index 100% rename from .config/quickshell/modules/common/Persistent.qml rename to .config/quickshell/ii/modules/common/Persistent.qml diff --git a/.config/quickshell/modules/common/PersistentStates.qml b/.config/quickshell/ii/modules/common/PersistentStates.qml similarity index 100% rename from .config/quickshell/modules/common/PersistentStates.qml rename to .config/quickshell/ii/modules/common/PersistentStates.qml diff --git a/.config/quickshell/modules/common/functions/color_utils.js b/.config/quickshell/ii/modules/common/functions/color_utils.js similarity index 100% rename from .config/quickshell/modules/common/functions/color_utils.js rename to .config/quickshell/ii/modules/common/functions/color_utils.js diff --git a/.config/quickshell/modules/common/functions/file_utils.js b/.config/quickshell/ii/modules/common/functions/file_utils.js similarity index 100% rename from .config/quickshell/modules/common/functions/file_utils.js rename to .config/quickshell/ii/modules/common/functions/file_utils.js diff --git a/.config/quickshell/modules/common/functions/fuzzysort.js b/.config/quickshell/ii/modules/common/functions/fuzzysort.js similarity index 100% rename from .config/quickshell/modules/common/functions/fuzzysort.js rename to .config/quickshell/ii/modules/common/functions/fuzzysort.js diff --git a/.config/quickshell/modules/common/functions/levendist.js b/.config/quickshell/ii/modules/common/functions/levendist.js similarity index 100% rename from .config/quickshell/modules/common/functions/levendist.js rename to .config/quickshell/ii/modules/common/functions/levendist.js diff --git a/.config/quickshell/modules/common/functions/object_utils.js b/.config/quickshell/ii/modules/common/functions/object_utils.js similarity index 100% rename from .config/quickshell/modules/common/functions/object_utils.js rename to .config/quickshell/ii/modules/common/functions/object_utils.js diff --git a/.config/quickshell/modules/common/functions/string_utils.js b/.config/quickshell/ii/modules/common/functions/string_utils.js similarity index 97% rename from .config/quickshell/modules/common/functions/string_utils.js rename to .config/quickshell/ii/modules/common/functions/string_utils.js index c22671ebf..0819dbfb9 100644 --- a/.config/quickshell/modules/common/functions/string_utils.js +++ b/.config/quickshell/ii/modules/common/functions/string_utils.js @@ -158,10 +158,10 @@ function cleanMusicTitle(title) { // Japenis brackets title = title.replace(/^ *【[^】]*】/, "") // Touhou title = title.replace(/^ *《[^》]*》/, "") // ?? - title = title.replace(/^ *「[^」]*」/, "") // OP/ED - title = title.replace(/^ *『[^』]*』/, "") // OP/ED + title = title.replace(/^ *「[^」]*」/, "") // OP/ED thingie + title = title.replace(/^ *『[^』]*』/, "") // OP/ED thingie - return title; + return title.trim(); } function friendlyTimeForSeconds(seconds) { diff --git a/.config/quickshell/modules/common/widgets/ButtonGroup.qml b/.config/quickshell/ii/modules/common/widgets/ButtonGroup.qml similarity index 97% rename from .config/quickshell/modules/common/widgets/ButtonGroup.qml rename to .config/quickshell/ii/modules/common/widgets/ButtonGroup.qml index 5356535f4..4b8676f40 100644 --- a/.config/quickshell/modules/common/widgets/ButtonGroup.qml +++ b/.config/quickshell/ii/modules/common/widgets/ButtonGroup.qml @@ -20,6 +20,7 @@ Rectangle { let total = 0; for (let i = 0; i < rowLayout.children.length; ++i) { const child = rowLayout.children[i]; + if (!child.visible) continue; total += child.baseWidth ?? child.implicitWidth ?? child.width; } return total + rowLayout.spacing * (rowLayout.children.length - 1); diff --git a/.config/quickshell/modules/common/widgets/CircularProgress.qml b/.config/quickshell/ii/modules/common/widgets/CircularProgress.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/CircularProgress.qml rename to .config/quickshell/ii/modules/common/widgets/CircularProgress.qml diff --git a/.config/quickshell/modules/common/widgets/CliphistImage.qml b/.config/quickshell/ii/modules/common/widgets/CliphistImage.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/CliphistImage.qml rename to .config/quickshell/ii/modules/common/widgets/CliphistImage.qml diff --git a/.config/quickshell/modules/common/widgets/ConfigRow.qml b/.config/quickshell/ii/modules/common/widgets/ConfigRow.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ConfigRow.qml rename to .config/quickshell/ii/modules/common/widgets/ConfigRow.qml diff --git a/.config/quickshell/modules/common/widgets/ConfigSelectionArray.qml b/.config/quickshell/ii/modules/common/widgets/ConfigSelectionArray.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ConfigSelectionArray.qml rename to .config/quickshell/ii/modules/common/widgets/ConfigSelectionArray.qml diff --git a/.config/quickshell/modules/common/widgets/ConfigSpinBox.qml b/.config/quickshell/ii/modules/common/widgets/ConfigSpinBox.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ConfigSpinBox.qml rename to .config/quickshell/ii/modules/common/widgets/ConfigSpinBox.qml diff --git a/.config/quickshell/modules/common/widgets/ConfigSwitch.qml b/.config/quickshell/ii/modules/common/widgets/ConfigSwitch.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ConfigSwitch.qml rename to .config/quickshell/ii/modules/common/widgets/ConfigSwitch.qml diff --git a/.config/quickshell/modules/common/widgets/ContentPage.qml b/.config/quickshell/ii/modules/common/widgets/ContentPage.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ContentPage.qml rename to .config/quickshell/ii/modules/common/widgets/ContentPage.qml diff --git a/.config/quickshell/modules/common/widgets/ContentSection.qml b/.config/quickshell/ii/modules/common/widgets/ContentSection.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ContentSection.qml rename to .config/quickshell/ii/modules/common/widgets/ContentSection.qml diff --git a/.config/quickshell/modules/common/widgets/ContentSubsection.qml b/.config/quickshell/ii/modules/common/widgets/ContentSubsection.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ContentSubsection.qml rename to .config/quickshell/ii/modules/common/widgets/ContentSubsection.qml diff --git a/.config/quickshell/modules/common/widgets/ContentSubsectionLabel.qml b/.config/quickshell/ii/modules/common/widgets/ContentSubsectionLabel.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/ContentSubsectionLabel.qml rename to .config/quickshell/ii/modules/common/widgets/ContentSubsectionLabel.qml diff --git a/.config/quickshell/modules/common/widgets/CustomIcon.qml b/.config/quickshell/ii/modules/common/widgets/CustomIcon.qml similarity index 65% rename from .config/quickshell/modules/common/widgets/CustomIcon.qml rename to .config/quickshell/ii/modules/common/widgets/CustomIcon.qml index 8905b0715..285196156 100644 --- a/.config/quickshell/modules/common/widgets/CustomIcon.qml +++ b/.config/quickshell/ii/modules/common/widgets/CustomIcon.qml @@ -1,10 +1,13 @@ import QtQuick import Quickshell import Quickshell.Widgets +import Qt5Compat.GraphicalEffects Item { id: root + property bool colorize: false + property color color property string source: "" property string iconFolder: "root:/assets/icons" // The folder to check first width: 30 @@ -21,4 +24,13 @@ Item { } implicitSize: root.height } + + Loader { + active: root.colorize + anchors.fill: iconImage + sourceComponent: ColorOverlay { + source: iconImage + color: root.color + } + } } diff --git a/.config/quickshell/modules/common/widgets/DialogButton.qml b/.config/quickshell/ii/modules/common/widgets/DialogButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/DialogButton.qml rename to .config/quickshell/ii/modules/common/widgets/DialogButton.qml diff --git a/.config/quickshell/modules/common/widgets/DragManager.qml b/.config/quickshell/ii/modules/common/widgets/DragManager.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/DragManager.qml rename to .config/quickshell/ii/modules/common/widgets/DragManager.qml diff --git a/.config/quickshell/modules/common/widgets/Favicon.qml b/.config/quickshell/ii/modules/common/widgets/Favicon.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/Favicon.qml rename to .config/quickshell/ii/modules/common/widgets/Favicon.qml diff --git a/.config/quickshell/modules/common/widgets/FloatingActionButton.qml b/.config/quickshell/ii/modules/common/widgets/FloatingActionButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/FloatingActionButton.qml rename to .config/quickshell/ii/modules/common/widgets/FloatingActionButton.qml diff --git a/.config/quickshell/modules/common/widgets/FlowButtonGroup.qml b/.config/quickshell/ii/modules/common/widgets/FlowButtonGroup.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/FlowButtonGroup.qml rename to .config/quickshell/ii/modules/common/widgets/FlowButtonGroup.qml diff --git a/.config/quickshell/modules/common/widgets/GroupButton.qml b/.config/quickshell/ii/modules/common/widgets/GroupButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/GroupButton.qml rename to .config/quickshell/ii/modules/common/widgets/GroupButton.qml diff --git a/.config/quickshell/modules/common/widgets/KeyboardKey.qml b/.config/quickshell/ii/modules/common/widgets/KeyboardKey.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/KeyboardKey.qml rename to .config/quickshell/ii/modules/common/widgets/KeyboardKey.qml diff --git a/.config/quickshell/modules/common/widgets/LightDarkPreferenceButton.qml b/.config/quickshell/ii/modules/common/widgets/LightDarkPreferenceButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/LightDarkPreferenceButton.qml rename to .config/quickshell/ii/modules/common/widgets/LightDarkPreferenceButton.qml diff --git a/.config/quickshell/modules/common/widgets/MaterialSymbol.qml b/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/MaterialSymbol.qml rename to .config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml diff --git a/.config/quickshell/modules/common/widgets/MaterialTextField.qml b/.config/quickshell/ii/modules/common/widgets/MaterialTextField.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/MaterialTextField.qml rename to .config/quickshell/ii/modules/common/widgets/MaterialTextField.qml diff --git a/.config/quickshell/modules/common/widgets/MenuButton.qml b/.config/quickshell/ii/modules/common/widgets/MenuButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/MenuButton.qml rename to .config/quickshell/ii/modules/common/widgets/MenuButton.qml diff --git a/.config/quickshell/modules/common/widgets/NavigationRail.qml b/.config/quickshell/ii/modules/common/widgets/NavigationRail.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NavigationRail.qml rename to .config/quickshell/ii/modules/common/widgets/NavigationRail.qml diff --git a/.config/quickshell/modules/common/widgets/NavigationRailButton.qml b/.config/quickshell/ii/modules/common/widgets/NavigationRailButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NavigationRailButton.qml rename to .config/quickshell/ii/modules/common/widgets/NavigationRailButton.qml diff --git a/.config/quickshell/modules/common/widgets/NavigationRailExpandButton.qml b/.config/quickshell/ii/modules/common/widgets/NavigationRailExpandButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NavigationRailExpandButton.qml rename to .config/quickshell/ii/modules/common/widgets/NavigationRailExpandButton.qml diff --git a/.config/quickshell/modules/common/widgets/NavigationRailTabArray.qml b/.config/quickshell/ii/modules/common/widgets/NavigationRailTabArray.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NavigationRailTabArray.qml rename to .config/quickshell/ii/modules/common/widgets/NavigationRailTabArray.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationActionButton.qml b/.config/quickshell/ii/modules/common/widgets/NotificationActionButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationActionButton.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationActionButton.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationAppIcon.qml b/.config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationAppIcon.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationAppIcon.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationGroup.qml b/.config/quickshell/ii/modules/common/widgets/NotificationGroup.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationGroup.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationGroup.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationGroupExpandButton.qml b/.config/quickshell/ii/modules/common/widgets/NotificationGroupExpandButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationGroupExpandButton.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationGroupExpandButton.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationItem.qml b/.config/quickshell/ii/modules/common/widgets/NotificationItem.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationItem.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationItem.qml diff --git a/.config/quickshell/modules/common/widgets/NotificationListView.qml b/.config/quickshell/ii/modules/common/widgets/NotificationListView.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/NotificationListView.qml rename to .config/quickshell/ii/modules/common/widgets/NotificationListView.qml diff --git a/.config/quickshell/modules/common/widgets/PointingHandInteraction.qml b/.config/quickshell/ii/modules/common/widgets/PointingHandInteraction.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/PointingHandInteraction.qml rename to .config/quickshell/ii/modules/common/widgets/PointingHandInteraction.qml diff --git a/.config/quickshell/modules/common/widgets/PointingHandLinkHover.qml b/.config/quickshell/ii/modules/common/widgets/PointingHandLinkHover.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/PointingHandLinkHover.qml rename to .config/quickshell/ii/modules/common/widgets/PointingHandLinkHover.qml diff --git a/.config/quickshell/modules/common/widgets/PrimaryTabBar.qml b/.config/quickshell/ii/modules/common/widgets/PrimaryTabBar.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/PrimaryTabBar.qml rename to .config/quickshell/ii/modules/common/widgets/PrimaryTabBar.qml diff --git a/.config/quickshell/modules/common/widgets/PrimaryTabButton.qml b/.config/quickshell/ii/modules/common/widgets/PrimaryTabButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/PrimaryTabButton.qml rename to .config/quickshell/ii/modules/common/widgets/PrimaryTabButton.qml diff --git a/.config/quickshell/modules/common/widgets/Revealer.qml b/.config/quickshell/ii/modules/common/widgets/Revealer.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/Revealer.qml rename to .config/quickshell/ii/modules/common/widgets/Revealer.qml diff --git a/.config/quickshell/modules/common/widgets/RippleButton.qml b/.config/quickshell/ii/modules/common/widgets/RippleButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/RippleButton.qml rename to .config/quickshell/ii/modules/common/widgets/RippleButton.qml diff --git a/.config/quickshell/modules/common/widgets/RippleButtonWithIcon.qml b/.config/quickshell/ii/modules/common/widgets/RippleButtonWithIcon.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/RippleButtonWithIcon.qml rename to .config/quickshell/ii/modules/common/widgets/RippleButtonWithIcon.qml diff --git a/.config/quickshell/modules/common/widgets/RoundCorner.qml b/.config/quickshell/ii/modules/common/widgets/RoundCorner.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/RoundCorner.qml rename to .config/quickshell/ii/modules/common/widgets/RoundCorner.qml diff --git a/.config/quickshell/modules/common/widgets/SecondaryTabButton.qml b/.config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/SecondaryTabButton.qml rename to .config/quickshell/ii/modules/common/widgets/SecondaryTabButton.qml diff --git a/.config/quickshell/modules/common/widgets/SelectionDialog.qml b/.config/quickshell/ii/modules/common/widgets/SelectionDialog.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/SelectionDialog.qml rename to .config/quickshell/ii/modules/common/widgets/SelectionDialog.qml diff --git a/.config/quickshell/modules/common/widgets/SelectionGroupButton.qml b/.config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/SelectionGroupButton.qml rename to .config/quickshell/ii/modules/common/widgets/SelectionGroupButton.qml diff --git a/.config/quickshell/modules/common/widgets/StyledLabel.qml b/.config/quickshell/ii/modules/common/widgets/StyledLabel.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledLabel.qml rename to .config/quickshell/ii/modules/common/widgets/StyledLabel.qml diff --git a/.config/quickshell/modules/common/widgets/StyledListView.qml b/.config/quickshell/ii/modules/common/widgets/StyledListView.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledListView.qml rename to .config/quickshell/ii/modules/common/widgets/StyledListView.qml diff --git a/.config/quickshell/modules/common/widgets/StyledProgressBar.qml b/.config/quickshell/ii/modules/common/widgets/StyledProgressBar.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledProgressBar.qml rename to .config/quickshell/ii/modules/common/widgets/StyledProgressBar.qml diff --git a/.config/quickshell/modules/common/widgets/StyledRadioButton.qml b/.config/quickshell/ii/modules/common/widgets/StyledRadioButton.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledRadioButton.qml rename to .config/quickshell/ii/modules/common/widgets/StyledRadioButton.qml diff --git a/.config/quickshell/modules/common/widgets/StyledRectangularShadow.qml b/.config/quickshell/ii/modules/common/widgets/StyledRectangularShadow.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledRectangularShadow.qml rename to .config/quickshell/ii/modules/common/widgets/StyledRectangularShadow.qml diff --git a/.config/quickshell/modules/common/widgets/StyledSlider.qml b/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledSlider.qml rename to .config/quickshell/ii/modules/common/widgets/StyledSlider.qml diff --git a/.config/quickshell/modules/common/widgets/StyledSpinBox.qml b/.config/quickshell/ii/modules/common/widgets/StyledSpinBox.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledSpinBox.qml rename to .config/quickshell/ii/modules/common/widgets/StyledSpinBox.qml diff --git a/.config/quickshell/modules/common/widgets/StyledSwitch.qml b/.config/quickshell/ii/modules/common/widgets/StyledSwitch.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledSwitch.qml rename to .config/quickshell/ii/modules/common/widgets/StyledSwitch.qml diff --git a/.config/quickshell/modules/common/widgets/StyledText.qml b/.config/quickshell/ii/modules/common/widgets/StyledText.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledText.qml rename to .config/quickshell/ii/modules/common/widgets/StyledText.qml diff --git a/.config/quickshell/modules/common/widgets/StyledTextArea.qml b/.config/quickshell/ii/modules/common/widgets/StyledTextArea.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledTextArea.qml rename to .config/quickshell/ii/modules/common/widgets/StyledTextArea.qml diff --git a/.config/quickshell/modules/common/widgets/StyledTextInput.qml b/.config/quickshell/ii/modules/common/widgets/StyledTextInput.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledTextInput.qml rename to .config/quickshell/ii/modules/common/widgets/StyledTextInput.qml diff --git a/.config/quickshell/modules/common/widgets/StyledToolTip.qml b/.config/quickshell/ii/modules/common/widgets/StyledToolTip.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/StyledToolTip.qml rename to .config/quickshell/ii/modules/common/widgets/StyledToolTip.qml diff --git a/.config/quickshell/modules/common/widgets/VerticalButtonGroup.qml b/.config/quickshell/ii/modules/common/widgets/VerticalButtonGroup.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/VerticalButtonGroup.qml rename to .config/quickshell/ii/modules/common/widgets/VerticalButtonGroup.qml diff --git a/.config/quickshell/modules/common/widgets/WaveVisualizer.qml b/.config/quickshell/ii/modules/common/widgets/WaveVisualizer.qml similarity index 100% rename from .config/quickshell/modules/common/widgets/WaveVisualizer.qml rename to .config/quickshell/ii/modules/common/widgets/WaveVisualizer.qml diff --git a/.config/quickshell/modules/common/widgets/notification_utils.js b/.config/quickshell/ii/modules/common/widgets/notification_utils.js similarity index 100% rename from .config/quickshell/modules/common/widgets/notification_utils.js rename to .config/quickshell/ii/modules/common/widgets/notification_utils.js diff --git a/.config/quickshell/modules/dock/Dock.qml b/.config/quickshell/ii/modules/dock/Dock.qml similarity index 98% rename from .config/quickshell/modules/dock/Dock.qml rename to .config/quickshell/ii/modules/dock/Dock.qml index a78e93d9b..04af9810a 100644 --- a/.config/quickshell/modules/dock/Dock.qml +++ b/.config/quickshell/ii/modules/dock/Dock.qml @@ -94,6 +94,8 @@ Scope { // Scope anchors.topMargin: Appearance.sizes.elevationMargin anchors.bottomMargin: Appearance.sizes.hyprlandGapsOut color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant radius: Appearance.rounding.large } diff --git a/.config/quickshell/modules/dock/DockAppButton.qml b/.config/quickshell/ii/modules/dock/DockAppButton.qml similarity index 82% rename from .config/quickshell/modules/dock/DockAppButton.qml rename to .config/quickshell/ii/modules/dock/DockAppButton.qml index f4623e625..8afa65672 100644 --- a/.config/quickshell/modules/dock/DockAppButton.qml +++ b/.config/quickshell/ii/modules/dock/DockAppButton.qml @@ -3,6 +3,7 @@ import "root:/services" import "root:/modules/common" import "root:/modules/common/widgets" import "root:/modules/common/functions/color_utils.js" as ColorUtils +import Qt5Compat.GraphicalEffects import QtQuick import QtQuick.Controls import QtQuick.Effects @@ -91,6 +92,25 @@ DockButton { } } + Loader { + active: Config.options.dock.monochromeIcons + anchors.fill: iconImageLoader + sourceComponent: Item { + Desaturate { + id: desaturatedIcon + visible: false // There's already color overlay + anchors.fill: parent + source: iconImageLoader + desaturation: 0.8 + } + ColorOverlay { + anchors.fill: desaturatedIcon + source: desaturatedIcon + color: ColorUtils.transparentize(Appearance.colors.colPrimary, 0.9) + } + } + } + RowLayout { spacing: 3 anchors { diff --git a/.config/quickshell/modules/dock/DockApps.qml b/.config/quickshell/ii/modules/dock/DockApps.qml similarity index 100% rename from .config/quickshell/modules/dock/DockApps.qml rename to .config/quickshell/ii/modules/dock/DockApps.qml diff --git a/.config/quickshell/modules/dock/DockButton.qml b/.config/quickshell/ii/modules/dock/DockButton.qml similarity index 100% rename from .config/quickshell/modules/dock/DockButton.qml rename to .config/quickshell/ii/modules/dock/DockButton.qml diff --git a/.config/quickshell/modules/dock/DockSeparator.qml b/.config/quickshell/ii/modules/dock/DockSeparator.qml similarity index 100% rename from .config/quickshell/modules/dock/DockSeparator.qml rename to .config/quickshell/ii/modules/dock/DockSeparator.qml diff --git a/.config/quickshell/modules/mediaControls/MediaControls.qml b/.config/quickshell/ii/modules/mediaControls/MediaControls.qml similarity index 99% rename from .config/quickshell/modules/mediaControls/MediaControls.qml rename to .config/quickshell/ii/modules/mediaControls/MediaControls.qml index 6b7ed5395..045a9a75b 100644 --- a/.config/quickshell/modules/mediaControls/MediaControls.qml +++ b/.config/quickshell/ii/modules/mediaControls/MediaControls.qml @@ -79,7 +79,7 @@ Scope { root.visualizerPoints = []; } } - command: ["cava", "-p", `${FileUtils.trimFileProtocol(Directories.config)}/quickshell/scripts/cava/raw_output_config.txt`] + command: ["cava", "-p", `${FileUtils.trimFileProtocol(Directories.scriptPath)}/cava/raw_output_config.txt`] stdout: SplitParser { onRead: data => { // Parse `;`-separated values into the visualizerPoints array diff --git a/.config/quickshell/modules/mediaControls/PlayerControl.qml b/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml similarity index 98% rename from .config/quickshell/modules/mediaControls/PlayerControl.qml rename to .config/quickshell/ii/modules/mediaControls/PlayerControl.qml index cce0788db..9cce01112 100644 --- a/.config/quickshell/modules/mediaControls/PlayerControl.qml +++ b/.config/quickshell/ii/modules/mediaControls/PlayerControl.qml @@ -23,7 +23,7 @@ Item { // Player instance property string artDownloadLocation: Directories.coverArt property string artFileName: Qt.md5(artUrl) + ".jpg" property string artFilePath: `${artDownloadLocation}/${artFileName}` - property color artDominantColor: colorQuantizer?.colors[0] || Appearance.m3colors.m3secondaryContainer + property color artDominantColor: ColorUtils.mix(colorQuantizer?.colors[0], Appearance.colors.colPrimaryContainer, 0.8) || Appearance.m3colors.m3secondaryContainer property bool downloaded: false property list visualizerPoints: [] property real maxVisualizerValue: 1000 // Max value in the data points diff --git a/.config/quickshell/modules/notificationPopup/NotificationPopup.qml b/.config/quickshell/ii/modules/notificationPopup/NotificationPopup.qml similarity index 83% rename from .config/quickshell/modules/notificationPopup/NotificationPopup.qml rename to .config/quickshell/ii/modules/notificationPopup/NotificationPopup.qml index fb046343d..3f10a92f4 100644 --- a/.config/quickshell/modules/notificationPopup/NotificationPopup.qml +++ b/.config/quickshell/ii/modules/notificationPopup/NotificationPopup.qml @@ -36,10 +36,13 @@ Scope { NotificationListView { id: listview - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.topMargin: 5 + anchors { + top: parent.top + bottom: parent.bottom + right: parent.right + rightMargin: 4 + topMargin: 4 + } implicitWidth: parent.width - Appearance.sizes.elevationMargin * 2 popup: true } diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml b/.config/quickshell/ii/modules/onScreenDisplay/OnScreenDisplayBrightness.qml similarity index 100% rename from .config/quickshell/modules/onScreenDisplay/OnScreenDisplayBrightness.qml rename to .config/quickshell/ii/modules/onScreenDisplay/OnScreenDisplayBrightness.qml diff --git a/.config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml b/.config/quickshell/ii/modules/onScreenDisplay/OnScreenDisplayVolume.qml similarity index 100% rename from .config/quickshell/modules/onScreenDisplay/OnScreenDisplayVolume.qml rename to .config/quickshell/ii/modules/onScreenDisplay/OnScreenDisplayVolume.qml diff --git a/.config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml b/.config/quickshell/ii/modules/onScreenDisplay/OsdValueIndicator.qml similarity index 100% rename from .config/quickshell/modules/onScreenDisplay/OsdValueIndicator.qml rename to .config/quickshell/ii/modules/onScreenDisplay/OsdValueIndicator.qml diff --git a/.config/quickshell/modules/onScreenKeyboard/OnScreenKeyboard.qml b/.config/quickshell/ii/modules/onScreenKeyboard/OnScreenKeyboard.qml similarity index 100% rename from .config/quickshell/modules/onScreenKeyboard/OnScreenKeyboard.qml rename to .config/quickshell/ii/modules/onScreenKeyboard/OnScreenKeyboard.qml diff --git a/.config/quickshell/modules/onScreenKeyboard/OskContent.qml b/.config/quickshell/ii/modules/onScreenKeyboard/OskContent.qml similarity index 100% rename from .config/quickshell/modules/onScreenKeyboard/OskContent.qml rename to .config/quickshell/ii/modules/onScreenKeyboard/OskContent.qml diff --git a/.config/quickshell/modules/onScreenKeyboard/OskKey.qml b/.config/quickshell/ii/modules/onScreenKeyboard/OskKey.qml similarity index 100% rename from .config/quickshell/modules/onScreenKeyboard/OskKey.qml rename to .config/quickshell/ii/modules/onScreenKeyboard/OskKey.qml diff --git a/.config/quickshell/modules/onScreenKeyboard/layouts.js b/.config/quickshell/ii/modules/onScreenKeyboard/layouts.js similarity index 100% rename from .config/quickshell/modules/onScreenKeyboard/layouts.js rename to .config/quickshell/ii/modules/onScreenKeyboard/layouts.js diff --git a/.config/quickshell/modules/overview/Overview.qml b/.config/quickshell/ii/modules/overview/Overview.qml similarity index 97% rename from .config/quickshell/modules/overview/Overview.qml rename to .config/quickshell/ii/modules/overview/Overview.qml index aedd5e47c..a4a784d0f 100644 --- a/.config/quickshell/modules/overview/Overview.qml +++ b/.config/quickshell/ii/modules/overview/Overview.qml @@ -34,9 +34,9 @@ Scope { mask: Region { item: GlobalStates.overviewOpen ? columnLayout : null } - HyprlandWindow.visibleMask: Region { - item: GlobalStates.overviewOpen ? columnLayout : null - } + // HyprlandWindow.visibleMask: Region { // Buggy with scaled monitors + // item: GlobalStates.overviewOpen ? columnLayout : null + // } anchors { diff --git a/.config/quickshell/modules/overview/OverviewWidget.qml b/.config/quickshell/ii/modules/overview/OverviewWidget.qml similarity index 94% rename from .config/quickshell/modules/overview/OverviewWidget.qml rename to .config/quickshell/ii/modules/overview/OverviewWidget.qml index c6da607dc..18e60c2f9 100644 --- a/.config/quickshell/modules/overview/OverviewWidget.qml +++ b/.config/quickshell/ii/modules/overview/OverviewWidget.qml @@ -19,7 +19,7 @@ Item { readonly property var toplevels: ToplevelManager.toplevels readonly property int workspacesShown: Config.options.overview.rows * Config.options.overview.columns readonly property int workspaceGroup: Math.floor((monitor.activeWorkspace?.id - 1) / workspacesShown) - property bool monitorIsFocused: (Hyprland.focusedMonitor?.id == monitor.id) + property bool monitorIsFocused: (Hyprland.focusedMonitor?.name == monitor.name) property var windows: HyprlandData.windowList property var windowByAddress: HyprlandData.windowByAddress property var windowAddresses: HyprlandData.addresses @@ -63,6 +63,8 @@ Item { implicitHeight: workspaceColumnLayout.implicitHeight + padding * 2 radius: Appearance.rounding.screenRounding * root.scale + padding color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant ColumnLayout { // Workspaces id: workspaceColumnLayout @@ -148,9 +150,10 @@ Item { // console.log(JSON.stringify(ToplevelManager.toplevels.values.map(t => t), null, 2)) return ToplevelManager.toplevels.values.filter((toplevel) => { const address = `0x${toplevel.HyprlandToplevel.address}` - // console.log(`Checking window with address: ${address}`) var win = windowByAddress[address] - return (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown) + const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown) + const inMonitor = root.monitor.id === win.monitor + return inWorkspaceGroup && inMonitor; }) } } @@ -160,7 +163,7 @@ Item { property var address: `0x${modelData.HyprlandToplevel.address}` windowData: windowByAddress[address] toplevel: modelData - monitorData: root.monitorData + monitorData: HyprlandData.monitors[monitorId] scale: root.scale availableWorkspaceWidth: root.workspaceImplicitWidth availableWorkspaceHeight: root.workspaceImplicitHeight @@ -169,11 +172,12 @@ Item { property var monitor: HyprlandData.monitors[monitorId] property bool atInitPosition: (initX == x && initY == y) - restrictToWorkspace: Drag.active || atInitPosition property int workspaceColIndex: (windowData?.workspace.id - 1) % Config.options.overview.columns property int workspaceRowIndex: Math.floor((windowData?.workspace.id - 1) % root.workspacesShown / Config.options.overview.columns) - xOffset: (root.workspaceImplicitWidth + workspaceSpacing) * workspaceColIndex - (monitor?.x * root.scale) + xOffset: { + return (root.workspaceImplicitWidth + workspaceSpacing) * workspaceColIndex - (monitor?.x * root.scale) + } yOffset: (root.workspaceImplicitHeight + workspaceSpacing) * workspaceRowIndex - (monitor?.y * root.scale) Timer { @@ -184,7 +188,6 @@ Item { onTriggered: { window.x = Math.round(Math.max((windowData?.at[0] - monitorData?.reserved[0]) * root.scale, 0) + xOffset) window.y = Math.round(Math.max((windowData?.at[1] - monitorData?.reserved[1]) * root.scale, 0) + yOffset) - // console.log(`[OverviewWindow] Updated position for window ${windowData?.address} to (${window.x}, ${window.y})`) } } diff --git a/.config/quickshell/modules/overview/OverviewWindow.qml b/.config/quickshell/ii/modules/overview/OverviewWindow.qml similarity index 81% rename from .config/quickshell/modules/overview/OverviewWindow.qml rename to .config/quickshell/ii/modules/overview/OverviewWindow.qml index b749ab160..bf023a09d 100644 --- a/.config/quickshell/modules/overview/OverviewWindow.qml +++ b/.config/quickshell/ii/modules/overview/OverviewWindow.qml @@ -42,8 +42,8 @@ Item { // Window x: initX y: initY - width: Math.round(Math.min(windowData?.size[0] * root.scale, (restrictToWorkspace ? windowData?.size[0] : availableWorkspaceWidth - x + xOffset))) - height: Math.round(Math.min(windowData?.size[1] * root.scale, (restrictToWorkspace ? windowData?.size[1] : availableWorkspaceHeight - y + yOffset))) + width: windowData?.size[0] * root.scale + height: windowData?.size[1] * root.scale layer.enabled: true layer.effect: OpacityMask { @@ -91,7 +91,14 @@ Item { // Window Image { id: windowIcon - property var iconSize: Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) + property var iconSize: { + // console.log("-=-=-", root.toplevel.title, "-=-=-") + // console.log("Target window size:", targetWindowWidth, targetWindowHeight) + // console.log("Icon ratio:", root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) + // console.log("Scale:", root.monitorData.scale) + // console.log("Final:", Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale) + return Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale; + } // mipmap: true Layout.alignment: Qt.AlignHCenter source: root.iconPath diff --git a/.config/quickshell/modules/overview/SearchItem.qml b/.config/quickshell/ii/modules/overview/SearchItem.qml similarity index 96% rename from .config/quickshell/modules/overview/SearchItem.qml rename to .config/quickshell/ii/modules/overview/SearchItem.qml index f70e25f3e..54f8e7c73 100644 --- a/.config/quickshell/modules/overview/SearchItem.qml +++ b/.config/quickshell/ii/modules/overview/SearchItem.qml @@ -27,6 +27,21 @@ RippleButton { property string bigText: entry?.bigText ?? "" property string materialSymbol: entry?.materialSymbol ?? "" property string cliphistRawString: entry?.cliphistRawString ?? "" + + visible: root.entryShown + property int horizontalMargin: 10 + property int buttonHorizontalPadding: 10 + property int buttonVerticalPadding: 5 + property bool keyboardDown: false + + implicitHeight: rowLayout.implicitHeight + root.buttonVerticalPadding * 2 + implicitWidth: rowLayout.implicitWidth + root.buttonHorizontalPadding * 2 + buttonRadius: Appearance.rounding.normal + colBackground: (root.down || root.keyboardDown) ? Appearance.colors.colSecondaryContainerActive : + ((root.hovered || root.focus) ? Appearance.colors.colSecondaryContainerHover : + ColorUtils.transparentize(Appearance.colors.colSecondaryContainer, 1)) + colBackgroundHover: Appearance.colors.colSecondaryContainerHover + colRipple: Appearance.colors.colSecondaryContainerActive property string highlightPrefix: `` property string highlightSuffix: `` @@ -69,20 +84,7 @@ RippleButton { return matches ? matches : []; } - visible: root.entryShown - property int horizontalMargin: 10 - property int buttonHorizontalPadding: 10 - property int buttonVerticalPadding: 5 - property bool keyboardDown: false - - implicitHeight: rowLayout.implicitHeight + root.buttonVerticalPadding * 2 - implicitWidth: rowLayout.implicitWidth + root.buttonHorizontalPadding * 2 - buttonRadius: Appearance.rounding.normal - colBackground: (root.down || root.keyboardDown) ? Appearance.colors.colLayer1Active : - ((root.hovered || root.focus) ? Appearance.colors.colLayer1Hover : - ColorUtils.transparentize(Appearance.colors.colSurfaceContainerHigh, 1)) - colBackgroundHover: Appearance.colors.colLayer1Hover - colRipple: Appearance.colors.colLayer1Active + PointingHandInteraction {} background { anchors.fill: root @@ -90,7 +92,6 @@ RippleButton { anchors.rightMargin: root.horizontalMargin } - PointingHandInteraction {} onClicked: { root.itemExecute() Hyprland.dispatch("global quickshell:overviewClose") diff --git a/.config/quickshell/modules/overview/SearchWidget.qml b/.config/quickshell/ii/modules/overview/SearchWidget.qml similarity index 74% rename from .config/quickshell/modules/overview/SearchWidget.qml rename to .config/quickshell/ii/modules/overview/SearchWidget.qml index 595aeef47..b05dd663e 100644 --- a/.config/quickshell/modules/overview/SearchWidget.qml +++ b/.config/quickshell/ii/modules/overview/SearchWidget.qml @@ -4,14 +4,11 @@ import "root:/modules/common" import "root:/modules/common/widgets" import "root:/modules/common/functions/string_utils.js" as StringUtils import Qt5Compat.GraphicalEffects -import Qt.labs.platform import QtQuick import QtQuick.Controls -import QtQuick.Effects import QtQuick.Layouts import Quickshell import Quickshell.Io -import Quickshell.Hyprland Item { // Wrapper id: root @@ -29,9 +26,9 @@ Item { // Wrapper } function cancelSearch() { - searchInput.selectAll() - root.searchingText = "" - searchWidthBehavior.enabled = true; + searchInput.selectAll(); + root.searchingText = ""; + searchWidthBehavior.enabled = true; } function setSearchingText(text) { @@ -40,42 +37,47 @@ Item { // Wrapper } property var searchActions: [ - { - action: "img", - execute: () => { - executor.executeCommand(Directories.wallpaperSwitchScriptPath) - } - }, { action: "dark", execute: () => { - executor.executeCommand(`${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`) + Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "dark", "--noswitch"]); } }, { action: "light", execute: () => { - executor.executeCommand(`${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`) + Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "light", "--noswitch"]); + } + }, + { + action: "wall", + execute: () => { + Quickshell.execDetached([Directories.wallpaperSwitchScriptPath]); + } + }, + { + action: "konachanwall", + execute: () => { + Quickshell.execDetached([Quickshell.configPath("scripts/colors/random_konachan_wall.sh")]); } }, { action: "accentcolor", - execute: (args) => { - executor.executeCommand( - `${Directories.wallpaperSwitchScriptPath} --noswitch --color ${args != '' ? ("'"+args+"'") : ""}` - ) + execute: args => { + Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--noswitch", "--color", ...(args != '' ? [`${args}`] : [])]); } }, { action: "todo", - execute: (args) => { - Todo.addTask(args) + execute: args => { + Todo.addTask(args); } }, ] function focusFirstItemIfNeeded() { - if (searchInput.focus) appResults.currentIndex = 0; // Focus the first item + if (searchInput.focus) + appResults.currentIndex = 0; // Focus the first item } Timer { @@ -90,32 +92,22 @@ Item { // Wrapper id: mathProcess property list baseCommand: ["qalc", "-t"] function calculateExpression(expression) { - mathProcess.running = false - mathProcess.command = baseCommand.concat(expression) - mathProcess.running = true + mathProcess.running = false; + mathProcess.command = baseCommand.concat(expression); + mathProcess.running = true; } stdout: SplitParser { onRead: data => { - root.mathResult = data - root.focusFirstItemIfNeeded() + root.mathResult = data; + root.focusFirstItemIfNeeded(); } } } - Process { - id: executor - property list baseCommand: ["bash", "-c"] - function executeCommand(command) { - executor.command = baseCommand.concat( - `${command}` - ) - executor.startDetached() - } - } - - Keys.onPressed: (event) => { + Keys.onPressed: event => { // Prevent Esc and Backspace from registering - if (event.key === Qt.Key_Escape) return; + if (event.key === Qt.Key_Escape) + return; // Handle Backspace: focus and delete character if not focused if (event.key === Qt.Key_Backspace) { @@ -136,8 +128,7 @@ Item { // Wrapper } else { // Delete character before cursor if any if (searchInput.cursorPosition > 0) { - searchInput.text = searchInput.text.slice(0, searchInput.cursorPosition - 1) + - searchInput.text.slice(searchInput.cursorPosition); + searchInput.text = searchInput.text.slice(0, searchInput.cursorPosition - 1) + searchInput.text.slice(searchInput.cursorPosition); searchInput.cursorPosition -= 1; } } @@ -150,19 +141,12 @@ Item { // Wrapper } // Only handle visible printable characters (ignore control chars, arrows, etc.) - if ( - event.text && - event.text.length === 1 && - event.key !== Qt.Key_Enter && - event.key !== Qt.Key_Return && - event.text.charCodeAt(0) >= 0x20 // ignore control chars like Backspace, Tab, etc. - ) { + if (event.text && event.text.length === 1 && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && event.text.charCodeAt(0) >= 0x20) // ignore control chars like Backspace, Tab, etc. + { if (!searchInput.activeFocus) { searchInput.forceActiveFocus(); // Insert the character at the cursor position - searchInput.text = searchInput.text.slice(0, searchInput.cursorPosition) + - event.text + - searchInput.text.slice(searchInput.cursorPosition); + searchInput.text = searchInput.text.slice(0, searchInput.cursorPosition) + event.text + searchInput.text.slice(searchInput.cursorPosition); searchInput.cursorPosition += 1; event.accepted = true; } @@ -179,6 +163,8 @@ Item { // Wrapper implicitHeight: columnLayout.implicitHeight radius: Appearance.rounding.large color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant ColumnLayout { id: columnLayout @@ -256,7 +242,8 @@ Item { // Wrapper } } - Rectangle { // Separator + Rectangle { + // Separator visible: root.showResults Layout.fillWidth: true height: 1 @@ -273,10 +260,11 @@ Item { // Wrapper bottomMargin: 10 spacing: 2 KeyNavigation.up: searchBar - highlightMoveDuration : 100 + highlightMoveDuration: 100 onFocusChanged: { - if(focus) appResults.currentIndex = 1; + if (focus) + appResults.currentIndex = 1; } Connections { @@ -289,12 +277,15 @@ Item { // Wrapper model: ScriptModel { id: model - values: { // Search results are handled here + values: { + // Search results are handled here ////////////////// Skip? ////////////////// - if(root.searchingText == "") return []; + if (root.searchingText == "") + return []; ///////////// Special cases /////////////// - if (root.searchingText.startsWith(Config.options.search.prefix.clipboard)) { // Clipboard + if (root.searchingText.startsWith(Config.options.search.prefix.clipboard)) { + // Clipboard const searchString = root.searchingText.slice(Config.options.search.prefix.clipboard.length); return Cliphist.fuzzyQuery(searchString).map(entry => { return { @@ -303,14 +294,13 @@ Item { // Wrapper clickActionName: "", type: `#${entry.match(/^\s*(\S+)/)?.[1] || ""}`, execute: () => { - Quickshell.execDetached( - ["bash", "-c", `echo '${StringUtils.shellSingleQuoteEscape(entry)}' | cliphist decode | wl-copy`] - ); + Quickshell.execDetached(["bash", "-c", `echo '${StringUtils.shellSingleQuoteEscape(entry)}' | cliphist decode | wl-copy`]); } }; }).filter(Boolean); - } - if (root.searchingText.startsWith(Config.options.search.prefix.emojis)) { // Clipboard + } + if (root.searchingText.startsWith(Config.options.search.prefix.emojis)) { + // Clipboard const searchString = root.searchingText.slice(Config.options.search.prefix.emojis.length); return Emojis.fuzzyQuery(searchString).map(entry => { return { @@ -320,12 +310,11 @@ Item { // Wrapper clickActionName: "", type: "Emoji", execute: () => { - Quickshell.clipboardText = entry.match(/^\s*(\S+)/)?.[1] + Quickshell.clipboardText = entry.match(/^\s*(\S+)/)?.[1]; } }; }).filter(Boolean); - } - + } ////////////////// Init /////////////////// nonAppResultsTimer.restart(); @@ -338,7 +327,7 @@ Item { // Wrapper execute: () => { Quickshell.clipboardText = root.mathResult; } - } + }; const commandResultObject = { name: searchingText.replace("file://", ""), clickActionName: Translation.tr("Run"), @@ -346,38 +335,34 @@ Item { // Wrapper fontType: "monospace", materialSymbol: 'terminal', execute: () => { - executor.executeCommand(searchingText.startsWith('sudo') ? `${Config.options.apps.terminal} fish -C '${root.searchingText.replace("file://", "")}'` : root.searchingText.replace("file://", "")); + const cleanedCommand = root.searchingText.replace("file://", ""); + Quickshell.execDetached(["bash", "-c", searchingText.startsWith('sudo') ? `${Config.options.apps.terminal} fish -C '${cleanedCommand}'` : cleanedCommand]); } - } - const launcherActionObjects = root.searchActions - .map(action => { - const actionString = `${Config.options.search.prefix.action}${action.action}`; - if (actionString.startsWith(root.searchingText) || root.searchingText.startsWith(actionString)) { - return { - name: root.searchingText.startsWith(actionString) ? root.searchingText : actionString, - clickActionName: Translation.tr("Run"), - type: Translation.tr("Action"), - materialSymbol: 'settings_suggest', - execute: () => { - action.execute(root.searchingText.split(" ").slice(1).join(" ")) - }, - }; - } - return null; - }) - .filter(Boolean); + }; + const launcherActionObjects = root.searchActions.map(action => { + const actionString = `${Config.options.search.prefix.action}${action.action}`; + if (actionString.startsWith(root.searchingText) || root.searchingText.startsWith(actionString)) { + return { + name: root.searchingText.startsWith(actionString) ? root.searchingText : actionString, + clickActionName: Translation.tr("Run"), + type: Translation.tr("Action"), + materialSymbol: 'settings_suggest', + execute: () => { + action.execute(root.searchingText.split(" ").slice(1).join(" ")); + } + }; + } + return null; + }).filter(Boolean); let result = []; //////////////// Apps ////////////////// - result = result.concat( - AppSearch.fuzzyQuery(root.searchingText) - .map((entry) => { - entry.clickActionName = Translation.tr("Launch"); - entry.type = Translation.tr("App"); - return entry; - }) - ); + result = result.concat(AppSearch.fuzzyQuery(root.searchingText).map(entry => { + entry.clickActionName = Translation.tr("Launch"); + entry.type = Translation.tr("App"); + return entry; + })); ////////// Launcher actions //////////// result = result.concat(launcherActionObjects); @@ -399,7 +384,7 @@ Item { // Wrapper type: Translation.tr("Search the web"), materialSymbol: 'travel_explore', execute: () => { - let url = Config.options.search.engineBaseUrl + root.searchingText + let url = Config.options.search.engineBaseUrl + root.searchingText; for (let site of Config.options.search.excludedSites) { url += ` -site:${site}`; } @@ -411,17 +396,15 @@ Item { // Wrapper } } - delegate: SearchItem { // The selectable item for each search result + delegate: SearchItem { + // The selectable item for each search result required property var modelData anchors.left: parent?.left anchors.right: parent?.right entry: modelData - query: root.searchingText.startsWith(Config.options.search.prefix.clipboard) ? - root.searchingText.slice(Config.options.search.prefix.clipboard.length) : - root.searchingText; + query: root.searchingText.startsWith(Config.options.search.prefix.clipboard) ? root.searchingText.slice(Config.options.search.prefix.clipboard.length) : root.searchingText } } - } } -} \ No newline at end of file +} diff --git a/.config/quickshell/modules/screenCorners/ScreenCorners.qml b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml similarity index 83% rename from .config/quickshell/modules/screenCorners/ScreenCorners.qml rename to .config/quickshell/ii/modules/screenCorners/ScreenCorners.qml index de2130027..0946c03d1 100644 --- a/.config/quickshell/modules/screenCorners/ScreenCorners.qml +++ b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml @@ -26,20 +26,20 @@ Scope { mask: Region { item: null } - HyprlandWindow.visibleMask: Region { - Region { - item: topLeftCorner - } - Region { - item: topRightCorner - } - Region { - item: bottomLeftCorner - } - Region { - item: bottomRightCorner - } - } + // HyprlandWindow.visibleMask: Region { + // Region { + // item: topLeftCorner + // } + // Region { + // item: topRightCorner + // } + // Region { + // item: bottomLeftCorner + // } + // Region { + // item: bottomRightCorner + // } + // } WlrLayershell.namespace: "quickshell:screenCorners" WlrLayershell.layer: WlrLayer.Overlay color: "transparent" diff --git a/.config/quickshell/modules/session/Session.qml b/.config/quickshell/ii/modules/session/Session.qml similarity index 100% rename from .config/quickshell/modules/session/Session.qml rename to .config/quickshell/ii/modules/session/Session.qml diff --git a/.config/quickshell/modules/session/SessionActionButton.qml b/.config/quickshell/ii/modules/session/SessionActionButton.qml similarity index 100% rename from .config/quickshell/modules/session/SessionActionButton.qml rename to .config/quickshell/ii/modules/session/SessionActionButton.qml diff --git a/.config/quickshell/modules/settings/About.qml b/.config/quickshell/ii/modules/settings/About.qml similarity index 96% rename from .config/quickshell/modules/settings/About.qml rename to .config/quickshell/ii/modules/settings/About.qml index 7868c0e7b..dc1c93d70 100644 --- a/.config/quickshell/modules/settings/About.qml +++ b/.config/quickshell/ii/modules/settings/About.qml @@ -20,7 +20,7 @@ ContentPage { Layout.topMargin: 10 Layout.bottomMargin: 10 IconImage { - implicitSize: 100 + implicitSize: 80 source: Quickshell.iconPath(SystemInfo.logo) } ColumnLayout { @@ -87,10 +87,9 @@ ContentPage { spacing: 20 Layout.topMargin: 10 Layout.bottomMargin: 10 - MaterialSymbol { - iconSize: 70 - text: "files" - color: Appearance.colors.colOnSecondaryContainer + IconImage { + implicitSize: 80 + source: Quickshell.iconPath("illogical-impulse") } ColumnLayout { Layout.alignment: Qt.AlignVCenter diff --git a/.config/quickshell/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml similarity index 70% rename from .config/quickshell/modules/settings/InterfaceConfig.qml rename to .config/quickshell/ii/modules/settings/InterfaceConfig.qml index 0f63ea417..2d692442c 100644 --- a/.config/quickshell/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -11,38 +11,58 @@ ContentPage { title: "Policies" ConfigRow { - ColumnLayout { // Weeb policy + ColumnLayout { + // Weeb policy ContentSubsectionLabel { text: "Weeb" } ConfigSelectionArray { currentValue: Config.options.policies.weeb configOptionName: "policies.weeb" - onSelected: (newValue) => { + onSelected: newValue => { Config.options.policies.weeb = newValue; } options: [ - { displayName: "No", value: 0 }, - { displayName: "Yes", value: 1 }, - { displayName: "Closet", value: 2 } + { + displayName: "No", + value: 0 + }, + { + displayName: "Yes", + value: 1 + }, + { + displayName: "Closet", + value: 2 + } ] } } - ColumnLayout { // AI policy + ColumnLayout { + // AI policy ContentSubsectionLabel { text: "AI" } ConfigSelectionArray { currentValue: Config.options.policies.ai configOptionName: "policies.ai" - onSelected: (newValue) => { + onSelected: newValue => { Config.options.policies.ai = newValue; } options: [ - { displayName: "No", value: 0 }, - { displayName: "Yes", value: 1 }, - { displayName: "Local only", value: 2 } + { + displayName: "No", + value: 0 + }, + { + displayName: "Yes", + value: 1 + }, + { + displayName: "Local only", + value: 2 + } ] } } @@ -55,13 +75,22 @@ ContentPage { ConfigSelectionArray { currentValue: Config.options.bar.cornerStyle configOptionName: "bar.cornerStyle" - onSelected: (newValue) => { + onSelected: newValue => { Config.options.bar.cornerStyle = newValue; } options: [ - { displayName: "Hug", value: 0 }, - { displayName: "Float", value: 1 }, - { displayName: "Plain rectangle", value: 2 } + { + displayName: "Hug", + value: 0 + }, + { + displayName: "Float", + value: 1 + }, + { + displayName: "Plain rectangle", + value: 2 + } ] } @@ -182,7 +211,18 @@ ContentPage { Config.options.bar.workspaces.showNumberDelay = value; } } - } + } + + ContentSubsection { + title: "Weather" + ConfigSwitch { + text: "Enable" + checked: Config.options.bar.weather.enable + onCheckedChanged: { + Config.options.bar.weather.enable = checked; + } + } + } } ContentSection { @@ -236,6 +276,50 @@ ContentPage { } } + ContentSection { + title: "Dock" + + ConfigSwitch { + text: "Enable" + checked: Config.options.dock.enable + onCheckedChanged: { + Config.options.dock.enable = checked; + } + } + + ConfigRow { + uniform: true + ConfigSwitch { + text: "Hover to reveal" + checked: Config.options.dock.hoverToReveal + onCheckedChanged: { + Config.options.dock.hoverToReveal = checked; + } + } + ConfigSwitch { + text: "Pinned on startup" + checked: Config.options.dock.pinnedOnStartup + onCheckedChanged: { + Config.options.dock.pinnedOnStartup = checked; + } + } + } + } + + ContentSection { + title: "On-screen display" + ConfigSpinBox { + text: "Timeout (ms)" + value: Config.options.osd.timeout + from: 100 + to: 3000 + stepSize: 100 + onValueChanged: { + Config.options.osd.timeout = value; + } + } + } + ContentSection { title: "Overview" ConfigSpinBox { @@ -271,6 +355,20 @@ ContentPage { } } } - } -} \ No newline at end of file + + ContentSection { + title: "Screenshot tool" + + ConfigSwitch { + text: 'Show regions of potential interest' + checked: Config.options.screenshotTool.showContentRegions + onCheckedChanged: { + Config.options.screenshotTool.showContentRegions = checked; + } + StyledToolTip { + content: "Such regions could be images or parts of the screen that have some containment.\nMight not always be accurate.\nThis is done with an image processing algorithm run locally and no AI is used." + } + } + } +} diff --git a/.config/quickshell/modules/settings/ServicesConfig.qml b/.config/quickshell/ii/modules/settings/ServicesConfig.qml similarity index 56% rename from .config/quickshell/modules/settings/ServicesConfig.qml rename to .config/quickshell/ii/modules/settings/ServicesConfig.qml index 811df09ab..a9e34512b 100644 --- a/.config/quickshell/modules/settings/ServicesConfig.qml +++ b/.config/quickshell/ii/modules/settings/ServicesConfig.qml @@ -138,4 +138,96 @@ ContentPage { } } -} \ No newline at end of file + ContentSection { + title: "Search" + + ConfigSwitch { + text: "Use Levenshtein distance-based algorithm instead of fuzzy" + checked: Config.options.search.sloppy + onCheckedChanged: { + Config.options.search.sloppy = checked; + } + StyledToolTip { + content: "Could be better if you make a ton of typos,\nbut results can be weird and might not work with acronyms\n(e.g. \"GIMP\" might not give you the paint program)" + } + } + + ContentSubsection { + title: "Prefixes" + ConfigRow { + uniform: true + + MaterialTextField { + Layout.fillWidth: true + placeholderText: "Action" + text: Config.options.search.prefix.action + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.search.prefix.action = text; + } + } + MaterialTextField { + Layout.fillWidth: true + placeholderText: "Clipboard" + text: Config.options.search.prefix.clipboard + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.search.prefix.clipboard = text; + } + } + MaterialTextField { + Layout.fillWidth: true + placeholderText: "Emojis" + text: Config.options.search.prefix.emojis + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.search.prefix.emojis = text; + } + } + } + } + ContentSubsection { + title: "Web search" + MaterialTextField { + Layout.fillWidth: true + placeholderText: "Base URL" + text: Config.options.search.engineBaseUrl + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.search.engineBaseUrl = text; + } + } + } + } + + ContentSection { + title: "Time" + + ContentSubsection { + title: "Format" + tooltip: "" + + ConfigSelectionArray { + currentValue: Config.options.time.format + configOptionName: "time.format" + onSelected: newValue => { + Config.options.time.format = newValue; + } + options: [ + { + displayName: "24h", + value: "hh:mm" + }, + { + displayName: "12h am/pm", + value: "h:mm ap" + }, + { + displayName: "12h AM/PM", + value: "h:mm AP" + }, + ] + } + } + } +} diff --git a/.config/quickshell/modules/settings/StyleConfig.qml b/.config/quickshell/ii/modules/settings/StyleConfig.qml similarity index 97% rename from .config/quickshell/modules/settings/StyleConfig.qml rename to .config/quickshell/ii/modules/settings/StyleConfig.qml index b86c0daa2..bc1998c81 100644 --- a/.config/quickshell/modules/settings/StyleConfig.qml +++ b/.config/quickshell/ii/modules/settings/StyleConfig.qml @@ -18,7 +18,7 @@ ContentPage { Process { id: konachanWallProc property string status: "" - command: ["bash", "-c", FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/colors/random_konachan_wall.sh`)] + command: ["bash", "-c", FileUtils.trimFileProtocol(`${Directories.scriptPath}/colors/random_konachan_wall.sh`)] stdout: SplitParser { onRead: data => { console.log(`Konachan wall proc output: ${data}`); @@ -50,6 +50,7 @@ ContentPage { configOptionName: "appearance.palette.type" onSelected: (newValue) => { Config.options.appearance.palette.type = newValue; + Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --noswitch`]) } options: [ {"value": "auto", "displayName": "Auto"}, diff --git a/.config/quickshell/modules/sidebarLeft/AiChat.qml b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml similarity index 85% rename from .config/quickshell/modules/sidebarLeft/AiChat.qml rename to .config/quickshell/ii/modules/sidebarLeft/AiChat.qml index 69ff3a9be..87d9b8ffc 100644 --- a/.config/quickshell/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -71,6 +71,30 @@ Item { } } }, + { + name: "save", + description: qsTr("Save chat"), + execute: (args) => { + const joinedArgs = args.join(" ") + if (joinedArgs.trim().length == 0) { + Ai.addMessage(`Usage: ${root.commandPrefix}save CHAT_NAME`, Ai.interfaceRole); + return; + } + Ai.saveChat(joinedArgs) + } + }, + { + name: "load", + description: qsTr("Load chat"), + execute: (args) => { + const joinedArgs = args.join(" ") + if (joinedArgs.trim().length == 0) { + Ai.addMessage(`Usage: ${root.commandPrefix}load CHAT_NAME`, Ai.interfaceRole); + return; + } + Ai.loadChat(joinedArgs) + } + }, { name: "clear", description: qsTr("Clear chat history"), @@ -105,7 +129,7 @@ Mowe uwu wem ipsum! ### Formatting - *Italic*, \`Monospace\`, **Bold**, [Link](https://example.com) -- Arch lincox icon +- Arch lincox icon ### Table @@ -358,11 +382,11 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) background: null onTextChanged: { // Handle suggestions - if(messageInputField.text.length === 0) { + if (messageInputField.text.length === 0) { root.suggestionQuery = "" root.suggestionList = [] return - } else if(messageInputField.text.startsWith(`${root.commandPrefix}model`)) { + } else if (messageInputField.text.startsWith(`${root.commandPrefix}model`)) { root.suggestionQuery = messageInputField.text.split(" ")[1] ?? "" const modelResults = Fuzzy.go(root.suggestionQuery, Ai.modelList.map(model => { return { @@ -380,7 +404,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) description: `${Ai.models[model.target].description}`, } }) - } else if(messageInputField.text.startsWith(`${root.commandPrefix}prompt`)) { + } else if (messageInputField.text.startsWith(`${root.commandPrefix}prompt`)) { root.suggestionQuery = messageInputField.text.split(" ")[1] ?? "" const promptFileResults = Fuzzy.go(root.suggestionQuery, Ai.promptFiles.map(file => { return { @@ -398,6 +422,44 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) description: `Load prompt from ${file.target}`, } }) + } else if (messageInputField.text.startsWith(`${root.commandPrefix}save`)) { + root.suggestionQuery = messageInputField.text.split(" ")[1] ?? "" + const promptFileResults = Fuzzy.go(root.suggestionQuery, Ai.savedChats.map(file => { + return { + name: Fuzzy.prepare(file), + obj: file, + } + }), { + all: true, + key: "name" + }) + root.suggestionList = promptFileResults.map(file => { + const chatName = FileUtils.trimFileExt(FileUtils.fileNameForPath(file.target)).trim() + return { + name: `${messageInputField.text.trim().split(" ").length == 1 ? (root.commandPrefix + "save ") : ""}${chatName}`, + displayName: `${chatName}`, + description: `Save chat from ${chatName}`, + } + }) + } else if (messageInputField.text.startsWith(`${root.commandPrefix}load`)) { + root.suggestionQuery = messageInputField.text.split(" ")[1] ?? "" + const promptFileResults = Fuzzy.go(root.suggestionQuery, Ai.savedChats.map(file => { + return { + name: Fuzzy.prepare(file), + obj: file, + } + }), { + all: true, + key: "name" + }) + root.suggestionList = promptFileResults.map(file => { + const chatName = FileUtils.trimFileExt(FileUtils.fileNameForPath(file.target)).trim() + return { + name: `${messageInputField.text.trim().split(" ").length == 1 ? (root.commandPrefix + "load ") : ""}${chatName}`, + displayName: `${chatName}`, + description: `Load chat from ${file.target}`, + } + }) } else if(messageInputField.text.startsWith(root.commandPrefix)) { root.suggestionQuery = messageInputField.text root.suggestionList = root.allCommands.filter(cmd => cmd.name.startsWith(messageInputField.text.substring(1))).map(cmd => { diff --git a/.config/quickshell/modules/sidebarLeft/Anime.qml b/.config/quickshell/ii/modules/sidebarLeft/Anime.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/Anime.qml rename to .config/quickshell/ii/modules/sidebarLeft/Anime.qml diff --git a/.config/quickshell/modules/sidebarLeft/ApiCommandButton.qml b/.config/quickshell/ii/modules/sidebarLeft/ApiCommandButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/ApiCommandButton.qml rename to .config/quickshell/ii/modules/sidebarLeft/ApiCommandButton.qml diff --git a/.config/quickshell/modules/sidebarLeft/DescriptionBox.qml b/.config/quickshell/ii/modules/sidebarLeft/DescriptionBox.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/DescriptionBox.qml rename to .config/quickshell/ii/modules/sidebarLeft/DescriptionBox.qml diff --git a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml b/.config/quickshell/ii/modules/sidebarLeft/SidebarLeft.qml similarity index 98% rename from .config/quickshell/modules/sidebarLeft/SidebarLeft.qml rename to .config/quickshell/ii/modules/sidebarLeft/SidebarLeft.qml index bed1d85fa..97a82791e 100644 --- a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/SidebarLeft.qml @@ -101,6 +101,8 @@ Scope { // Scope width: sidebarRoot.sidebarWidth - Appearance.sizes.hyprlandGapsOut - Appearance.sizes.elevationMargin height: parent.height - Appearance.sizes.hyprlandGapsOut * 2 color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant radius: Appearance.rounding.screenRounding - Appearance.sizes.hyprlandGapsOut + 1 Behavior on width { diff --git a/.config/quickshell/modules/sidebarLeft/SidebarLeftContent.qml b/.config/quickshell/ii/modules/sidebarLeft/SidebarLeftContent.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/SidebarLeftContent.qml rename to .config/quickshell/ii/modules/sidebarLeft/SidebarLeftContent.qml diff --git a/.config/quickshell/modules/sidebarLeft/Translator.qml b/.config/quickshell/ii/modules/sidebarLeft/Translator.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/Translator.qml rename to .config/quickshell/ii/modules/sidebarLeft/Translator.qml diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml similarity index 98% rename from .config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml index 4317f2265..9933851c6 100644 --- a/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml @@ -121,11 +121,8 @@ Rectangle { height: Appearance.font.pixelSize.large source: messageData?.role == 'assistant' ? Ai.models[messageData?.model].icon : messageData?.role == 'user' ? 'linux-symbolic' : 'desktop-symbolic' - } - ColorOverlay { - visible: modelIcon.visible - anchors.fill: modelIcon - source: modelIcon + + colorize: true color: Appearance.m3colors.m3onSecondaryContainer } diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/AiMessageControlButton.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessageControlButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/aiChat/AiMessageControlButton.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessageControlButton.qml diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/AnnotationSourceButton.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AnnotationSourceButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/aiChat/AnnotationSourceButton.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/AnnotationSourceButton.qml diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/MessageCodeBlock.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/aiChat/MessageCodeBlock.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/MessageCodeBlock.qml diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/MessageTextBlock.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/aiChat/MessageTextBlock.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/MessageThinkBlock.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageThinkBlock.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/aiChat/MessageThinkBlock.qml rename to .config/quickshell/ii/modules/sidebarLeft/aiChat/MessageThinkBlock.qml diff --git a/.config/quickshell/modules/sidebarLeft/anime/BooruImage.qml b/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/anime/BooruImage.qml rename to .config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml diff --git a/.config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml b/.config/quickshell/ii/modules/sidebarLeft/anime/BooruResponse.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml rename to .config/quickshell/ii/modules/sidebarLeft/anime/BooruResponse.qml diff --git a/.config/quickshell/modules/sidebarLeft/translator/LanguageSelectorButton.qml b/.config/quickshell/ii/modules/sidebarLeft/translator/LanguageSelectorButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/translator/LanguageSelectorButton.qml rename to .config/quickshell/ii/modules/sidebarLeft/translator/LanguageSelectorButton.qml diff --git a/.config/quickshell/modules/sidebarLeft/translator/TextCanvas.qml b/.config/quickshell/ii/modules/sidebarLeft/translator/TextCanvas.qml similarity index 100% rename from .config/quickshell/modules/sidebarLeft/translator/TextCanvas.qml rename to .config/quickshell/ii/modules/sidebarLeft/translator/TextCanvas.qml diff --git a/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml b/.config/quickshell/ii/modules/sidebarRight/BottomWidgetGroup.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml rename to .config/quickshell/ii/modules/sidebarRight/BottomWidgetGroup.qml diff --git a/.config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml b/.config/quickshell/ii/modules/sidebarRight/CenterWidgetGroup.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/CenterWidgetGroup.qml rename to .config/quickshell/ii/modules/sidebarRight/CenterWidgetGroup.qml diff --git a/.config/quickshell/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml similarity index 97% rename from .config/quickshell/modules/sidebarRight/SidebarRight.qml rename to .config/quickshell/ii/modules/sidebarRight/SidebarRight.qml index fb868e7ca..bd4d5d55f 100644 --- a/.config/quickshell/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml @@ -21,7 +21,7 @@ Scope { id: root property int sidebarWidth: Appearance.sizes.sidebarWidth property int sidebarPadding: 15 - property string settingsQmlPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/settings.qml`) + property string settingsQmlPath: Quickshell.configPath("settings.qml") PanelWindow { id: sidebarRoot @@ -90,6 +90,8 @@ Scope { implicitHeight: parent.height - Appearance.sizes.hyprlandGapsOut * 2 implicitWidth: sidebarWidth - Appearance.sizes.hyprlandGapsOut * 2 color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.m3colors.m3outlineVariant radius: Appearance.rounding.screenRounding - Appearance.sizes.hyprlandGapsOut + 1 ColumnLayout { @@ -178,6 +180,7 @@ Scope { NightLight {} GameMode {} IdleInhibitor {} + CloudflareWarp {} } // Center widget group diff --git a/.config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml b/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarDayButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml rename to .config/quickshell/ii/modules/sidebarRight/calendar/CalendarDayButton.qml diff --git a/.config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml b/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml rename to .config/quickshell/ii/modules/sidebarRight/calendar/CalendarHeaderButton.qml diff --git a/.config/quickshell/modules/sidebarRight/calendar/CalendarWidget.qml b/.config/quickshell/ii/modules/sidebarRight/calendar/CalendarWidget.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/calendar/CalendarWidget.qml rename to .config/quickshell/ii/modules/sidebarRight/calendar/CalendarWidget.qml diff --git a/.config/quickshell/modules/sidebarRight/calendar/calendar_layout.js b/.config/quickshell/ii/modules/sidebarRight/calendar/calendar_layout.js similarity index 100% rename from .config/quickshell/modules/sidebarRight/calendar/calendar_layout.js rename to .config/quickshell/ii/modules/sidebarRight/calendar/calendar_layout.js diff --git a/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml b/.config/quickshell/ii/modules/sidebarRight/notifications/NotificationList.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/notifications/NotificationList.qml rename to .config/quickshell/ii/modules/sidebarRight/notifications/NotificationList.qml diff --git a/.config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml b/.config/quickshell/ii/modules/sidebarRight/notifications/NotificationStatusButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml rename to .config/quickshell/ii/modules/sidebarRight/notifications/NotificationStatusButton.qml diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/BluetoothToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/quickToggles/BluetoothToggle.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/BluetoothToggle.qml diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml new file mode 100644 index 000000000..cdaf84b76 --- /dev/null +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml @@ -0,0 +1,85 @@ +import "root:/modules/common" +import "root:/modules/common/widgets" +import "../" +import QtQuick +import Quickshell.Io +import Quickshell +import Quickshell.Hyprland + +QuickToggleButton { + id: root + toggled: false + visible: false + + contentItem: CustomIcon { + id: distroIcon + source: 'cloudflare-dns-symbolic' + + anchors.centerIn: parent + height: 16 + colorize: true + color: root.toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1 + + Behavior on color { + animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) + } + } + + onClicked: { + if (toggled) { + root.toggled = false + Quickshell.execDetached(["warp-cli", "disconnect"]) + } else { + root.toggled = true + Quickshell.execDetached(["warp-cli", "connect"]) + } + } + + Process { + id: connectProc + command: ["warp-cli", "connect"] + onExited: (exitCode, exitStatus) => { + if (exitCode !== 0) { + Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Connection failed. Please inspect manually with the warp-cli command", "-a", "Shell"]) + } + } + } + + Process { + id: registrationProc + command: ["warp-cli", "registration", "new"] + onExited: (exitCode, exitStatus) => { + console.log("Warp registration exited with code and status:", exitCode, exitStatus) + if (exitCode === 0) { + connectProc.running = true + } else { + Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Registration failed. Please inspect manually with the warp-cli command", "-a", "Shell"]) + } + } + } + + Process { + id: fetchActiveState + running: true + command: ["bash", "-c", "warp-cli status"] + stdout: StdioCollector { + id: warpStatusCollector + onStreamFinished: { + if (warpStatusCollector.text.length > 0) { + console.log("Showing warp") + root.visible = true + } + if (warpStatusCollector.text.includes("Unable")) { + registrationProc.running = true + } else if (warpStatusCollector.text.includes("Connected")) { + root.toggled = true + } else if (warpStatusCollector.text.includes("Disconnected")) { + root.toggled = false + } + } + } + } + StyledToolTip { + content: qsTr("Cloudflare WARP (1.1.1.1)") + } +} diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/GameMode.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/quickToggles/GameMode.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/GameMode.qml diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/IdleInhibitor.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml similarity index 76% rename from .config/quickshell/modules/sidebarRight/quickToggles/IdleInhibitor.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml index 0cb848fb7..ced345f77 100644 --- a/.config/quickshell/modules/sidebarRight/quickToggles/IdleInhibitor.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml @@ -13,10 +13,10 @@ QuickToggleButton { onClicked: { if (toggled) { root.toggled = false - Hyprland.dispatch("exec pkill wayland-idle") // pkill doesn't accept too long names + Quickshell.execDetached(["pkill", "wayland-idle"]) // pkill doesn't accept too long names } else { root.toggled = true - Hyprland.dispatch('exec ${XDG_CONFIG_HOME:-$HOME/.config}/quickshell/scripts/wayland-idle-inhibitor.py') + Quickshell.execDetached([`${Directories.scriptPath}/wayland-idle-inhibitor.py`]) } } Process { diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/NetworkToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/quickToggles/NetworkToggle.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/NetworkToggle.qml diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/NightLight.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/quickToggles/NightLight.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/NightLight.qml diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml rename to .config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml diff --git a/.config/quickshell/modules/sidebarRight/todo/TaskList.qml b/.config/quickshell/ii/modules/sidebarRight/todo/TaskList.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/todo/TaskList.qml rename to .config/quickshell/ii/modules/sidebarRight/todo/TaskList.qml diff --git a/.config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml b/.config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml rename to .config/quickshell/ii/modules/sidebarRight/todo/TodoItemActionButton.qml diff --git a/.config/quickshell/modules/sidebarRight/todo/TodoWidget.qml b/.config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/todo/TodoWidget.qml rename to .config/quickshell/ii/modules/sidebarRight/todo/TodoWidget.qml diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml b/.config/quickshell/ii/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml rename to .config/quickshell/ii/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml b/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixer.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml rename to .config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixer.qml diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml b/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml similarity index 100% rename from .config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml rename to .config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeMixerEntry.qml diff --git a/.config/quickshell/screenshot.qml b/.config/quickshell/ii/screenshot.qml similarity index 95% rename from .config/quickshell/screenshot.qml rename to .config/quickshell/ii/screenshot.qml index 8e9af0499..f15558719 100644 --- a/.config/quickshell/screenshot.qml +++ b/.config/quickshell/ii/screenshot.qml @@ -15,13 +15,14 @@ import QtQuick.Controls import QtQuick.Layouts import Quickshell import Quickshell.Io +import Quickshell.Widgets import Quickshell.Wayland import Quickshell.Hyprland import "./services/" ShellRoot { id: root - property string screenshotDir: "/tmp/quickshell/media/screenshot" + property string screenshotDir: Directories.screenshotTemp property color overlayColor: "#77111111" property color genericContentColor: Qt.alpha(root.overlayColor, 0.9) property color genericContentForeground: "#ddffffff" @@ -44,6 +45,7 @@ ShellRoot { component TargetRegion: Rectangle { id: regionRect + property bool showIcon: false property bool targeted: false property color borderColor property color fillColor: "transparent" @@ -69,13 +71,28 @@ ShellRoot { topMargin: regionRect.textPadding leftMargin: regionRect.textPadding } - implicitWidth: regionText.implicitWidth + horizontalPadding * 2 - implicitHeight: regionText.implicitHeight + verticalPadding * 2 - StyledText { - id: regionText - text: regionRect.text - color: root.genericContentForeground + implicitWidth: regionInfoRow.implicitWidth + horizontalPadding * 2 + implicitHeight: regionInfoRow.implicitHeight + verticalPadding * 2 + RowLayout { + id: regionInfoRow anchors.centerIn: parent + spacing: 8 + + Loader { + id: regionIconLoader + active: regionRect.showIcon + visible: active + sourceComponent: IconImage { + implicitSize: Appearance.font.pixelSize.larger + source: Quickshell.iconPath(AppSearch.guessIcon(regionRect.text), "image-missing") + } + } + + StyledText { + id: regionText + text: regionRect.text + color: root.genericContentForeground + } } } } @@ -117,7 +134,7 @@ ShellRoot { const layersOfThisMonitor = root.layers[panelWindow.hyprlandMonitor.name] const topLayers = layersOfThisMonitor.levels["2"] const nonBarTopLayers = topLayers - .filter(layer => !(layer.namespace.includes(":bar"))) + .filter(layer => !(layer.namespace.includes(":bar") || layer.namespace.includes(":dock"))) .map(layer => { return { at: [layer.x, layer.y], @@ -441,6 +458,7 @@ ShellRoot { delegate: TargetRegion { z: 2 required property var modelData + showIcon: true targeted: !panelWindow.draggedAway && (panelWindow.targetedRegionX === modelData.at[0] && panelWindow.targetedRegionY === modelData.at[1] @@ -500,7 +518,7 @@ ShellRoot { // Image regions Repeater { model: ScriptModel { - values: panelWindow.imageRegions + values: Config.options.screenshotTool.showContentRegions ? panelWindow.imageRegions : [] } delegate: TargetRegion { z: 4 diff --git a/.config/quickshell/scripts/ai/show-installed-ollama-models.sh b/.config/quickshell/ii/scripts/ai/show-installed-ollama-models.sh similarity index 100% rename from .config/quickshell/scripts/ai/show-installed-ollama-models.sh rename to .config/quickshell/ii/scripts/ai/show-installed-ollama-models.sh diff --git a/.config/quickshell/scripts/cava/raw_output_config.txt b/.config/quickshell/ii/scripts/cava/raw_output_config.txt similarity index 100% rename from .config/quickshell/scripts/cava/raw_output_config.txt rename to .config/quickshell/ii/scripts/cava/raw_output_config.txt diff --git a/.config/quickshell/scripts/colors/applycolor.sh b/.config/quickshell/ii/scripts/colors/applycolor.sh similarity index 88% rename from .config/quickshell/scripts/colors/applycolor.sh rename to .config/quickshell/ii/scripts/colors/applycolor.sh index b36fc4d25..b86fb679e 100755 --- a/.config/quickshell/scripts/colors/applycolor.sh +++ b/.config/quickshell/ii/scripts/colors/applycolor.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash +QUICKSHELL_CONFIG_NAME="ii" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -CONFIG_DIR="$XDG_CONFIG_HOME/quickshell" +CONFIG_DIR="$XDG_CONFIG_HOME/quickshell/$QUICKSHELL_CONFIG_NAME" CACHE_DIR="$XDG_CACHE_HOME/quickshell" STATE_DIR="$XDG_STATE_HOME/quickshell" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -28,13 +29,13 @@ colorvalues=($colorstrings) # Array of color values apply_term() { # Check if terminal escape sequence template exists - if [ ! -f "$CONFIG_DIR"/scripts/terminal/sequences.txt ]; then + if [ ! -f "$SCRIPT_DIR/terminal/sequences.txt" ]; then echo "Template file not found for Terminal. Skipping that." return fi # Copy template mkdir -p "$STATE_DIR"/user/generated/terminal - cp "$CONFIG_DIR"/scripts/terminal/sequences.txt "$STATE_DIR"/user/generated/terminal/sequences.txt + cp "$SCRIPT_DIR/terminal/sequences.txt" "$STATE_DIR"/user/generated/terminal/sequences.txt # Apply colors for i in "${!colorlist[@]}"; do sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$STATE_DIR"/user/generated/terminal/sequences.txt diff --git a/.config/quickshell/scripts/colors/generate_colors_material.py b/.config/quickshell/ii/scripts/colors/generate_colors_material.py similarity index 100% rename from .config/quickshell/scripts/colors/generate_colors_material.py rename to .config/quickshell/ii/scripts/colors/generate_colors_material.py diff --git a/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh new file mode 100755 index 000000000..079cad96e --- /dev/null +++ b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +QUICKSHELL_CONFIG_NAME="ii" +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +CONFIG_DIR="$XDG_CONFIG_HOME/quickshell/$QUICKSHELL_CONFIG_NAME" +CACHE_DIR="$XDG_CACHE_HOME/quickshell" +STATE_DIR="$XDG_STATE_HOME/quickshell" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +mkdir -p ~/Pictures/Wallpapers +page=$((1 + RANDOM % 1000)); +response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page") +link=$(echo "$response" | jq '.[0].file_url' -r); +ext=$(echo "$link" | awk -F. '{print $NF}') +downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext" +curl "$link" -o "$downloadPath" +"$SCRIPT_DIR/switchwall.sh" --image "$downloadPath" diff --git a/.config/quickshell/scripts/colors/scheme_for_image.py b/.config/quickshell/ii/scripts/colors/scheme_for_image.py similarity index 100% rename from .config/quickshell/scripts/colors/scheme_for_image.py rename to .config/quickshell/ii/scripts/colors/scheme_for_image.py diff --git a/.config/quickshell/scripts/colors/switchwall.sh b/.config/quickshell/ii/scripts/colors/switchwall.sh similarity index 97% rename from .config/quickshell/scripts/colors/switchwall.sh rename to .config/quickshell/ii/scripts/colors/switchwall.sh index 35caba66f..de76444fd 100755 --- a/.config/quickshell/scripts/colors/switchwall.sh +++ b/.config/quickshell/ii/scripts/colors/switchwall.sh @@ -1,14 +1,15 @@ #!/usr/bin/env bash +QUICKSHELL_CONFIG_NAME="ii" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -CONFIG_DIR="$XDG_CONFIG_HOME/quickshell" +CONFIG_DIR="$XDG_CONFIG_HOME/quickshell/$QUICKSHELL_CONFIG_NAME" CACHE_DIR="$XDG_CACHE_HOME/quickshell" STATE_DIR="$XDG_STATE_HOME/quickshell" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" MATUGEN_DIR="$XDG_CONFIG_HOME/matugen" -terminalscheme="$XDG_CONFIG_HOME/quickshell/scripts/terminal/scheme-base.json" +terminalscheme="$SCRIPT_DIR/terminal/scheme-base.json" handle_kde_material_you_colors() { # Map $type_flag to allowed scheme variants for kde-material-you-colors-wrapper.sh @@ -297,7 +298,7 @@ main() { ;; --noswitch) noswitch_flag="1" - imgpath=$(swww query | awk -F 'image: ' '{print $2}') + imgpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}') shift ;; *) @@ -330,7 +331,7 @@ main() { # Only prompt for wallpaper if not using --color and not using --noswitch and no imgpath set if [[ -z "$imgpath" && -z "$color_flag" && -z "$noswitch_flag" ]]; then - cd "$(xdg-user-dir PICTURES)/Wallpapers" 2>/dev/null || cd "$(xdg-user-dir PICTURES)" || return 1 + cd "$(xdg-user-dir PICTURES)/Wallpapers/showcase" 2>/dev/null || cd "$(xdg-user-dir PICTURES)/Wallpapers" 2>/dev/null || cd "$(xdg-user-dir PICTURES)" || return 1 imgpath="$(kdialog --getopenfilename . --title 'Choose wallpaper')" fi diff --git a/.config/quickshell/scripts/terminal/scheme-base.json b/.config/quickshell/ii/scripts/colors/terminal/scheme-base.json similarity index 100% rename from .config/quickshell/scripts/terminal/scheme-base.json rename to .config/quickshell/ii/scripts/colors/terminal/scheme-base.json diff --git a/.config/quickshell/scripts/terminal/sequences.txt b/.config/quickshell/ii/scripts/colors/terminal/sequences.txt similarity index 100% rename from .config/quickshell/scripts/terminal/sequences.txt rename to .config/quickshell/ii/scripts/colors/terminal/sequences.txt diff --git a/.config/quickshell/scripts/hyprland/get_keybinds.py b/.config/quickshell/ii/scripts/hyprland/get_keybinds.py similarity index 100% rename from .config/quickshell/scripts/hyprland/get_keybinds.py rename to .config/quickshell/ii/scripts/hyprland/get_keybinds.py diff --git a/.config/quickshell/scripts/images/find_regions.py b/.config/quickshell/ii/scripts/images/find_regions.py similarity index 100% rename from .config/quickshell/scripts/images/find_regions.py rename to .config/quickshell/ii/scripts/images/find_regions.py diff --git a/.config/quickshell/scripts/kvantum/adwsvg.py b/.config/quickshell/ii/scripts/kvantum/adwsvg.py similarity index 100% rename from .config/quickshell/scripts/kvantum/adwsvg.py rename to .config/quickshell/ii/scripts/kvantum/adwsvg.py diff --git a/.config/quickshell/scripts/kvantum/adwsvgDark.py b/.config/quickshell/ii/scripts/kvantum/adwsvgDark.py similarity index 100% rename from .config/quickshell/scripts/kvantum/adwsvgDark.py rename to .config/quickshell/ii/scripts/kvantum/adwsvgDark.py diff --git a/.config/quickshell/scripts/kvantum/changeAdwColors.py b/.config/quickshell/ii/scripts/kvantum/changeAdwColors.py similarity index 100% rename from .config/quickshell/scripts/kvantum/changeAdwColors.py rename to .config/quickshell/ii/scripts/kvantum/changeAdwColors.py diff --git a/.config/quickshell/scripts/kvantum/materialQT.sh b/.config/quickshell/ii/scripts/kvantum/materialQT.sh similarity index 89% rename from .config/quickshell/scripts/kvantum/materialQT.sh rename to .config/quickshell/ii/scripts/kvantum/materialQT.sh index 3d1f8a7bf..a049c5536 100755 --- a/.config/quickshell/scripts/kvantum/materialQT.sh +++ b/.config/quickshell/ii/scripts/kvantum/materialQT.sh @@ -1,11 +1,13 @@ #!/usr/bin/env bash +QUICKSHELL_CONFIG_NAME="ii" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -CONFIG_DIR="$XDG_CONFIG_HOME/quickshell" +CONFIG_DIR="$XDG_CONFIG_HOME/quickshell/$QUICKSHELL_CONFIG_NAME" CACHE_DIR="$XDG_CACHE_HOME/quickshell" STATE_DIR="$XDG_STATE_HOME/quickshell" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" get_light_dark() { current_mode=$(gsettings get org.gnome.desktop.interface color-scheme 2>/dev/null | tr -d "'") diff --git a/.config/quickshell/scripts/wayland-idle-inhibitor.py b/.config/quickshell/ii/scripts/wayland-idle-inhibitor.py similarity index 100% rename from .config/quickshell/scripts/wayland-idle-inhibitor.py rename to .config/quickshell/ii/scripts/wayland-idle-inhibitor.py diff --git a/.config/quickshell/services/Ai.qml b/.config/quickshell/ii/services/Ai.qml similarity index 87% rename from .config/quickshell/services/Ai.qml rename to .config/quickshell/ii/services/Ai.qml index 29e4b6412..7c12d5b72 100644 --- a/.config/quickshell/services/Ai.qml +++ b/.config/quickshell/ii/services/Ai.qml @@ -20,7 +20,7 @@ Singleton { readonly property string apiKeyEnvVarName: "API_KEY" property Component aiMessageComponent: AiMessageData {} property string systemPrompt: Config.options?.ai?.systemPrompt ?? "" - property var messages: [] + // property var messages: [] property var messageIDs: [] property var messageByID: ({}) readonly property var apiKeys: KeyringStorage.keyringData?.apiKeys ?? {} @@ -40,6 +40,7 @@ Singleton { property list defaultPrompts: [] property list userPrompts: [] property list promptFiles: [...defaultPrompts, ...userPrompts] + property list savedChats: [] // Model properties: // - name: Name of the model @@ -237,7 +238,7 @@ Singleton { Process { id: getOllamaModels running: true - command: ["bash", "-c", `${Directories.config}/quickshell/scripts/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")] + command: ["bash", "-c", `${Directories.scriptPath}/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")] stdout: SplitParser { onRead: data => { try { @@ -293,6 +294,20 @@ Singleton { } } + Process { + id: getSavedChats + running: true + command: ["ls", "-1", Directories.aiChats] + stdout: StdioCollector { + onStreamFinished: { + if (text.length === 0) return; + root.savedChats = text.split("\n") + .filter(fileName => fileName.endsWith(".json")) + .map(fileName => `${Directories.aiChats}/${fileName}`) + } + } + } + FileView { id: promptLoader watchChanges: false; @@ -318,6 +333,7 @@ Singleton { const aiMessage = aiMessageComponent.createObject(root, { "role": role, "content": message, + "rawContent": message, "thinking": false, "done": true, }); @@ -446,6 +462,7 @@ Singleton { root.postResponseHook(); root.postResponseHook = null; // Reset hook after use } + root.saveChat("lastSession") } function buildGeminiRequestData(model, messages) { @@ -477,7 +494,7 @@ Singleton { return { "role": geminiApiRoleName, "parts": [{ - text: message.content, + text: message.rawContent, }] } }), @@ -502,7 +519,7 @@ Singleton { ...messages.filter(message => (message.role != Ai.interfaceRole)).map(message => { return { "role": message.role, - "content": message.content, + "content": message.rawContent, } }), ], @@ -534,6 +551,7 @@ Singleton { "role": "assistant", "model": currentModelId, "content": "", + "rawContent": "", "thinking": true, "done": false, }); @@ -578,12 +596,15 @@ Singleton { const functionCall = dataJson.candidates[0]?.content?.parts[0]?.functionCall; requester.message.functionName = functionCall.name; requester.message.functionCall = functionCall.name; - requester.message.content += `\n\n[[ Function: ${functionCall.name}(${JSON.stringify(functionCall.args, null, 2)}) ]]\n`; + const newContent = `\n\n[[ Function: ${functionCall.name}(${JSON.stringify(functionCall.args, null, 2)}) ]]\n` + requester.message.rawContent += newContent; + requester.message.content += newContent; root.handleGeminiFunctionCall(functionCall.name, functionCall.args); return } // Normal text response const responseContent = dataJson.candidates[0]?.content?.parts[0]?.text + requester.message.rawContent += responseContent; requester.message.content += responseContent; const annotationSources = dataJson.candidates[0]?.groundingMetadata?.groundingChunks?.map(chunk => { return { @@ -607,6 +628,7 @@ Singleton { // console.log(JSON.stringify(requester.message, null, 2)); } catch (e) { console.log("[AI] Could not parse response from stream: ", e); + requester.message.rawContent += requester.geminiBuffer; requester.message.content += requester.geminiBuffer } finally { requester.geminiBuffer = ""; @@ -648,15 +670,19 @@ Singleton { if (responseContent && responseContent.length > 0) { if (requester.isReasoning) { requester.isReasoning = false; - requester.message.content += "\n\n\n\n"; + const endBlock = "\n\n\n\n"; + requester.message.content += endBlock; + requester.message.rawContent += endBlock; } newContent = dataJson.choices[0]?.delta?.content || dataJson.message.content; } else if (responseReasoning && responseReasoning.length > 0) { // console.log("Reasoning content: ", dataJson.choices[0].delta.reasoning); if (!requester.isReasoning) { requester.isReasoning = true; - requester.message.content += "\n\n\n\n"; - } + const startBlock = "\n\n\n\n"; + requester.message.rawContent += startBlock; + requester.message.content += startBlock; + } newContent = dataJson.choices[0].delta.reasoning || dataJson.choices[0].delta.reasoning_content; } @@ -683,10 +709,12 @@ Singleton { } else { console.log("Unknown API format: ", requester.apiFormat); + requester.message.rawContent += data; requester.message.content += data; } } catch (e) { console.log("[AI] Could not parse response from stream: ", e); + requester.message.rawContent += data; requester.message.content += data; } } @@ -698,8 +726,9 @@ Singleton { try { // to parse full response into json for error handling // console.log("Full response: ", requester.message.content + "]"); - const parsedResponse = JSON.parse(requester.message.content + "]"); - requester.message.content = `\`\`\`json\n${JSON.stringify(parsedResponse, null, 2)}\n\`\`\``; + const parsedResponse = JSON.parse(requester.message.rawContent + "]"); + requester.message.rawContent = `\`\`\`json\n${JSON.stringify(parsedResponse, null, 2)}\n\`\`\``; + requester.message.content = requester.message.rawContent; } catch (e) { // console.log("[AI] Could not parse response on exit: ", e); } @@ -720,6 +749,7 @@ Singleton { const aiMessage = aiMessageComponent.createObject(root, { "role": "user", "content": `[[ Output of ${name} ]]`, + "rawContent": `[[ Output of ${name} ]]`, "functionName": name, "functionResponse": output, "thinking": false, @@ -772,4 +802,80 @@ Singleton { else root.addMessage(Translation.tr("Unknown function call: {0}"), "assistant"); } + function chatToJson() { + return root.messageIDs.map(id => { + const message = root.messageByID[id] + return ({ + "role": message.role, + "rawContent": message.rawContent, + "model": message.model, + "thinking": false, + "done": true, + "annotations": message.annotations, + "annotationSources": message.annotationSources, + "functionName": message.functionName, + "functionCall": message.functionCall, + "functionResponse": message.functionResponse, + "visibleToUser": message.visibleToUser, + }) + }) + } + + FileView { + id: chatSaveFile + property string chatName: "chat" + path: `${Directories.aiChats}/${chatName}.json` + blockLoading: true + } + + /** + * Saves chat to a JSON list of message objects. + * @param chatName name of the chat + */ + function saveChat(chatName) { + chatSaveFile.chatName = chatName.trim() + const saveContent = JSON.stringify(root.chatToJson()) + chatSaveFile.setText(saveContent) + getSavedChats.running = true; + } + + /** + * Loads chat from a JSON list of message objects. + * @param chatName name of the chat + */ + function loadChat(chatName) { + try { + chatSaveFile.chatName = chatName.trim() + chatSaveFile.reload() + const saveContent = chatSaveFile.text() + // console.log(saveContent) + const saveData = JSON.parse(saveContent) + root.clearMessages() + root.messageIDs = saveData.map((_, i) => { + return i + }) + console.log(JSON.stringify(messageIDs)) + for (let i = 0; i < saveData.length; i++) { + const message = saveData[i]; + root.messageByID[i] = root.aiMessageComponent.createObject(root, { + "role": message.role, + "rawContent": message.rawContent, + "content": message.rawContent, + "model": message.model, + "thinking": message.thinking, + "done": message.done, + "annotations": message.annotations, + "annotationSources": message.annotationSources, + "functionName": message.functionName, + "functionCall": message.functionCall, + "functionResponse": message.functionResponse, + "visibleToUser": message.visibleToUser, + }); + } + } catch (e) { + console.log("[AI] Could not load chat: ", e); + } finally { + getSavedChats.running = true; + } + } } diff --git a/.config/quickshell/services/AiMessageData.qml b/.config/quickshell/ii/services/AiMessageData.qml similarity index 94% rename from .config/quickshell/services/AiMessageData.qml rename to .config/quickshell/ii/services/AiMessageData.qml index b5f208548..dc8b80fdb 100644 --- a/.config/quickshell/services/AiMessageData.qml +++ b/.config/quickshell/ii/services/AiMessageData.qml @@ -7,6 +7,7 @@ import QtQuick; QtObject { property string role property string content + property string rawContent property string model property bool thinking: true property bool done: false diff --git a/.config/quickshell/services/AppSearch.qml b/.config/quickshell/ii/services/AppSearch.qml similarity index 96% rename from .config/quickshell/services/AppSearch.qml rename to .config/quickshell/ii/services/AppSearch.qml index edac48007..e325f93f3 100644 --- a/.config/quickshell/services/AppSearch.qml +++ b/.config/quickshell/ii/services/AppSearch.qml @@ -27,7 +27,7 @@ Singleton { }) property var regexSubstitutions: [ { - "regex": /^steam_app_(\\d+)$/, + "regex": /^steam_app_(\d+)$/, "replace": "steam_icon_$1" }, { @@ -72,6 +72,7 @@ Singleton { } function iconExists(iconName) { + if (!iconName || iconName.length == 0) return false; return (Quickshell.iconPath(iconName, true).length > 0) && !iconName.includes("image-missing"); } @@ -103,7 +104,7 @@ Singleton { // Guess: normalize to kebab case guessStr = str.toLowerCase().replace(/\s+/g, "-"); if (iconExists(guessStr)) return guessStr; - // Guess: First fuzze desktop entry match + // Guess: First fuzzy desktop entry match const searchResults = root.fuzzyQuery(str); if (searchResults.length > 0) { const firstEntry = searchResults[0]; diff --git a/.config/quickshell/services/Audio.qml b/.config/quickshell/ii/services/Audio.qml similarity index 100% rename from .config/quickshell/services/Audio.qml rename to .config/quickshell/ii/services/Audio.qml diff --git a/.config/quickshell/services/Battery.qml b/.config/quickshell/ii/services/Battery.qml similarity index 100% rename from .config/quickshell/services/Battery.qml rename to .config/quickshell/ii/services/Battery.qml diff --git a/.config/quickshell/services/Bluetooth.qml b/.config/quickshell/ii/services/Bluetooth.qml similarity index 100% rename from .config/quickshell/services/Bluetooth.qml rename to .config/quickshell/ii/services/Bluetooth.qml diff --git a/.config/quickshell/services/Booru.qml b/.config/quickshell/ii/services/Booru.qml similarity index 100% rename from .config/quickshell/services/Booru.qml rename to .config/quickshell/ii/services/Booru.qml diff --git a/.config/quickshell/services/BooruResponseData.qml b/.config/quickshell/ii/services/BooruResponseData.qml similarity index 100% rename from .config/quickshell/services/BooruResponseData.qml rename to .config/quickshell/ii/services/BooruResponseData.qml diff --git a/.config/quickshell/services/Brightness.qml b/.config/quickshell/ii/services/Brightness.qml similarity index 100% rename from .config/quickshell/services/Brightness.qml rename to .config/quickshell/ii/services/Brightness.qml diff --git a/.config/quickshell/services/Cliphist.qml b/.config/quickshell/ii/services/Cliphist.qml similarity index 100% rename from .config/quickshell/services/Cliphist.qml rename to .config/quickshell/ii/services/Cliphist.qml diff --git a/.config/quickshell/services/DateTime.qml b/.config/quickshell/ii/services/DateTime.qml similarity index 100% rename from .config/quickshell/services/DateTime.qml rename to .config/quickshell/ii/services/DateTime.qml diff --git a/.config/quickshell/services/Emojis.qml b/.config/quickshell/ii/services/Emojis.qml similarity index 100% rename from .config/quickshell/services/Emojis.qml rename to .config/quickshell/ii/services/Emojis.qml diff --git a/.config/quickshell/services/FirstRunExperience.qml b/.config/quickshell/ii/services/FirstRunExperience.qml similarity index 88% rename from .config/quickshell/services/FirstRunExperience.qml rename to .config/quickshell/ii/services/FirstRunExperience.qml index 4b1f034cd..5bdae4551 100644 --- a/.config/quickshell/services/FirstRunExperience.qml +++ b/.config/quickshell/ii/services/FirstRunExperience.qml @@ -12,8 +12,8 @@ Singleton { property string firstRunFileContent: "This file is just here to confirm you've been greeted :>" property string firstRunNotifSummary: "Welcome!" property string firstRunNotifBody: "Hit Super+/ for a list of keybinds" - property string defaultWallpaperPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/assets/images/default_wallpaper.png`) - property string welcomeQmlPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/welcome.qml`) + property string defaultWallpaperPath: FileUtils.trimFileProtocol(`${Directories.assetsPath}/images/default_wallpaper.png`) + property string welcomeQmlPath: FileUtils.trimFileProtocol(Quickshell.configPath("welcome.qml")) function load() { firstRunFileView.reload() diff --git a/.config/quickshell/ii/services/HyprlandData.qml b/.config/quickshell/ii/services/HyprlandData.qml new file mode 100644 index 000000000..fb3600704 --- /dev/null +++ b/.config/quickshell/ii/services/HyprlandData.qml @@ -0,0 +1,134 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell +import Quickshell.Io +import Quickshell.Wayland +import Quickshell.Hyprland + +/** + * Provides access to some Hyprland data not available in Quickshell.Hyprland. + */ +Singleton { + id: root + property var windowList: [] + property var addresses: [] + property var windowByAddress: ({}) + property var workspaces: [] + property var workspaceIds: [] + property var workspaceById: ({}) + property var activeWorkspace: null + property var monitors: [] + property var layers: ({}) + + function updateWindowList() { + getClients.running = true; + } + + function updateLayers() { + getLayers.running = true; + } + + function updateMonitors() { + getMonitors.running = true; + } + + function updateWorkspaces() { + getWorkspaces.running = true; + getActiveWorkspace.running = true; + } + + function updateAll() { + updateWindowList(); + updateMonitors(); + updateLayers(); + updateWorkspaces(); + } + + function biggestWindowForWorkspace(workspaceId) { + const windowsInThisWorkspace = HyprlandData.windowList.filter(w => w.workspace.id == workspaceId); + return windowsInThisWorkspace.reduce((maxWin, win) => { + const maxArea = (maxWin?.size?.[0] ?? 0) * (maxWin?.size?.[1] ?? 0); + const winArea = (win?.size?.[0] ?? 0) * (win?.size?.[1] ?? 0); + return winArea > maxArea ? win : maxWin; + }, null); + } + + Component.onCompleted: { + updateAll(); + } + + Connections { + target: Hyprland + + function onRawEvent(event) { + // console.log("Hyprland raw event:", event.name); + updateAll() + } + } + + Process { + id: getClients + command: ["bash", "-c", "hyprctl clients -j | jq -c"] + stdout: SplitParser { + onRead: data => { + root.windowList = JSON.parse(data); + let tempWinByAddress = {}; + for (var i = 0; i < root.windowList.length; ++i) { + var win = root.windowList[i]; + tempWinByAddress[win.address] = win; + } + root.windowByAddress = tempWinByAddress; + root.addresses = root.windowList.map(win => win.address); + } + } + } + + Process { + id: getMonitors + command: ["bash", "-c", "hyprctl monitors -j | jq -c"] + stdout: SplitParser { + onRead: data => { + root.monitors = JSON.parse(data); + } + } + } + + Process { + id: getLayers + command: ["bash", "-c", "hyprctl layers -j | jq -c"] + stdout: SplitParser { + onRead: data => { + root.layers = JSON.parse(data); + } + } + } + + Process { + id: getWorkspaces + command: ["bash", "-c", "hyprctl workspaces -j | jq -c"] + stdout: SplitParser { + onRead: data => { + root.workspaces = JSON.parse(data); + let tempWorkspaceById = {}; + for (var i = 0; i < root.workspaces.length; ++i) { + var ws = root.workspaces[i]; + tempWorkspaceById[ws.id] = ws; + } + root.workspaceById = tempWorkspaceById; + root.workspaceIds = root.workspaces.map(ws => ws.id); + } + } + } + + Process { + id: getActiveWorkspace + command: ["bash", "-c", "hyprctl activeworkspace -j | jq -c"] + stdout: SplitParser { + onRead: data => { + root.activeWorkspace = JSON.parse(data); + } + } + } +} diff --git a/.config/quickshell/services/HyprlandKeybinds.qml b/.config/quickshell/ii/services/HyprlandKeybinds.qml similarity index 96% rename from .config/quickshell/services/HyprlandKeybinds.qml rename to .config/quickshell/ii/services/HyprlandKeybinds.qml index 189ba76d5..a313ffc47 100644 --- a/.config/quickshell/services/HyprlandKeybinds.qml +++ b/.config/quickshell/ii/services/HyprlandKeybinds.qml @@ -15,7 +15,7 @@ import Quickshell.Hyprland */ Singleton { id: root - property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/hyprland/get_keybinds.py`) + property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.scriptPath}/hyprland/get_keybinds.py`) property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/keybinds.conf`) property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/custom/keybinds.conf`) property var defaultKeybinds: {"children": []} diff --git a/.config/quickshell/services/KeyringStorage.qml b/.config/quickshell/ii/services/KeyringStorage.qml similarity index 100% rename from .config/quickshell/services/KeyringStorage.qml rename to .config/quickshell/ii/services/KeyringStorage.qml diff --git a/.config/quickshell/services/LatexRenderer.qml b/.config/quickshell/ii/services/LatexRenderer.qml similarity index 100% rename from .config/quickshell/services/LatexRenderer.qml rename to .config/quickshell/ii/services/LatexRenderer.qml diff --git a/.config/quickshell/services/MaterialThemeLoader.qml b/.config/quickshell/ii/services/MaterialThemeLoader.qml similarity index 100% rename from .config/quickshell/services/MaterialThemeLoader.qml rename to .config/quickshell/ii/services/MaterialThemeLoader.qml diff --git a/.config/quickshell/services/MprisController.qml b/.config/quickshell/ii/services/MprisController.qml similarity index 100% rename from .config/quickshell/services/MprisController.qml rename to .config/quickshell/ii/services/MprisController.qml diff --git a/.config/quickshell/services/Network.qml b/.config/quickshell/ii/services/Network.qml similarity index 100% rename from .config/quickshell/services/Network.qml rename to .config/quickshell/ii/services/Network.qml diff --git a/.config/quickshell/services/Notifications.qml b/.config/quickshell/ii/services/Notifications.qml similarity index 99% rename from .config/quickshell/services/Notifications.qml rename to .config/quickshell/ii/services/Notifications.qml index 6f04b7cd6..7438983f4 100644 --- a/.config/quickshell/services/Notifications.qml +++ b/.config/quickshell/ii/services/Notifications.qml @@ -219,8 +219,8 @@ Singleton { } else { console.log("Notification not found in server: " + id) - root.discardNotification(id); } + root.discardNotification(id); } function triggerListChange() { diff --git a/.config/quickshell/services/ResourceUsage.qml b/.config/quickshell/ii/services/ResourceUsage.qml similarity index 100% rename from .config/quickshell/services/ResourceUsage.qml rename to .config/quickshell/ii/services/ResourceUsage.qml diff --git a/.config/quickshell/services/SystemInfo.qml b/.config/quickshell/ii/services/SystemInfo.qml similarity index 100% rename from .config/quickshell/services/SystemInfo.qml rename to .config/quickshell/ii/services/SystemInfo.qml diff --git a/.config/quickshell/services/Todo.qml b/.config/quickshell/ii/services/Todo.qml similarity index 100% rename from .config/quickshell/services/Todo.qml rename to .config/quickshell/ii/services/Todo.qml diff --git a/.config/quickshell/services/Translation.qml b/.config/quickshell/ii/services/Translation.qml similarity index 100% rename from .config/quickshell/services/Translation.qml rename to .config/quickshell/ii/services/Translation.qml diff --git a/.config/quickshell/ii/services/Weather.qml b/.config/quickshell/ii/services/Weather.qml new file mode 100644 index 000000000..eb1a00af4 --- /dev/null +++ b/.config/quickshell/ii/services/Weather.qml @@ -0,0 +1,155 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import Quickshell +import Quickshell.Io +import QtQuick +import QtPositioning + +import "root:/modules/common" + +Singleton { + id: root + // 10 minute + readonly property int fetchInterval: Config.options.bar.weather.fetchInterval * 60 * 1000 + readonly property string city: Config.options.bar.weather.city + readonly property bool useUSCS: Config.options.bar.weather.useUSCS + property bool gpsActive: Config.options.bar.weather.enableGPS + + property var location: ({ + valid: false, + lat: 0, + lon: 0 + }) + + property var data: ({ + uv: 0, + humidity: 0, + sunrise: 0, + sunset: 0, + windDir: 0, + wCode: 0, + city: 0, + wind: 0, + precip: 0, + visib: 0, + press: 0, + temp: 0 + }) + + function refineData(data) { + let temp = {}; + temp.uv = data?.current?.uvIndex || 0; + temp.humidity = (data?.current?.humidity || 0) + "%"; + temp.sunrise = data?.astronomy?.sunrise || "0.0"; + temp.sunset = data?.astronomy?.sunset || "0.0"; + temp.windDir = data?.current?.winddir16Point || "N"; + temp.wCode = data?.current?.weatherCode || "113"; + temp.city = data?.location?.areaName[0]?.value || "City"; + temp.temp = ""; + if (root.useUSCS) { + temp.wind = (data?.current?.windspeedMiles || 0) + " mph"; + temp.precip = (data?.current?.precipInches || 0) + " in"; + temp.visib = (data?.current?.visibilityMiles || 0) + " m"; + temp.press = (data?.current?.pressureInches || 0) + " psi"; + temp.temp += (data?.current?.temp_F || 0); + temp.temp += " (" + (data?.current?.FeelsLikeF || 0) + ") "; + temp.temp += "\u{02109}"; + } else { + temp.wind = (data?.current?.windspeedKmph || 0) + " km/h"; + temp.precip = (data?.current?.precipMM || 0) + " mm"; + temp.visib = (data?.current?.visibility || 0) + " km"; + temp.press = (data?.current?.pressure || 0) + " hPa"; + temp.temp += (data?.current?.temp_C || 0); + temp.temp += " (" + (data?.current?.FeelsLikeC || 0) + ") "; + temp.temp += "\u{02103}"; + } + root.data = temp; + } + + function getData() { + let command = "curl -s wttr.in"; + + if (root.gpsActive && root.location.valid) { + command += `/${root.location.lat},${root.location.long}`; + } else { + command += `/${formatCityName(root.city)}`; + } + + // format as json + command += "?format=j1"; + command += " | "; + // only take the current weather, location, asytronmy data + command += "jq '{current: .current_condition[0], location: .nearest_area[0], astronomy: .weather[0].astronomy[0]}'"; + fetcher.command[2] = command; + fetcher.running = true; + } + + function formatCityName(cityName) { + return cityName.trim().split(/\s+/).join('+'); + } + + Component.onCompleted: { + if (!root.gpsActive) + return; + console.info("[WeatherService] Starting the GPS service."); + positionSource.start(); + } + + Process { + id: fetcher + command: ["bash", "-c", ""] + stdout: StdioCollector { + onStreamFinished: { + if (text.length === 0) + return; + try { + const parsedData = JSON.parse(text); + root.refineData(parsedData); + // console.info(`[ data: ${JSON.stringify(parsedData)}`); + } catch (e) { + console.error(`[WeatherService] ${e.message}`); + } + } + } + } + + PositionSource { + id: positionSource + updateInterval: root.fetchInterval + + onPositionChanged: { + // update the location if the given location is valid + // if it fails getting the location, use the last valid location + if (position.latitudeValid && position.longitudeValid) { + root.location.lat = position.coordinate.latitude; + root.location.long = position.coordinate.longitude; + root.location.valid = true; + // console.info(`📍 Location: ${position.coordinate.latitude}, ${position.coordinate.longitude}`); + root.getData(); + // if can't get initialized with valid location deactivate the GPS + } else { + root.gpsActive = root.location.valid ? true : false; + console.error("[WeatherService] Failed to get the GPS location."); + } + } + + onValidityChanged: { + if (!positionSource.valid) { + positionSource.stop(); + root.location.valid = false; + root.gpsActive = false; + Quickshell.execDetached(["bash", "-c", `notify-send WeatherService 'Can not find a GPS service. Using the fallback method instead.'`]); + console.error("[WeatherService] Could not aquire a valid backend plugin."); + } + } + } + + Timer { + running: !root.gpsActive + repeat: true + interval: root.fetchInterval + triggeredOnStart: !root.gpsActive + onTriggered: root.getData() + } +} diff --git a/.config/quickshell/services/Ydotool.qml b/.config/quickshell/ii/services/Ydotool.qml similarity index 100% rename from .config/quickshell/services/Ydotool.qml rename to .config/quickshell/ii/services/Ydotool.qml diff --git a/.config/quickshell/settings.qml b/.config/quickshell/ii/settings.qml similarity index 100% rename from .config/quickshell/settings.qml rename to .config/quickshell/ii/settings.qml diff --git a/.config/quickshell/shell.qml b/.config/quickshell/ii/shell.qml similarity index 100% rename from .config/quickshell/shell.qml rename to .config/quickshell/ii/shell.qml diff --git a/.config/quickshell/welcome.qml b/.config/quickshell/ii/welcome.qml similarity index 99% rename from .config/quickshell/welcome.qml rename to .config/quickshell/ii/welcome.qml index d9e0770d6..7c1dff4a2 100644 --- a/.config/quickshell/welcome.qml +++ b/.config/quickshell/ii/welcome.qml @@ -42,7 +42,7 @@ ApplicationWindow { Process { id: konachanWallProc property string status: "" - command: ["bash", "-c", FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/colors/random_konachan_wall.sh`)] + command: ["bash", "-c", Quickshell.configPath("scripts/colors/random_konachan_wall.sh")] stdout: SplitParser { onRead: data => { console.log(`Konachan wall proc output: ${data}`); diff --git a/.config/quickshell/modules/bar/Bar.qml b/.config/quickshell/modules/bar/Bar.qml deleted file mode 100644 index f4f564074..000000000 --- a/.config/quickshell/modules/bar/Bar.qml +++ /dev/null @@ -1,558 +0,0 @@ -import "root:/" -import "root:/services" -import "root:/modules/common/" -import "root:/modules/common/widgets" -import "root:/modules/common/functions/color_utils.js" as ColorUtils -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Qt5Compat.GraphicalEffects -import Quickshell -import Quickshell.Wayland -import Quickshell.Hyprland -import Quickshell.Services.UPower - -Scope { - id: bar - - readonly property int osdHideMouseMoveThreshold: 20 - property bool showBarBackground: Config.options.bar.showBackground - - component VerticalBarSeparator: Rectangle { - Layout.topMargin: Appearance.sizes.baseBarHeight / 3 - Layout.bottomMargin: Appearance.sizes.baseBarHeight / 3 - Layout.fillHeight: true - implicitWidth: 1 - color: Appearance.colors.colOutlineVariant - } - - Variants { // For each monitor - model: { - const screens = Quickshell.screens; - const list = Config.options.bar.screenList; - if (!list || list.length === 0) - return screens; - return screens.filter(screen => list.includes(screen.name)); - } - - PanelWindow { // Bar window - id: barRoot - required property ShellScreen modelData - screen: modelData - - property var brightnessMonitor: Brightness.getMonitorForScreen(modelData) - property real useShortenedForm: (Appearance.sizes.barHellaShortenScreenWidthThreshold >= screen.width) ? 2 : - (Appearance.sizes.barShortenScreenWidthThreshold >= screen.width) ? 1 : 0 - readonly property int centerSideModuleWidth: - (useShortenedForm == 2) ? Appearance.sizes.barCenterSideModuleWidthHellaShortened : - (useShortenedForm == 1) ? Appearance.sizes.barCenterSideModuleWidthShortened : - Appearance.sizes.barCenterSideModuleWidth - - WlrLayershell.namespace: "quickshell:bar" - implicitHeight: Appearance.sizes.barHeight + Appearance.rounding.screenRounding - exclusiveZone: Appearance.sizes.baseBarHeight + (Config.options.bar.cornerStyle === 1 ? Appearance.sizes.hyprlandGapsOut : 0) - mask: Region { - item: barContent - } - color: "transparent" - - anchors { - top: !Config.options.bar.bottom - bottom: Config.options.bar.bottom - left: true - right: true - } - - Item { // Bar content region - id: barContent - anchors { - right: parent.right - left: parent.left - top: parent.top - bottom: undefined - } - implicitHeight: Appearance.sizes.barHeight - height: Appearance.sizes.barHeight - - states: State { - name: "bottom" - when: Config.options.bar.bottom - AnchorChanges { - target: barContent - anchors { - right: parent.right - left: parent.left - top: undefined - bottom: parent.bottom - } - } - } - - // Background shadow - Loader { - active: showBarBackground && Config.options.bar.cornerStyle === 1 - anchors.fill: barBackground - sourceComponent: StyledRectangularShadow { - anchors.fill: undefined // The loader's anchors act on this, and this should not have any anchor - target: barBackground - } - } - // Background - Rectangle { - id: barBackground - anchors { - fill: parent - margins: Config.options.bar.cornerStyle === 1 ? (Appearance.sizes.hyprlandGapsOut) : 0 // idk why but +1 is needed - } - color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" - radius: Config.options.bar.cornerStyle === 1 ? Appearance.rounding.windowRounding : 0 - } - - MouseArea { // Left side | scroll to change brightness - id: barLeftSideMouseArea - anchors.left: parent.left - implicitHeight: Appearance.sizes.baseBarHeight - height: Appearance.sizes.barHeight - width: (barRoot.width - middleSection.width) / 2 - property bool hovered: false - property real lastScrollX: 0 - property real lastScrollY: 0 - property bool trackingScroll: false - acceptedButtons: Qt.LeftButton - hoverEnabled: true - propagateComposedEvents: true - onEntered: (event) => { - barLeftSideMouseArea.hovered = true - } - onExited: (event) => { - barLeftSideMouseArea.hovered = false - barLeftSideMouseArea.trackingScroll = false - } - onPressed: (event) => { - if (event.button === Qt.LeftButton) { - Hyprland.dispatch('global quickshell:sidebarLeftOpen') - } - } - // Scroll to change brightness - WheelHandler { - onWheel: (event) => { - if (event.angleDelta.y < 0) - barRoot.brightnessMonitor.setBrightness(barRoot.brightnessMonitor.brightness - 0.05); - else if (event.angleDelta.y > 0) - barRoot.brightnessMonitor.setBrightness(barRoot.brightnessMonitor.brightness + 0.05); - // Store the mouse position and start tracking - barLeftSideMouseArea.lastScrollX = event.x; - barLeftSideMouseArea.lastScrollY = event.y; - barLeftSideMouseArea.trackingScroll = true; - } - acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad - } - onPositionChanged: (mouse) => { - if (barLeftSideMouseArea.trackingScroll) { - const dx = mouse.x - barLeftSideMouseArea.lastScrollX; - const dy = mouse.y - barLeftSideMouseArea.lastScrollY; - if (Math.sqrt(dx*dx + dy*dy) > osdHideMouseMoveThreshold) { - Hyprland.dispatch('global quickshell:osdBrightnessHide') - barLeftSideMouseArea.trackingScroll = false; - } - } - } - Item { // Left section - anchors.fill: parent - implicitHeight: leftSectionRowLayout.implicitHeight - implicitWidth: leftSectionRowLayout.implicitWidth - - ScrollHint { - reveal: barLeftSideMouseArea.hovered - icon: "light_mode" - tooltipText: Translation.tr("Scroll to change brightness") - side: "left" - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - - } - - RowLayout { // Content - id: leftSectionRowLayout - anchors.fill: parent - spacing: 10 - - RippleButton { // Left sidebar button - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.leftMargin: Appearance.rounding.screenRounding - Layout.fillWidth: false - property real buttonPadding: 5 - implicitWidth: distroIcon.width + buttonPadding * 2 - implicitHeight: distroIcon.height + buttonPadding * 2 - - buttonRadius: Appearance.rounding.full - colBackground: barLeftSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : ColorUtils.transparentize(Appearance.colors.colLayer1Hover, 1) - colBackgroundHover: Appearance.colors.colLayer1Hover - colRipple: Appearance.colors.colLayer1Active - colBackgroundToggled: Appearance.colors.colSecondaryContainer - colBackgroundToggledHover: Appearance.colors.colSecondaryContainerHover - colRippleToggled: Appearance.colors.colSecondaryContainerActive - toggled: GlobalStates.sidebarLeftOpen - property color colText: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer0 - - onPressed: { - Hyprland.dispatch('global quickshell:sidebarLeftToggle') - } - - CustomIcon { - id: distroIcon - anchors.centerIn: parent - width: 19.5 - height: 19.5 - source: Config.options.bar.topLeftIcon == 'distro' ? - SystemInfo.distroIcon : "spark-symbolic" - } - - ColorOverlay { - anchors.fill: distroIcon - source: distroIcon - color: Appearance.colors.colOnLayer0 - } - } - - ActiveWindow { - visible: barRoot.useShortenedForm === 0 - Layout.rightMargin: Appearance.rounding.screenRounding - Layout.fillWidth: true - Layout.fillHeight: true - bar: barRoot - } - } - } - } - - RowLayout { // Middle section - id: middleSection - anchors.centerIn: parent - spacing: Config.options?.bar.borderless ? 4 : 8 - - BarGroup { - id: leftCenterGroup - Layout.preferredWidth: barRoot.centerSideModuleWidth - Layout.fillHeight: true - - Resources { - alwaysShowAllResources: barRoot.useShortenedForm === 2 - Layout.fillWidth: barRoot.useShortenedForm === 2 - } - - Media { - visible: barRoot.useShortenedForm < 2 - Layout.fillWidth: true - } - - } - - VerticalBarSeparator {visible: Config.options?.bar.borderless} - - BarGroup { - id: middleCenterGroup - padding: workspacesWidget.widgetPadding - Layout.fillHeight: true - - Workspaces { - id: workspacesWidget - bar: barRoot - Layout.fillHeight: true - MouseArea { // Right-click to toggle overview - anchors.fill: parent - acceptedButtons: Qt.RightButton - - onPressed: (event) => { - if (event.button === Qt.RightButton) { - Hyprland.dispatch('global quickshell:overviewToggle') - } - } - } - } - } - - VerticalBarSeparator {visible: Config.options?.bar.borderless} - - MouseArea { - id: rightCenterGroup - implicitWidth: rightCenterGroupContent.implicitWidth - implicitHeight: rightCenterGroupContent.implicitHeight - Layout.preferredWidth: barRoot.centerSideModuleWidth - Layout.fillHeight: true - - onPressed: { - Hyprland.dispatch('global quickshell:sidebarRightToggle') - } - - BarGroup { - id: rightCenterGroupContent - anchors.fill: parent - - ClockWidget { - showDate: (Config.options.bar.verbose && barRoot.useShortenedForm < 2) - Layout.alignment: Qt.AlignVCenter - Layout.fillWidth: true - } - - UtilButtons { - visible: (Config.options.bar.verbose && barRoot.useShortenedForm === 0) - Layout.alignment: Qt.AlignVCenter - } - - BatteryIndicator { - visible: (barRoot.useShortenedForm < 2 && UPower.displayDevice.isLaptopBattery) - Layout.alignment: Qt.AlignVCenter - } - } - } - - } - - MouseArea { // Right side | scroll to change volume - id: barRightSideMouseArea - - anchors.right: parent.right - implicitHeight: Appearance.sizes.baseBarHeight - height: Appearance.sizes.barHeight - width: (barRoot.width - middleSection.width) / 2 - - property bool hovered: false - property real lastScrollX: 0 - property real lastScrollY: 0 - property bool trackingScroll: false - - acceptedButtons: Qt.LeftButton - hoverEnabled: true - propagateComposedEvents: true - onEntered: (event) => { - barRightSideMouseArea.hovered = true - } - onExited: (event) => { - barRightSideMouseArea.hovered = false - barRightSideMouseArea.trackingScroll = false - } - onPressed: (event) => { - if (event.button === Qt.LeftButton) { - Hyprland.dispatch('global quickshell:sidebarRightOpen') - } - else if (event.button === Qt.RightButton) { - MprisController.activePlayer.next() - } - } - // Scroll to change volume - WheelHandler { - onWheel: (event) => { - const currentVolume = Audio.value; - const step = currentVolume < 0.1 ? 0.01 : 0.02 || 0.2; - if (event.angleDelta.y < 0) - Audio.sink.audio.volume -= step; - else if (event.angleDelta.y > 0) - Audio.sink.audio.volume = Math.min(1, Audio.sink.audio.volume + step); - // Store the mouse position and start tracking - barRightSideMouseArea.lastScrollX = event.x; - barRightSideMouseArea.lastScrollY = event.y; - barRightSideMouseArea.trackingScroll = true; - } - acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad - } - onPositionChanged: (mouse) => { - if (barRightSideMouseArea.trackingScroll) { - const dx = mouse.x - barRightSideMouseArea.lastScrollX; - const dy = mouse.y - barRightSideMouseArea.lastScrollY; - if (Math.sqrt(dx*dx + dy*dy) > osdHideMouseMoveThreshold) { - Hyprland.dispatch('global quickshell:osdVolumeHide') - barRightSideMouseArea.trackingScroll = false; - } - } - } - - Item { - anchors.fill: parent - implicitHeight: rightSectionRowLayout.implicitHeight - implicitWidth: rightSectionRowLayout.implicitWidth - - ScrollHint { - reveal: barRightSideMouseArea.hovered - icon: "volume_up" - tooltipText: Translation.tr("Scroll to change volume") - side: "right" - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - } - - RowLayout { - id: rightSectionRowLayout - anchors.fill: parent - spacing: 5 - layoutDirection: Qt.RightToLeft - - RippleButton { // Right sidebar button - id: rightSidebarButton - - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.rightMargin: Appearance.rounding.screenRounding - Layout.fillWidth: false - - implicitWidth: indicatorsRowLayout.implicitWidth + 10 * 2 - implicitHeight: indicatorsRowLayout.implicitHeight + 5 * 2 - - buttonRadius: Appearance.rounding.full - colBackground: barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : ColorUtils.transparentize(Appearance.colors.colLayer1Hover, 1) - colBackgroundHover: Appearance.colors.colLayer1Hover - colRipple: Appearance.colors.colLayer1Active - colBackgroundToggled: Appearance.colors.colSecondaryContainer - colBackgroundToggledHover: Appearance.colors.colSecondaryContainerHover - colRippleToggled: Appearance.colors.colSecondaryContainerActive - toggled: GlobalStates.sidebarRightOpen - property color colText: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer0 - - Behavior on colText { - animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this) - } - - onPressed: { - Hyprland.dispatch('global quickshell:sidebarRightToggle') - } - - RowLayout { - id: indicatorsRowLayout - anchors.centerIn: parent - property real realSpacing: 15 - spacing: 0 - - Revealer { - reveal: Audio.sink?.audio?.muted ?? false - Layout.fillHeight: true - Layout.rightMargin: reveal ? indicatorsRowLayout.realSpacing : 0 - Behavior on Layout.rightMargin { - NumberAnimation { - duration: Appearance.animation.elementMoveFast.duration - easing.type: Appearance.animation.elementMoveFast.type - easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve - } - } - MaterialSymbol { - text: "volume_off" - iconSize: Appearance.font.pixelSize.larger - color: rightSidebarButton.colText - } - } - Revealer { - reveal: Audio.source?.audio?.muted ?? false - Layout.fillHeight: true - Layout.rightMargin: reveal ? indicatorsRowLayout.realSpacing : 0 - Behavior on Layout.rightMargin { - NumberAnimation { - duration: Appearance.animation.elementMoveFast.duration - easing.type: Appearance.animation.elementMoveFast.type - easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve - } - } - MaterialSymbol { - text: "mic_off" - iconSize: Appearance.font.pixelSize.larger - color: rightSidebarButton.colText - } - } - MaterialSymbol { - Layout.rightMargin: indicatorsRowLayout.realSpacing - text: Network.materialSymbol - iconSize: Appearance.font.pixelSize.larger - color: rightSidebarButton.colText - } - MaterialSymbol { - text: Bluetooth.bluetoothConnected ? "bluetooth_connected" : Bluetooth.bluetoothEnabled ? "bluetooth" : "bluetooth_disabled" - iconSize: Appearance.font.pixelSize.larger - color: rightSidebarButton.colText - } - } - } - - SysTray { - bar: barRoot - visible: barRoot.useShortenedForm === 0 - Layout.fillWidth: false - Layout.fillHeight: true - } - - Item { - Layout.fillWidth: true - Layout.fillHeight: true - } - } - } - } - } - - // Round decorators - Loader { - id: roundDecorators - anchors { - left: parent.left - right: parent.right - } - y: Appearance.sizes.barHeight - width: parent.width - height: Appearance.rounding.screenRounding - active: showBarBackground && Config.options.bar.cornerStyle === 0 // Hug - - states: State { - name: "bottom" - when: Config.options.bar.bottom - PropertyChanges { - roundDecorators.y: 0 - } - } - - sourceComponent: Item { - implicitHeight: Appearance.rounding.screenRounding - RoundCorner { - id: leftCorner - anchors { - top: parent.top - bottom: parent.bottom - left: parent.left - } - - size: Appearance.rounding.screenRounding - color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" - opacity: 1.0 - Appearance.transparency - - corner: RoundCorner.CornerEnum.TopLeft - states: State { - name: "bottom" - when: Config.options.bar.bottom - PropertyChanges { - leftCorner.corner: RoundCorner.CornerEnum.BottomLeft - } - } - } - RoundCorner { - id: rightCorner - anchors { - right: parent.right - top: !Config.options.bar.bottom ? parent.top : undefined - bottom: Config.options.bar.bottom ? parent.bottom : undefined - } - size: Appearance.rounding.screenRounding - color: showBarBackground ? Appearance.colors.colLayer0 : "transparent" - opacity: 1.0 - Appearance.transparency - - corner: RoundCorner.CornerEnum.TopRight - states: State { - name: "bottom" - when: Config.options.bar.bottom - PropertyChanges { - rightCorner.corner: RoundCorner.CornerEnum.BottomRight - } - } - } - } - } - - } - - } - -} diff --git a/.config/quickshell/scripts/colors/random_konachan_wall.sh b/.config/quickshell/scripts/colors/random_konachan_wall.sh deleted file mode 100755 index 52853d090..000000000 --- a/.config/quickshell/scripts/colors/random_konachan_wall.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -mkdir -p ~/Pictures/Wallpapers -page=$((1 + RANDOM % 1000)); -response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page") -link=$(echo "$response" | jq '.[0].file_url' -r); -ext=$(echo "$link" | awk -F. '{print $NF}') -downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext" -curl "$link" -o "$downloadPath" -~/.config/quickshell/scripts/colors/switchwall.sh --image "$downloadPath" diff --git a/.config/quickshell/services/HyprlandData.qml b/.config/quickshell/services/HyprlandData.qml deleted file mode 100644 index edd4e8eaa..000000000 --- a/.config/quickshell/services/HyprlandData.qml +++ /dev/null @@ -1,86 +0,0 @@ -pragma Singleton -pragma ComponentBehavior: Bound - -import QtQuick -import Quickshell -import Quickshell.Io -import Quickshell.Wayland -import Quickshell.Hyprland - -/** - * Provides access to some Hyprland data not available in Quickshell.Hyprland. - */ -Singleton { - id: root - property var windowList: [] - property var addresses: [] - property var windowByAddress: ({}) - property var monitors: [] - property var layers: ({}) - - function updateWindowList() { - getClients.running = true - getMonitors.running = true - } - - function updateLayers() { - getLayers.running = true - } - - Component.onCompleted: { - updateWindowList() - updateLayers() - } - - Connections { - target: Hyprland - - function onRawEvent(event) { - // Filter out redundant old v1 events for the same thing - if(event.name in [ - "activewindow", "focusedmon", "monitoradded", - "createworkspace", "destroyworkspace", "moveworkspace", - "activespecial", "movewindow", "windowtitle" - ]) return ; - updateWindowList() - } - } - - Process { - id: getClients - command: ["bash", "-c", "hyprctl clients -j | jq -c"] - stdout: SplitParser { - onRead: (data) => { - root.windowList = JSON.parse(data) - let tempWinByAddress = {} - for (var i = 0; i < root.windowList.length; ++i) { - var win = root.windowList[i] - tempWinByAddress[win.address] = win - } - root.windowByAddress = tempWinByAddress - root.addresses = root.windowList.map((win) => win.address) - } - } - } - - Process { - id: getMonitors - command: ["bash", "-c", "hyprctl monitors -j | jq -c"] - stdout: SplitParser { - onRead: (data) => { - root.monitors = JSON.parse(data) - } - } - } - - Process { - id: getLayers - command: ["bash", "-c", "hyprctl layers -j | jq -c"] - stdout: SplitParser { - onRead: (data) => { - root.layers = JSON.parse(data) - } - } - } -} - diff --git a/.github/assets/illogical-impulse.svg b/.github/assets/illogical-impulse.svg new file mode 100644 index 000000000..4d1362b00 --- /dev/null +++ b/.github/assets/illogical-impulse.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.local/share/icons/illogical-impulse.svg b/.local/share/icons/illogical-impulse.svg new file mode 100644 index 000000000..8b1b789c9 --- /dev/null +++ b/.local/share/icons/illogical-impulse.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.local/share/icons/quickshell.svg b/.local/share/icons/quickshell.svg new file mode 120000 index 000000000..8dc05d01c --- /dev/null +++ b/.local/share/icons/quickshell.svg @@ -0,0 +1 @@ +illogical-impulse.svg \ No newline at end of file diff --git a/README.md b/README.md index e381b1251..28fdb28e7 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,10 @@
-![](https://img.shields.io/github/last-commit/end-4/dots-hyprland?&style=for-the-badge&color=FFB1C8&logoColor=D9E0EE&labelColor=292324) -![](https://img.shields.io/github/stars/end-4/dots-hyprland?style=for-the-badge&logo=andela&color=FFB686&logoColor=D9E0EE&labelColor=292324) -[![](https://img.shields.io/github/repo-size/end-4/dots-hyprland?color=CAC992&label=SIZE&logo=googledrive&style=for-the-badge&logoColor=D9E0EE&labelColor=292324)](https://github.com/end-4/hyprland) -![](https://img.shields.io/badge/issues-skill-green?style=for-the-badge&color=CCE8E9&logoColor=D9E0EE&labelColor=292324) - +![](https://img.shields.io/github/last-commit/end-4/dots-hyprland?&style=for-the-badge&color=8ad7eb&logo=git&logoColor=D9E0EE&labelColor=1E202B) +![](https://img.shields.io/github/stars/end-4/dots-hyprland?style=for-the-badge&logo=andela&color=86dbd7&logoColor=D9E0EE&labelColor=1E202B) +![](https://img.shields.io/github/repo-size/end-4/dots-hyprland?color=86dbce&label=SIZE&logo=protondrive&style=for-the-badge&logoColor=D9E0EE&labelColor=26230e) + Dynamic JSON Badge
@@ -18,7 +17,6 @@

-
Notable features @@ -65,30 +63,38 @@
- Logo ideas welcome - - - See [#1436](https://github.com/end-4/dots-hyprland/issues/1436) - + Discord + Server link | I hope this provides a friendlier environment for support without needing me to personally accept every friend request/DM. For real issues, prefer GitHub +
+

• screenshots •

-## illogical-impulseQuickshell +
+ illogical-impulse logo +
-| AI | Common widgets | +_latest and only style that I actively use. Other past styles are still there for your viewing pleasure and not actual use, but code is still available, see below._ + +### illogical-impulseQuickshell + +Widget system: Quickshell | Support: Yes + +[Showcase video](https://www.youtube.com/watch?v=RPwovTInagE) + +| AI, settings app | Some widgets | |:---|:---------------| -| ![image](https://github.com/user-attachments/assets/08d26785-b54d-4ad1-875b-bb08cc6757f5) | ![image](https://github.com/user-attachments/assets/4fcd63d9-0943-4b21-8737-4bed97b71961) | +| ![image](https://github.com/user-attachments/assets/4d45e860-ae60-418a-a564-309b4939f5c4) | ![image](https://github.com/user-attachments/assets/4fcd63d9-0943-4b21-8737-4bed97b71961) | | Window management | Weeb power | | ![image](https://github.com/user-attachments/assets/86cc511b-0d33-4c78-bcc0-3037d02a17da) | ![image](https://github.com/user-attachments/assets/292259fc-57d3-4663-a583-2ce2faad13fb) | -By the way... -- The funny notification positions are mimicking Android 16's dragging behavior -- The clock on the wallpaper is automatically placed at the "least busy" region of the image +### illogical-impulseAGS (Deprecated) -## illogical-impulseAGS (Deprecated) +Widget system: AGS | Support: Limited, no new features | AI | Common widgets | |:---|:---------------| @@ -96,28 +102,39 @@ By the way... | Window management | Weeb power | | ![image](https://github.com/user-attachments/assets/02983b9b-79ba-4c25-8717-90bef2357ae5) | ![image](https://github.com/user-attachments/assets/bbb332ec-962a-4e88-a95b-486d0bd8ce76) | -## Unsupported stuff +### Very old stuff -- The pics are here mainly for your viewing pleasure -- The files are still available, feel free to grab them from the [`archive`](https://github.com/end-4/dots-hyprland/tree/archive) branch if you're willing to see some spaghetti and troubleshoot +- Source code not likely to work but still available in the [`archive`](https://github.com/end-4/dots-hyprland/tree/archive) branch. Extremely spaghetti. - Click image for a presentation video -### [m3ww](https://github.com/end-4/dots-hyprland/tree/archive) +#### m3ww + + Widget system: EWW | Support: No, dead + Material Eww! -### [NovelKnock](https://github.com/end-4/dots-hyprland/tree/archive) +#### NovelKnock + + Widget system: EWW | Support: No, dead + Desktop Preview -### [Hybrid](https://github.com/end-4/dots-hyprland/tree/archive) +#### Hybrid + + Widget system: EWW | Support: No, dead + click the circles! -### [Windoes](https://github.com/end-4/dots-hyprland/tree/archive) +#### Windoes + + Widget system: EWW | Support: No, dead + Desktop Preview diff --git a/arch-packages/illogical-impulse-fonts-themes/PKGBUILD b/arch-packages/illogical-impulse-fonts-themes/PKGBUILD index 12a7209be..8c5f567c9 100644 --- a/arch-packages/illogical-impulse-fonts-themes/PKGBUILD +++ b/arch-packages/illogical-impulse-fonts-themes/PKGBUILD @@ -6,7 +6,9 @@ arch=(any) license=(None) depends=( adw-gtk-theme-git + breeze breeze-plus + darkly-bin eza fish fontconfig diff --git a/install.sh b/install.sh index a123a7a97..2134e767b 100755 --- a/install.sh +++ b/install.sh @@ -233,6 +233,7 @@ esac # some foldes (eg. .local/bin) should be processed separately to avoid `--delete' for rsync, # since the files here come from different places, not only about one program. # v rsync -av ".local/bin/" "$XDG_BIN_HOME" # No longer needed since scripts are no longer in ~/.local/bin +v rsync -av ".local/share/icons/" "${XDG_DATA_HOME:-$HOME/.local/share}"/icons/ # Prevent hyprland from not fully loaded sleep 1