From 5a151b2ea4584a2b3f8d04a00dedabbf05cd4310 Mon Sep 17 00:00:00 2001 From: fi3w0 Date: Sat, 3 Oct 2026 04:51:31 +0200 Subject: [PATCH] Add Gentoo restoration presets, optional configs and selection TUI --- .gitignore | 7 + LICENSE | 21 + README.md | 149 + cmd/dots/main.go | 406 + cmd/dots/main_test.go | 41 + .../.config/autostart/musicpresence.desktop | 6 + .../files/.config/autostart/opendeck.desktop | 8 + .../files/.config/autostart/spotify.desktop | 6 + .../files/.config/autostart/steam.desktop | 6 + .../files/.config/autostart/vesktop.desktop | 6 + configs/autostart/kconfig/.config/kwinrulesrc | 27 + configs/catalog.json | 59 + .../share/kxmlgui5/dolphin/dolphinui.rc | 138 + configs/dolphin/kconfig/.config/dolphinrc | 6 + configs/dolphin/kconfig/.config/kwinrulesrc | 13 + .../kconfig/.local/state/dolphinstaterc | 6 + .../files/.config/fastfetch/config.jsonc | 139 + .../fish/files/.config/fish/conf.d/done.fish | 340 + .../fish/files/.config/fish/conf.d/fiw.fish | 59 + .../JetBrainsMonoNerdFontMono-Bold.ttf | Bin 0 -> 2577016 bytes .../JetBrainsMonoNerdFontMono-BoldItalic.ttf | Bin 0 -> 2578280 bytes .../JetBrainsMonoNerdFontMono-Italic.ttf | Bin 0 -> 2575368 bytes .../JetBrainsMonoNerdFontMono-Regular.ttf | Bin 0 -> 2573248 bytes .../fonts/Fiw-Gentoo-Dots/LICENSE-OFL.txt | 93 + .../kde-shortcuts/files/.local/bin/fiw-shot | 49 + .../net.local.fiw-shot-region.desktop | 8 + .../net.local.fiw-shot-screen.desktop | 8 + .../applications/net.local.kitty.desktop | 7 + .../kconfig/.config/kglobalshortcutsrc | 301 + configs/kde-shortcuts/kconfig/.config/kxkbrc | 5 + .../themes/Utterly-Round-Dark/LICENSE.md | 361 + .../Utterly-Round-Dark/Utterly-Round-Darkrc | 34 + .../themes/Utterly-Round-Dark/alldesktops.svg | 535 + .../themes/Utterly-Round-Dark/close.svg | 548 + .../themes/Utterly-Round-Dark/decoration.svgz | 713 + .../themes/Utterly-Round-Dark/keepabove.svg | 531 + .../themes/Utterly-Round-Dark/keepbelow.svg | 532 + .../themes/Utterly-Round-Dark/maximize.svg | 529 + .../Utterly-Round-Dark/metadata.desktop | 10 + .../themes/Utterly-Round-Dark/metadata.json | 23 + .../themes/Utterly-Round-Dark/minimize.svg | 525 + .../themes/Utterly-Round-Dark/restore.svg | 531 + .../themes/Utterly-Round-Dark/shade.svg | 558 + .../share/color-schemes/GentooPurple.colors | 156 + .../.local/share/icons/Fiw-Qogir/COPYING | 674 + .../cursors/00000000000000020006000e7e9ffc3f | 1 + .../cursors/00008160000006810000408080010102 | 1 + .../cursors/03b6e0fcb3499374a867c041f52298f0 | 1 + .../cursors/08e8e1c95fe2fc01f976f1e063a24ccd | 1 + .../cursors/1081e37283d90000800003c07f3ef6bf | 1 + .../cursors/3085a0e285430894940527032f8b26df | 1 + .../cursors/3ecb610c1bf2410f44200f48c40d3599 | 1 + .../cursors/4498f0e0c1937ffe01fd06f973665830 | 1 + .../cursors/5c6cd98b3f3ebcb1f9c7f1c204630408 | 1 + .../cursors/6407b0e94181790501fd1e167b474872 | 1 + .../cursors/640fb0e74195791501fd1ed57b41487f | 1 + .../cursors/9081237383d90e509aa00f00170e968f | 1 + .../cursors/9d800788f1b08800ae810202380a0822 | 1 + .../cursors/a2a266d0498c3104214a47bd64ab0fc8 | 1 + .../share/icons/Fiw-Qogir/cursors/alias | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/all-scroll | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/arrow | 1 + .../cursors/b66166c04f8c3109214a4fbd64a50fc8 | 1 + .../icons/Fiw-Qogir/cursors/bd_double_arrow | 1 + .../Fiw-Qogir/cursors/bottom_left_corner | Bin 0 -> 89904 bytes .../Fiw-Qogir/cursors/bottom_right_corner | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/bottom_side | Bin 0 -> 89904 bytes .../.local/share/icons/Fiw-Qogir/cursors/cell | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/center_ptr | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/circle | 1 + .../share/icons/Fiw-Qogir/cursors/closedhand | 1 + .../share/icons/Fiw-Qogir/cursors/col-resize | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/color-picker | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/context-menu | Bin 0 -> 89904 bytes .../.local/share/icons/Fiw-Qogir/cursors/copy | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/cross | 1 + .../icons/Fiw-Qogir/cursors/cross_reverse | 1 + .../icons/Fiw-Qogir/cursors/crossed_circle | 1 + .../share/icons/Fiw-Qogir/cursors/crosshair | Bin 0 -> 89904 bytes .../cursors/d9ce0ab605698f320427677b458ad60b | 1 + .../share/icons/Fiw-Qogir/cursors/default | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/diamond_cross | 1 + .../share/icons/Fiw-Qogir/cursors/dnd-copy | 1 + .../share/icons/Fiw-Qogir/cursors/dnd-move | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/dnd-no-drop | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/dnd-none | 1 + .../share/icons/Fiw-Qogir/cursors/down-arrow | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/draft | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/e-resize | 1 + .../cursors/e29285e634086352946a0e7090d73106 | 1 + .../share/icons/Fiw-Qogir/cursors/ew-resize | 1 + .../cursors/fcf21c00b30f7e3f83fe0dfd12e71cff | 1 + .../icons/Fiw-Qogir/cursors/fd_double_arrow | 1 + .../share/icons/Fiw-Qogir/cursors/fleur | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/forbidden | 1 + .../.local/share/icons/Fiw-Qogir/cursors/grab | 1 + .../share/icons/Fiw-Qogir/cursors/grabbing | 1 + .../icons/Fiw-Qogir/cursors/h_double_arrow | 1 + .../share/icons/Fiw-Qogir/cursors/half-busy | 1 + .../share/icons/Fiw-Qogir/cursors/hand1 | 1 + .../share/icons/Fiw-Qogir/cursors/hand2 | 1 + .../.local/share/icons/Fiw-Qogir/cursors/help | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/ibeam | 1 + .../share/icons/Fiw-Qogir/cursors/left-arrow | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/left_ptr | 1 + .../icons/Fiw-Qogir/cursors/left_ptr_help | 1 + .../icons/Fiw-Qogir/cursors/left_ptr_watch | 1 + .../share/icons/Fiw-Qogir/cursors/left_side | Bin 0 -> 89904 bytes .../.local/share/icons/Fiw-Qogir/cursors/link | 1 + .../share/icons/Fiw-Qogir/cursors/ll_angle | 1 + .../share/icons/Fiw-Qogir/cursors/lr_angle | 1 + .../.local/share/icons/Fiw-Qogir/cursors/move | 1 + .../share/icons/Fiw-Qogir/cursors/n-resize | 1 + .../share/icons/Fiw-Qogir/cursors/ne-resize | 1 + .../share/icons/Fiw-Qogir/cursors/nesw-resize | 1 + .../share/icons/Fiw-Qogir/cursors/no-drop | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/not-allowed | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/ns-resize | 1 + .../share/icons/Fiw-Qogir/cursors/nw-resize | 1 + .../share/icons/Fiw-Qogir/cursors/nwse-resize | 1 + .../share/icons/Fiw-Qogir/cursors/openhand | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/pencil | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/pirate | Bin 0 -> 89904 bytes .../.local/share/icons/Fiw-Qogir/cursors/plus | 1 + .../share/icons/Fiw-Qogir/cursors/pointer | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/pointing_hand | 1 + .../share/icons/Fiw-Qogir/cursors/progress | Bin 0 -> 1078672 bytes .../icons/Fiw-Qogir/cursors/question_arrow | 1 + .../share/icons/Fiw-Qogir/cursors/right-arrow | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/right_ptr | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/right_side | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/row-resize | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/s-resize | 1 + .../icons/Fiw-Qogir/cursors/sb_h_double_arrow | 1 + .../icons/Fiw-Qogir/cursors/sb_v_double_arrow | 1 + .../share/icons/Fiw-Qogir/cursors/se-resize | 1 + .../share/icons/Fiw-Qogir/cursors/size-bdiag | 1 + .../share/icons/Fiw-Qogir/cursors/size-fdiag | 1 + .../share/icons/Fiw-Qogir/cursors/size-hor | 1 + .../share/icons/Fiw-Qogir/cursors/size-ver | 1 + .../share/icons/Fiw-Qogir/cursors/size_all | 1 + .../share/icons/Fiw-Qogir/cursors/size_bdiag | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/size_fdiag | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/size_hor | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/size_ver | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/split_h | 1 + .../share/icons/Fiw-Qogir/cursors/split_v | 1 + .../share/icons/Fiw-Qogir/cursors/sw-resize | 1 + .../share/icons/Fiw-Qogir/cursors/tcross | 1 + .../.local/share/icons/Fiw-Qogir/cursors/text | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/top_left_arrow | 1 + .../icons/Fiw-Qogir/cursors/top_left_corner | Bin 0 -> 89904 bytes .../icons/Fiw-Qogir/cursors/top_right_corner | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/top_side | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/ul_angle | 1 + .../share/icons/Fiw-Qogir/cursors/up-arrow | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/ur_angle | 1 + .../icons/Fiw-Qogir/cursors/v_double_arrow | 1 + .../icons/Fiw-Qogir/cursors/vertical-text | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/w-resize | 1 + .../.local/share/icons/Fiw-Qogir/cursors/wait | Bin 0 -> 1078672 bytes .../share/icons/Fiw-Qogir/cursors/watch | 1 + .../icons/Fiw-Qogir/cursors/wayland-cursor | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/whats_this | 1 + .../share/icons/Fiw-Qogir/cursors/x-cursor | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/xterm | 1 + .../share/icons/Fiw-Qogir/cursors/zoom-in | Bin 0 -> 89904 bytes .../share/icons/Fiw-Qogir/cursors/zoom-out | Bin 0 -> 89904 bytes .../.local/share/icons/Fiw-Qogir/index.theme | 4 + configs/kde-style/kconfig/.config/kcminputrc | 2 + configs/kde-style/kconfig/.config/kdeglobals | 165 + configs/kde-style/kconfig/.config/kwinrc | 6 + .../files/.config/kitty/kitty-bright.conf | 12 + .../files/.config/kitty/kitty-common.conf | 39 + .../kitty/files/.config/kitty/kitty-main.conf | 12 + configs/kitty/files/.config/kitty/kitty.conf | 7 + .../files/.config/MangoHud/MangoHud.conf | 33 + .../files/.config/MangoHud/presets.conf | 71 + configs/neovim/files/.config/nvim/init.lua | 26 + configs/spectacle/kconfig/.config/spectaclerc | 5 + .../.config/vesktop/themes/LICENSE-midnight | 21 + .../themes/midnight-background.theme.css | 2544 + .../json/.config/vesktop/settings.json | 10 + .../.config/vesktop/settings/settings.json | 571 + .../files/.config/Code/User/settings.json | 12 + docs/DECISIONS.md | 42 + docs/assets.md | 23 + docs/boot.md | 20 + docs/firefox.md | 9 + docs/setup.md | 69 + docs/spotify.md | 20 + flatpaks/fiw-apps.list | 1 + flatpaks/gaming.list | 1 + go.mod | 26 + go.sum | 43 + install | 14 + lib/rice.py | 525 + optional/fiw-cachy-patch | 46 + optional/fiw-limine-splice | 54 + optional/kernel/config.d/20-cachyos.config | 17 + optional/kernel/config.d/99-name.config | 5 + optional/kernel/guard | 16 + .../kernel/patches/0100-cachyos-7.2.7-1.patch | 42581 ++++++++++++++++ optional/kernel/snapshot.json | 10 + optional/spotify/spicetify-snapshotfix | 38 + optional/spotify/spotify-patch | 51 + overlay/app-misc/opendeck-bin/Manifest | 1 + .../opendeck-bin/opendeck-bin-2.14.0.ebuild | 40 + overlay/games-util/ge-proton-bin/Manifest | 1 + .../ge-proton-bin/ge-proton-bin-11.7.ebuild | 25 + .../proton-cachyos-slr-bin/Manifest | 1 + ...roton-cachyos-slr-bin-11.0.20260703.ebuild | 25 + overlay/gui-wm/tidewm/metadata.xml | 14 + overlay/gui-wm/tidewm/tidewm-9999.ebuild | 77 + overlay/licenses/music-presence | 185 + .../media-sound/music-presence-bin/Manifest | 1 + .../music-presence-bin-2.3.6.ebuild | 37 + overlay/metadata/layout.conf | 2 + overlay/profiles/repo_name | 1 + packages/cli.list | 19 + packages/dev.list | 16 + packages/fiw-apps.list | 19 + packages/fiw-tools.list | 3 + packages/gaming.list | 9 + packages/kde.list | 28 + packages/optional/btrfs.list | 1 + packages/optional/filelight.list | 1 + packages/optional/grub.list | 1 + packages/optional/limine.list | 1 + packages/optional/nvidia.list | 1 + packages/source.list | 4 + packages/system.list | 15 + packages/tidewm.list | 5 + portage/common/env/fiw-dots-heavy.conf | 2 + portage/common/env/fiw-dots-notmpfs.conf | 1 + portage/common/package.env/fiw-dots-heavy | 8 + portage/common/package.env/fiw-dots-notmpfs | 2 + portage/common/package.mask/guru | 1 + portage/common/package.unmask/guru | 7 + portage/dev/package.env/heavy | 8 + portage/dev/package.env/notmpfs | 2 + portage/fiw-apps/package.accept_keywords/apps | 19 + portage/fiw-apps/package.license/apps | 2 + portage/fiw-apps/package.use/binhost | 1 + portage/fiw-apps/package.use/media | 3 + portage/fiw-ryzen/env/fiw-dots-heavy.conf | 1 + portage/fiw-ryzen/fiw-dots.conf | 22 + portage/fiw-ryzen/package.use/cpu-flags | 1 + .../fiw-tools/package.license/music-presence | 1 + portage/gaming/package.license/steam | 1 + portage/gaming/package.mask/steam-overlay | 1 + portage/gaming/package.unmask/steam | 2 + portage/gaming/package.use/steam | 3 + portage/gaming/package.use/steam-abi32 | 79 + portage/kde/package.accept_keywords/kde | 2 + portage/nvidia/package.use/nvidia | 1 + portage/stock/fiw-dots.conf | 11 + portage/system/package.license/firmware | 1 + portage/system/package.use/network | 2 + presets/fiw-ryzen.json | 35 + presets/stock.json | 30 + tests/test_configs.py | 93 + tools/capture.py | 170 + tools/check-private.py | 70 + tools/public-attribution.json | 5 + 265 files changed, 56521 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cmd/dots/main.go create mode 100644 cmd/dots/main_test.go create mode 100644 configs/autostart/files/.config/autostart/musicpresence.desktop create mode 100644 configs/autostart/files/.config/autostart/opendeck.desktop create mode 100644 configs/autostart/files/.config/autostart/spotify.desktop create mode 100644 configs/autostart/files/.config/autostart/steam.desktop create mode 100644 configs/autostart/files/.config/autostart/vesktop.desktop create mode 100644 configs/autostart/kconfig/.config/kwinrulesrc create mode 100644 configs/catalog.json create mode 100644 configs/dolphin/files/.local/share/kxmlgui5/dolphin/dolphinui.rc create mode 100644 configs/dolphin/kconfig/.config/dolphinrc create mode 100644 configs/dolphin/kconfig/.config/kwinrulesrc create mode 100644 configs/dolphin/kconfig/.local/state/dolphinstaterc create mode 100644 configs/fastfetch/files/.config/fastfetch/config.jsonc create mode 100644 configs/fish/files/.config/fish/conf.d/done.fish create mode 100644 configs/fish/files/.config/fish/conf.d/fiw.fish create mode 100644 configs/fonts/files/.local/share/fonts/Fiw-Gentoo-Dots/JetBrainsMonoNerdFontMono-Bold.ttf create mode 100644 configs/fonts/files/.local/share/fonts/Fiw-Gentoo-Dots/JetBrainsMonoNerdFontMono-BoldItalic.ttf create mode 100644 configs/fonts/files/.local/share/fonts/Fiw-Gentoo-Dots/JetBrainsMonoNerdFontMono-Italic.ttf create mode 100644 configs/fonts/files/.local/share/fonts/Fiw-Gentoo-Dots/JetBrainsMonoNerdFontMono-Regular.ttf create mode 100644 configs/fonts/files/.local/share/fonts/Fiw-Gentoo-Dots/LICENSE-OFL.txt create mode 100755 configs/kde-shortcuts/files/.local/bin/fiw-shot create mode 100644 configs/kde-shortcuts/files/.local/share/applications/net.local.fiw-shot-region.desktop create mode 100644 configs/kde-shortcuts/files/.local/share/applications/net.local.fiw-shot-screen.desktop create mode 100644 configs/kde-shortcuts/files/.local/share/applications/net.local.kitty.desktop create mode 100644 configs/kde-shortcuts/kconfig/.config/kglobalshortcutsrc create mode 100644 configs/kde-shortcuts/kconfig/.config/kxkbrc create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/LICENSE.md create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/Utterly-Round-Darkrc create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/alldesktops.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/close.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/decoration.svgz create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/keepabove.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/keepbelow.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/maximize.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/metadata.desktop create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/metadata.json create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/minimize.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/restore.svg create mode 100755 configs/kde-style/files/.local/share/aurorae/themes/Utterly-Round-Dark/shade.svg create mode 100644 configs/kde-style/files/.local/share/color-schemes/GentooPurple.colors create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/COPYING create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/00000000000000020006000e7e9ffc3f create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/00008160000006810000408080010102 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/03b6e0fcb3499374a867c041f52298f0 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/08e8e1c95fe2fc01f976f1e063a24ccd create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/1081e37283d90000800003c07f3ef6bf create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/3085a0e285430894940527032f8b26df create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/3ecb610c1bf2410f44200f48c40d3599 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/4498f0e0c1937ffe01fd06f973665830 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/5c6cd98b3f3ebcb1f9c7f1c204630408 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/6407b0e94181790501fd1e167b474872 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/640fb0e74195791501fd1ed57b41487f create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/9081237383d90e509aa00f00170e968f create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/9d800788f1b08800ae810202380a0822 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/a2a266d0498c3104214a47bd64ab0fc8 create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/alias create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/all-scroll create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/b66166c04f8c3109214a4fbd64a50fc8 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/bd_double_arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/bottom_left_corner create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/bottom_right_corner create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/bottom_side create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/cell create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/center_ptr create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/circle create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/closedhand create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/col-resize create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/color-picker create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/context-menu create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/copy create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/cross create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/cross_reverse create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/crossed_circle create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/crosshair create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/d9ce0ab605698f320427677b458ad60b create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/default create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/diamond_cross create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/dnd-copy create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/dnd-move create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/dnd-no-drop create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/dnd-none create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/down-arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/draft create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/e-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/e29285e634086352946a0e7090d73106 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ew-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/fcf21c00b30f7e3f83fe0dfd12e71cff create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/fd_double_arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/fleur create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/forbidden create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/grab create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/grabbing create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/h_double_arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/half-busy create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/hand1 create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/hand2 create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/help create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ibeam create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/left-arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/left_ptr create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/left_ptr_help create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/left_ptr_watch create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/left_side create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/link create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ll_angle create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/lr_angle create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/move create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/n-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ne-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/nesw-resize create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/no-drop create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/not-allowed create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ns-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/nw-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/nwse-resize create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/openhand create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/pencil create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/pirate create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/plus create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/pointer create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/pointing_hand create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/progress create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/question_arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/right-arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/right_ptr create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/right_side create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/row-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/s-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/sb_h_double_arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/sb_v_double_arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/se-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size-bdiag create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size-fdiag create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size-hor create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size-ver create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size_all create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size_bdiag create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size_fdiag create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size_hor create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/size_ver create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/split_h create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/split_v create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/sw-resize create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/tcross create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/text create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/top_left_arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/top_left_corner create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/top_right_corner create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/top_side create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ul_angle create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/up-arrow create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/ur_angle create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/v_double_arrow create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/vertical-text create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/w-resize create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/wait create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/watch create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/wayland-cursor create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/whats_this create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/x-cursor create mode 120000 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/xterm create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/zoom-in create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/cursors/zoom-out create mode 100644 configs/kde-style/files/.local/share/icons/Fiw-Qogir/index.theme create mode 100644 configs/kde-style/kconfig/.config/kcminputrc create mode 100644 configs/kde-style/kconfig/.config/kdeglobals create mode 100644 configs/kde-style/kconfig/.config/kwinrc create mode 100644 configs/kitty/files/.config/kitty/kitty-bright.conf create mode 100644 configs/kitty/files/.config/kitty/kitty-common.conf create mode 100644 configs/kitty/files/.config/kitty/kitty-main.conf create mode 100644 configs/kitty/files/.config/kitty/kitty.conf create mode 100644 configs/mangohud/files/.config/MangoHud/MangoHud.conf create mode 100644 configs/mangohud/files/.config/MangoHud/presets.conf create mode 100644 configs/neovim/files/.config/nvim/init.lua create mode 100644 configs/spectacle/kconfig/.config/spectaclerc create mode 100644 configs/vesktop/files/.config/vesktop/themes/LICENSE-midnight create mode 100644 configs/vesktop/files/.config/vesktop/themes/midnight-background.theme.css create mode 100644 configs/vesktop/json/.config/vesktop/settings.json create mode 100644 configs/vesktop/json/.config/vesktop/settings/settings.json create mode 100644 configs/vscode/files/.config/Code/User/settings.json create mode 100644 docs/DECISIONS.md create mode 100644 docs/assets.md create mode 100644 docs/boot.md create mode 100644 docs/firefox.md create mode 100644 docs/setup.md create mode 100644 docs/spotify.md create mode 100644 flatpaks/fiw-apps.list create mode 100644 flatpaks/gaming.list create mode 100644 go.mod create mode 100644 go.sum create mode 100755 install create mode 100644 lib/rice.py create mode 100755 optional/fiw-cachy-patch create mode 100755 optional/fiw-limine-splice create mode 100644 optional/kernel/config.d/20-cachyos.config create mode 100644 optional/kernel/config.d/99-name.config create mode 100644 optional/kernel/guard create mode 100644 optional/kernel/patches/0100-cachyos-7.2.7-1.patch create mode 100644 optional/kernel/snapshot.json create mode 100755 optional/spotify/spicetify-snapshotfix create mode 100755 optional/spotify/spotify-patch create mode 100644 overlay/app-misc/opendeck-bin/Manifest create mode 100644 overlay/app-misc/opendeck-bin/opendeck-bin-2.14.0.ebuild create mode 100644 overlay/games-util/ge-proton-bin/Manifest create mode 100644 overlay/games-util/ge-proton-bin/ge-proton-bin-11.7.ebuild create mode 100644 overlay/games-util/proton-cachyos-slr-bin/Manifest create mode 100644 overlay/games-util/proton-cachyos-slr-bin/proton-cachyos-slr-bin-11.0.20260703.ebuild create mode 100644 overlay/gui-wm/tidewm/metadata.xml create mode 100644 overlay/gui-wm/tidewm/tidewm-9999.ebuild create mode 100644 overlay/licenses/music-presence create mode 100644 overlay/media-sound/music-presence-bin/Manifest create mode 100644 overlay/media-sound/music-presence-bin/music-presence-bin-2.3.6.ebuild create mode 100644 overlay/metadata/layout.conf create mode 100644 overlay/profiles/repo_name create mode 100644 packages/cli.list create mode 100644 packages/dev.list create mode 100644 packages/fiw-apps.list create mode 100644 packages/fiw-tools.list create mode 100644 packages/gaming.list create mode 100644 packages/kde.list create mode 100644 packages/optional/btrfs.list create mode 100644 packages/optional/filelight.list create mode 100644 packages/optional/grub.list create mode 100644 packages/optional/limine.list create mode 100644 packages/optional/nvidia.list create mode 100644 packages/source.list create mode 100644 packages/system.list create mode 100644 packages/tidewm.list create mode 100644 portage/common/env/fiw-dots-heavy.conf create mode 100644 portage/common/env/fiw-dots-notmpfs.conf create mode 100644 portage/common/package.env/fiw-dots-heavy create mode 100644 portage/common/package.env/fiw-dots-notmpfs create mode 100644 portage/common/package.mask/guru create mode 100644 portage/common/package.unmask/guru create mode 100644 portage/dev/package.env/heavy create mode 100644 portage/dev/package.env/notmpfs create mode 100644 portage/fiw-apps/package.accept_keywords/apps create mode 100644 portage/fiw-apps/package.license/apps create mode 100644 portage/fiw-apps/package.use/binhost create mode 100644 portage/fiw-apps/package.use/media create mode 100644 portage/fiw-ryzen/env/fiw-dots-heavy.conf create mode 100644 portage/fiw-ryzen/fiw-dots.conf create mode 100644 portage/fiw-ryzen/package.use/cpu-flags create mode 100644 portage/fiw-tools/package.license/music-presence create mode 100644 portage/gaming/package.license/steam create mode 100644 portage/gaming/package.mask/steam-overlay create mode 100644 portage/gaming/package.unmask/steam create mode 100644 portage/gaming/package.use/steam create mode 100644 portage/gaming/package.use/steam-abi32 create mode 100644 portage/kde/package.accept_keywords/kde create mode 100644 portage/nvidia/package.use/nvidia create mode 100644 portage/stock/fiw-dots.conf create mode 100644 portage/system/package.license/firmware create mode 100644 portage/system/package.use/network create mode 100644 presets/fiw-ryzen.json create mode 100644 presets/stock.json create mode 100644 tests/test_configs.py create mode 100644 tools/capture.py create mode 100644 tools/check-private.py create mode 100644 tools/public-attribution.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f25de7c --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/local/ +/build/ +__pycache__/ +*.pyc +.DS_Store +AGENTS.md +agents.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b1cc67b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Fiw + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bae1f9f --- /dev/null +++ b/README.md @@ -0,0 +1,149 @@ +
+ +# Fiw-Gentoo-Dots + +**My Gentoo setup, ready to make home feel like home again.** + +![Gentoo](https://img.shields.io/badge/Gentoo-54487A?logo=gentoo&logoColor=white) +![KDE Plasma](https://img.shields.io/badge/KDE_Plasma-1D99F3?logo=kde&logoColor=white) +![License](https://img.shields.io/badge/license-MIT-purple) +![Status](https://img.shields.io/badge/status-work_in_progress-yellow) + +[KDE & apps](#configs) · [Packages](#package-sections) · [Setup](docs/setup.md) · [Decisions](docs/DECISIONS.md) + +
+ +--- + +## Overview + +A personal Gentoo rice and restoration kit: my Plasma styling, current +shortcuts, package lists and the app preferences I use every day. Built +mainly for my own devices, with deliberate updates and a preview before +anything is applied. + +- **KDE first:** colours, fonts, cursor, window styling and current keybinds. +- **Pick what you want:** package sections and individually optional app configs. +- **Portable terminals:** Fish, Kitty and Neovim work across compositors. +- **Binaries preferred:** a small source list, with a choice before extra builds. +- **Keep your edits:** conflict prompts, backups and `.new` proposals on updates. + +**Work in progress:** configuration restoration and the TUI are ready for review. +Package installation needs a supervised first run on a fresh Gentoo system. +The existing installation has not been changed by creating this repo. + +## Start + +```sh +git clone https://git.fiwlabs.dev/fiwdev/Fiw-Gentoo-Dots.git +cd Fiw-Gentoo-Dots +./install +``` + +The Bubble Tea interface offers a preset, package sections, individual app +configs, kernel/bootloader choices, extras, and a final preview. Enter at the +preview saves a selection without applying it. `a` restores configs; `i` +starts the package installation workflow with sudo. Go 1.24+ builds the TUI; +Python 3.11+ runs the backend. Go dependencies are recorded in go.mod/go.sum. + +For a preview without building the TUI: + +```sh +./install --plan --profile stock +./install --plan --profile fiw-ryzen +``` + +See [setup](docs/setup.md) for installation steps and draft limitations. + +## Presets + +| Preset | Build settings | Kernel | +|---|---|---| +| Stock | Portable compiler settings; binary packages preferred | Generic Gentoo binary kernel | +| Fiw's Ryzen | Current Ryzen 9900X/Zen 5 tuning and NVIDIA configuration | Tested custom kernel plus generic binary fallback | + +Both deliberately compile Fastfetch, jq and zip. Custom kernels and their +matching external modules compile when selected. Other packages prefer +Portage binaries or upstream `-bin` packages. Additional source builds +require a compile-or-skip choice, with compilation recommended; skipped +dependencies also cause dependent requested applications to be skipped. + +The custom kernel snapshot currently targets 7.2.8 with the tested +CachyOS 7.2.7-1 patch. Refresh it explicitly when updating the snapshot. + +## Package sections + +| List | Contents | +|---|---| +| [kde](packages/kde.list) | Plasma, Plasma Login Manager, desktop components and supporting fonts | +| [fiw-apps](packages/fiw-apps.list) | Everyday apps including Dolphin, Ark, Gwenview and Spectacle | +| [cli](packages/cli.list) | Shell, terminal utilities and FFmpeg | +| [dev](packages/dev.list) | Languages and development tools | +| [gaming](packages/gaming.list) | Steam, Proton, Prism, MangoHud and r2modman; Sober is in flatpaks/gaming.list | +| [system](packages/system.list) | System utilities; the selected kernels are added by the installer | +| [fiw-tools](packages/fiw-tools.list) | OpenDeck and Music Presence; FiwNode and Apdatifier packaging is pending | +| [tidewm](packages/tidewm.list) | Optional compositor and supporting utilities | + +Filelight, NVIDIA drivers and Btrfs tools are separate extras. Ext4 does not +require Btrfs tools. LocalSend is an optional Flatpak in the apps section. +Limine and GRUB are optional alternatives; retaining the current loader is +the default. Kernel choice is independent of bootloader choice. + +## Configs + +Every config is independently selectable. KDE appearance covers colours, +fonts, cursor, window decorations and Dolphin styling. Panels, widgets and +wallpapers are excluded. All portable current shortcut assignments, +including disabled defaults, are captured with their launchers and helpers; +unused machine-specific activity IDs are omitted. + +Fish, Kitty and Neovim are usable without KDE or KWin. Fastfetch keeps the +tree layout and purple colours with the built-in Gentoo logo. MangoHud and +Vesktop preferences are included; browser profiles, chat sessions and account +data are excluded. App autostart is a separate optional selection. + +Spotify is stock by default. The existing customization scripts remain an +[explicit optional step](docs/spotify.md). [Firefox-Privacy](docs/firefox.md) +is also optional. + +Existing differences prompt apply-or-keep and get backups when replaced. +Updates leave locally edited configs intact and write the proposal to `.new`. +KConfig patches preserve unrelated keys and groups; JSON patches preserve +unrelated preferences and login data already on the target device. + +## Project layout + +```text +cmd/dots/ Bubble Tea selection interface +configs/ Optional KDE and app configs +packages/ Categorized Portage package lists +presets/ Stock and Fiw's Ryzen defaults +portage/ Build settings and binary preferences +overlay/ Selected additional packages +optional/ Kernel, boot and app helpers +flatpaks/ Separate optional Flatpak lists +docs/ Setup, decisions and asset credits +``` + +## Maintenance + +```sh +python3 tools/capture.py # recapture only the explicit allowlist +python3 tools/check-private.py +python3 -m unittest discover -s tests +go test ./... +``` + +Review captures before committing. `local/` and built binaries are ignored. +This repo starts with fresh history. Third-party theme/cursor assets retain +their licence notices; overlay ebuilds retain their original notices. + +## License + +Original code and configuration contributions are licensed under [MIT](LICENSE). +Bundled third-party assets, fonts, patches and ebuilds keep their own licences +and attribution; see [asset credits](docs/assets.md). + +--- + +
A personal Gentoo setup by Fiw.
diff --git a/cmd/dots/main.go b/cmd/dots/main.go new file mode 100644 index 0000000..3ae913b --- /dev/null +++ b/cmd/dots/main.go @@ -0,0 +1,406 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + "os/exec" + "path/filepath" + "sort" + "strings" + + tea "github.com/charmbracelet/bubbletea" +) + +type selection struct { + Name string `json:"name"` + Profile string `json:"profile"` + Groups []string `json:"groups"` + Configs []string `json:"configs"` + Kernel string `json:"kernel"` + Bootloader string `json:"bootloader"` + Extras []string `json:"extras"` + Firefox bool `json:"firefox_privacy"` + Spotify bool `json:"spotify_custom"` +} +type config struct { + Label string `json:"label"` + Group string `json:"group"` +} +type catalog struct { + Groups []string `json:"groups"` + Configs map[string]config `json:"configs"` + Extras map[string]string `json:"extras"` + Stock selection `json:"stock"` + Ryzen selection `json:"ryzen"` +} +type row struct { + id, label string + checked bool +} +type previewMsg struct { + content string + err error +} +type model struct { + repo string + catalog catalog + selection selection + rows []row + stage, cursor, height, scroll int + preview, errorText, action string + done, loading bool +} + +func contains(values []string, target string) bool { + for _, value := range values { + if value == target { + return true + } + } + return false +} +func (m model) Init() tea.Cmd { return nil } +func (m *model) prepare() { + m.cursor, m.scroll = 0, 0 + m.rows = nil + switch m.stage { + case 0: + m.rows = []row{{"stock", "Stock — binary kernel, portable build settings", m.selection.Profile == "stock"}, {"fiw-ryzen", "Fiw's Ryzen — current Zen 5 tuning, custom + binary fallback", m.selection.Profile == "fiw-ryzen"}} + if m.selection.Profile == "fiw-ryzen" { + m.cursor = 1 + } + case 1: + for _, id := range m.catalog.Groups { + label := id + if id == "tidewm" { + label += " (optional)" + } + m.rows = append(m.rows, row{id, label, contains(m.selection.Groups, id)}) + } + case 2: + ids := make([]string, 0, len(m.catalog.Configs)) + for id := range m.catalog.Configs { + if id != "autostart" { + ids = append(ids, id) + } + } + sort.Strings(ids) + for _, id := range ids { + c := m.catalog.Configs[id] + if c.Group != "" && !contains(m.selection.Groups, c.Group) { + continue + } + m.rows = append(m.rows, row{id, c.Label, contains(m.selection.Configs, id)}) + } + case 3: + m.rows = []row{ + {"binary", "Kernel: generic binary", m.selection.Kernel == "binary"}, + {"custom", "Kernel: custom + generic binary fallback", m.selection.Kernel == "custom"}, + {"keep", "Bootloader: keep existing", m.selection.Bootloader == "keep"}, + {"limine", "Bootloader: optional Limine", m.selection.Bootloader == "limine"}, + {"grub", "Bootloader: optional GRUB", m.selection.Bootloader == "grub"}, + } + for _, id := range []string{"nvidia", "btrfs", "filelight"} { + m.rows = append(m.rows, row{id, m.catalog.Extras[id], contains(m.selection.Extras, id)}) + } + m.rows = append(m.rows, row{"autostart", "Optional app autostart", contains(m.selection.Configs, "autostart")}, row{"firefox", "Optional Firefox-Privacy setup", m.selection.Firefox}, row{"spotify", "Optional Spotify customization script (stock by default)", m.selection.Spotify}) + } +} +func (m *model) remember() { + switch m.stage { + case 1: + m.selection.Groups = []string{} + for _, r := range m.rows { + if r.checked { + m.selection.Groups = append(m.selection.Groups, r.id) + } + } + case 2: + autostart := contains(m.selection.Configs, "autostart") + m.selection.Configs = []string{} + for _, r := range m.rows { + if r.checked { + m.selection.Configs = append(m.selection.Configs, r.id) + } + } + if autostart { + m.selection.Configs = append(m.selection.Configs, "autostart") + } + case 3: + m.selection.Extras = []string{} + for _, r := range m.rows { + if _, ok := m.catalog.Extras[r.id]; ok && r.checked { + m.selection.Extras = append(m.selection.Extras, r.id) + } + if r.checked && (r.id == "binary" || r.id == "custom") { + m.selection.Kernel = r.id + } + if r.checked && (r.id == "keep" || r.id == "limine" || r.id == "grub") { + m.selection.Bootloader = r.id + } + if r.id == "firefox" { + m.selection.Firefox = r.checked + } + if r.id == "spotify" { + m.selection.Spotify = r.checked + } + } + configNames := []string{} + for _, id := range m.selection.Configs { + if id != "autostart" { + configNames = append(configNames, id) + } + } + for _, r := range m.rows { + if r.id == "autostart" && r.checked { + configNames = append(configNames, "autostart") + } + } + m.selection.Configs = configNames + } +} +func (m model) makePreview() tea.Cmd { + return func() tea.Msg { + file, err := os.CreateTemp("", "fiw-dots-selection-*.json") + if err != nil { + return previewMsg{err: err} + } + defer os.Remove(file.Name()) + data, err := json.Marshal(m.selection) + if err == nil { + _, err = file.Write(data) + } + file.Close() + if err != nil { + return previewMsg{err: err} + } + cmd := exec.Command("python3", filepath.Join(m.repo, "lib", "rice.py"), "--plan", "--selection", file.Name()) + output, err := cmd.CombinedOutput() + return previewMsg{string(output), err} + } +} +func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + switch v := msg.(type) { + case tea.WindowSizeMsg: + m.height = v.Height + case previewMsg: + m.loading = false + m.preview = v.content + if v.err != nil { + m.errorText = v.err.Error() + } + case tea.KeyMsg: + key := v.String() + if key == "ctrl+c" || key == "q" { + return m, tea.Quit + } + if m.loading { + return m, nil + } + if m.stage == 4 { + switch key { + case "up", "k": + if m.scroll > 0 { + m.scroll-- + } + case "down", "j": + if m.scroll < len(strings.Split(m.preview, "\n"))-1 { + m.scroll++ + } + case "esc": + m.stage-- + m.prepare() + case "enter", "s", "a", "i": + if m.errorText == "" { + m.done = true + m.action = key + return m, tea.Quit + } + } + return m, nil + } + switch key { + case "up", "k": + if m.cursor > 0 { + m.cursor-- + } + case "down", "j": + if m.cursor < len(m.rows)-1 { + m.cursor++ + } + case " ": + if len(m.rows) == 0 { + break + } + if m.stage == 0 { + if m.rows[m.cursor].id == "stock" { + m.selection = m.catalog.Stock + } else { + m.selection = m.catalog.Ryzen + } + m.prepare() + } else { + id := m.rows[m.cursor].id + if m.stage == 3 && (id == "binary" || id == "custom") { + for i := range m.rows { + if m.rows[i].id == "binary" || m.rows[i].id == "custom" { + m.rows[i].checked = false + } + } + m.rows[m.cursor].checked = true + } else if m.stage == 3 && (id == "keep" || id == "limine" || id == "grub") { + for i := range m.rows { + if m.rows[i].id == "keep" || m.rows[i].id == "limine" || m.rows[i].id == "grub" { + m.rows[i].checked = false + } + } + m.rows[m.cursor].checked = true + } else { + m.rows[m.cursor].checked = !m.rows[m.cursor].checked + } + } + case "enter": + if m.stage == 0 { + if m.rows[m.cursor].id == "stock" { + m.selection = m.catalog.Stock + } else { + m.selection = m.catalog.Ryzen + } + } + m.remember() + m.stage++ + if m.stage == 4 { + m.loading = true + m.errorText = "" + return m, m.makePreview() + } + m.prepare() + case "esc": + if m.stage > 0 { + m.remember() + m.stage-- + m.prepare() + } + } + } + return m, nil +} + +func (m model) View() string { + const purple = "\033[38;2;157;143;217m" + const reset = "\033[0m" + titles := []string{"Preset", "Package sections", "Optional app configs", "Kernel, bootloader and extras", "Final preview"} + text := purple + " Fiw-Gentoo-Dots\n" + reset + " " + titles[m.stage] + " · " + m.selection.Name + "\n\n" + budget := m.height - 10 + if budget < 5 { + budget = 5 + } + if m.stage == 4 { + if m.loading { + return text + " Preparing preview…\n" + } + lines := strings.Split(m.preview, "\n") + end := m.scroll + budget + if end > len(lines) { + end = len(lines) + } + for _, line := range lines[m.scroll:end] { + text += " " + line + "\n" + } + text += "\n ↑/↓ scroll · Esc back · Enter save plan · a restore configs · i install packages\n q cancel\n" + if m.errorText != "" { + text += " " + m.errorText + "\n" + } + return text + } + start := 0 + if m.cursor >= budget { + start = m.cursor - budget + 1 + } + end := start + budget + if end > len(m.rows) { + end = len(m.rows) + } + for i := start; i < end; i++ { + r := m.rows[i] + mark := "[ ]" + if r.checked { + mark = "[✓]" + } + cursor := " " + if m.cursor == i { + cursor = "› " + } + line := " " + cursor + mark + " " + r.label + if m.cursor == i { + line = purple + line + reset + } + text += line + "\n" + } + return text + "\n ↑/↓ move · Space select · Enter next · Esc back · q cancel\n" +} + +func main() { + repo, err := os.Getwd() + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + output, err := exec.Command("python3", filepath.Join(repo, "lib", "rice.py"), "--catalog").Output() + if err != nil { + fmt.Fprintln(os.Stderr, "Cannot load the installer catalogue:", err) + os.Exit(1) + } + var c catalog + if err := json.Unmarshal(output, &c); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + m := model{repo: repo, catalog: c, selection: c.Stock, height: 28} + m.prepare() + result, err := tea.NewProgram(m, tea.WithAltScreen()).Run() + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + final := result.(model) + if !final.done { + return + } + path := filepath.Join(repo, "local", "selection.json") + if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + data, _ := json.MarshalIndent(final.selection, "", " ") + if err := os.WriteFile(path, append(data, '\n'), 0600); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + fmt.Println(final.preview) + fmt.Println("\nSaved selection:", path) + args := []string{filepath.Join(repo, "lib", "rice.py"), "--selection", path} + switch final.action { + case "a": + args = append(args, "--apply-configs") + case "i": + args = append([]string{"python3"}, args...) + args = append(args, "--install-packages") + default: + fmt.Println("Review the setup notes in docs/setup.md before applying.") + return + } + program := "python3" + if final.action == "i" { + program = "sudo" + } + cmd := exec.Command(program, args...) + cmd.Stdin = os.Stdin + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/cmd/dots/main_test.go b/cmd/dots/main_test.go new file mode 100644 index 0000000..31ba992 --- /dev/null +++ b/cmd/dots/main_test.go @@ -0,0 +1,41 @@ +package main + +import ( + tea "github.com/charmbracelet/bubbletea" + "testing" +) + +func TestRyzenSelectionSurvivesSpaceAndEnter(t *testing.T) { + c := catalog{Stock: selection{Name: "Stock", Profile: "stock"}, Ryzen: selection{Name: "Fiw's Ryzen", Profile: "fiw-ryzen"}} + m := model{catalog: c, selection: c.Stock} + m.prepare() + m.cursor = 1 + next, _ := m.Update(tea.KeyMsg{Type: tea.KeySpace}) + m = next.(model) + next, _ = m.Update(tea.KeyMsg{Type: tea.KeyEnter}) + m = next.(model) + if m.selection.Profile != "fiw-ryzen" || m.stage != 1 { + t.Fatalf("selected wrong preset: %+v", m.selection) + } +} + +func TestBootloaderChoicesAreExclusive(t *testing.T) { + m := model{stage: 3, selection: selection{Kernel: "binary", Bootloader: "keep"}, catalog: catalog{Extras: map[string]string{}}} + m.prepare() + m.cursor = 4 + next, _ := m.Update(tea.KeyMsg{Type: tea.KeySpace}) + m = next.(model) + m.remember() + if m.selection.Bootloader != "grub" { + t.Fatal("GRUB was not selected") + } + selected := 0 + for _, r := range m.rows { + if r.checked && (r.id == "keep" || r.id == "limine" || r.id == "grub") { + selected++ + } + } + if selected != 1 { + t.Fatal("multiple bootloaders selected") + } +} diff --git a/configs/autostart/files/.config/autostart/musicpresence.desktop b/configs/autostart/files/.config/autostart/musicpresence.desktop new file mode 100644 index 0000000..5a2a4eb --- /dev/null +++ b/configs/autostart/files/.config/autostart/musicpresence.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Music Presence +Exec=musicpresence +X-GNOME-Autostart-enabled=true +X-KDE-autostart-after=panel diff --git a/configs/autostart/files/.config/autostart/opendeck.desktop b/configs/autostart/files/.config/autostart/opendeck.desktop new file mode 100644 index 0000000..254f620 --- /dev/null +++ b/configs/autostart/files/.config/autostart/opendeck.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=opendeck +Comment=opendeckstartup script +Exec=/usr/bin/opendeck --hide +StartupNotify=false +Terminal=false \ No newline at end of file diff --git a/configs/autostart/files/.config/autostart/spotify.desktop b/configs/autostart/files/.config/autostart/spotify.desktop new file mode 100644 index 0000000..829589a --- /dev/null +++ b/configs/autostart/files/.config/autostart/spotify.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Spotify +Exec=spotify --enable-features=UseOzonePlatform --ozone-platform=wayland +X-GNOME-Autostart-enabled=true +X-KDE-autostart-after=panel diff --git a/configs/autostart/files/.config/autostart/steam.desktop b/configs/autostart/files/.config/autostart/steam.desktop new file mode 100644 index 0000000..80111aa --- /dev/null +++ b/configs/autostart/files/.config/autostart/steam.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Steam +Exec=steam -silent +X-GNOME-Autostart-enabled=true +X-KDE-autostart-after=panel diff --git a/configs/autostart/files/.config/autostart/vesktop.desktop b/configs/autostart/files/.config/autostart/vesktop.desktop new file mode 100644 index 0000000..08689e9 --- /dev/null +++ b/configs/autostart/files/.config/autostart/vesktop.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Vesktop +Exec=/usr/bin/vesktop-bin --start-minimized +X-GNOME-Autostart-enabled=true +X-KDE-autostart-after=panel diff --git a/configs/autostart/kconfig/.config/kwinrulesrc b/configs/autostart/kconfig/.config/kwinrulesrc new file mode 100644 index 0000000..0c676c6 --- /dev/null +++ b/configs/autostart/kconfig/.config/kwinrulesrc @@ -0,0 +1,27 @@ +[General] +rules=fiw-autostart-minimized-discord,fiw-autostart-minimized-opendeck,fiw-autostart-minimized-spotify +count=3 + +[fiw-autostart-minimized-discord] +Description=Start Discord minimized +minimize=true +minimizerule=3 +types=1 +wmclass=discord +wmclassmatch=1 + +[fiw-autostart-minimized-opendeck] +Description=Start OpenDeck minimized +minimize=true +minimizerule=3 +types=1 +wmclass=opendeck +wmclassmatch=1 + +[fiw-autostart-minimized-spotify] +Description=Start Spotify minimized +minimize=true +minimizerule=3 +types=1 +wmclass=spotify +wmclassmatch=1 diff --git a/configs/catalog.json b/configs/catalog.json new file mode 100644 index 0000000..be17b19 --- /dev/null +++ b/configs/catalog.json @@ -0,0 +1,59 @@ +{ + "kde-style": { + "label": "KDE colours, fonts, cursor and decorations", + "group": "kde", + "kde": true + }, + "kde-shortcuts": { + "label": "All KDE shortcuts + keyboard layouts + screenshot helpers", + "group": "kde", + "kde": true + }, + "dolphin": { + "label": "Dolphin toolbar, sidebar and transparency", + "group": "fiw-apps", + "kde": true + }, + "spectacle": { + "label": "Spectacle capture preferences", + "group": "fiw-apps", + "kde": true + }, + "fish": { + "label": "Fish aliases, greeting and notification settings", + "group": "cli" + }, + "kitty": { + "label": "Kitty lavender profiles", + "group": "fiw-apps" + }, + "neovim": { + "label": "Neovim transparent purple style", + "group": "cli" + }, + "fastfetch": { + "label": "Fastfetch tree layout with Gentoo logo", + "group": "cli" + }, + "mangohud": { + "label": "MangoHud appearance and detail presets", + "group": "gaming" + }, + "vesktop": { + "label": "Vesktop preferences (no account data)", + "group": "fiw-apps" + }, + "vscode": { + "label": "VS Code preferences", + "group": "fiw-apps" + }, + "autostart": { + "label": "Optional application autostart", + "group": null, + "kde": true + }, + "fonts": { + "label": "JetBrainsMono Nerd Font Mono (four styles)", + "group": null + } +} diff --git a/configs/dolphin/files/.local/share/kxmlgui5/dolphin/dolphinui.rc b/configs/dolphin/files/.local/share/kxmlgui5/dolphin/dolphinui.rc new file mode 100644 index 0000000..acabb73 --- /dev/null +++ b/configs/dolphin/files/.local/share/kxmlgui5/dolphin/dolphinui.rc @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location Bar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Main Toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/dolphin/kconfig/.config/dolphinrc b/configs/dolphin/kconfig/.config/dolphinrc new file mode 100644 index 0000000..3ccfacd --- /dev/null +++ b/configs/dolphin/kconfig/.config/dolphinrc @@ -0,0 +1,6 @@ +[KFileDialog Settings] +Places Icons Auto-resize=false +Places Icons Static Size=22 + +[MainWindow] +MenuBar=Disabled diff --git a/configs/dolphin/kconfig/.config/kwinrulesrc b/configs/dolphin/kconfig/.config/kwinrulesrc new file mode 100644 index 0000000..9bac00b --- /dev/null +++ b/configs/dolphin/kconfig/.config/kwinrulesrc @@ -0,0 +1,13 @@ +[General] +rules=fiw-dolphin-opacity +count=1 + +[fiw-dolphin-opacity] +Description=Dolphin transparency +opacityactive=96 +opacityactiverule=2 +opacityinactive=92 +opacityinactiverule=2 +types=1 +wmclass=org.kde.dolphin +wmclassmatch=1 diff --git a/configs/dolphin/kconfig/.local/state/dolphinstaterc b/configs/dolphin/kconfig/.local/state/dolphinstaterc new file mode 100644 index 0000000..4a8afb4 --- /dev/null +++ b/configs/dolphin/kconfig/.local/state/dolphinstaterc @@ -0,0 +1,6 @@ +[FilterBar] +caseSensitive=false +filterMode=1 + +[State] +State=AAAA/wAAAAD9AAAAAwAAAAAAAACNAAADyvwCAAAAAvsAAAAWAGYAbwBsAGQAZQByAHMARABvAGMAawgAAAAuAAAArAAAAAAA////+wAAABQAcABsAGEAYwBlAHMARABvAGMAawEAAAAuAAADygAAAFMA////AAAAAQAAAKwAAAKf/AIAAAAB+wAAABAAaQBuAGYAbwBEAG8AYwBrCAAAAC4AAAKfAAAAAAD///8AAAADAAAEugAAAED8AQAAAAH7AAAAGAB0AGUAcgBtAGkAbgBhAGwARABvAGMAawgAAAAAAAAEugAAAAAA////AAAEZAAAA8oAAAAEAAAABAAAAAgAAAAI/AAAAAEAAAACAAAAAQAAABYAbQBhAGkAbgBUAG8AbwBsAEIAYQByAQAAAAD/////AAAAAAAAAAA= diff --git a/configs/fastfetch/files/.config/fastfetch/config.jsonc b/configs/fastfetch/files/.config/fastfetch/config.jsonc new file mode 100644 index 0000000..22539fe --- /dev/null +++ b/configs/fastfetch/files/.config/fastfetch/config.jsonc @@ -0,0 +1,139 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "gentoo", + "type": "builtin", + "padding": { + "top": 1, + "right": 3 + } + }, + "display": { + "separator": " ", + "color": { + "keys": "#9D8FD9", + "title": "#DDDAEC" + } + }, + "modules": [ + { + "type": "title", + "format": "{user-name}@{host-name}" + }, + "break", + { + "type": "custom", + "format": "\u001b[1;38;2;157;143;217m system" + }, + { + "type": "os", + "key": " \u251c \uf30d os ", + "keyColor": "#9D8FD9" + }, + { + "type": "kernel", + "key": " \u251c \uf013 kernel ", + "keyColor": "#9D8FD9" + }, + { + "type": "command", + "key": " \u251c \udb82\udce8 profile ", + "keyColor": "#9D8FD9", + "text": "readlink /etc/portage/make.profile | sed 's#.*/profiles/default/linux/amd64/##'" + }, + { + "type": "packages", + "key": " \u251c \udb80\udfd6 pkgs ", + "keyColor": "#9D8FD9" + }, + { + "type": "de", + "key": " \u251c \uf488 desktop ", + "keyColor": "#9D8FD9" + }, + { + "type": "wm", + "key": " \u251c \udb81\uddb2 session ", + "keyColor": "#9D8FD9" + }, + { + "type": "terminal", + "key": " \u251c \uf489 term ", + "keyColor": "#9D8FD9" + }, + { + "type": "shell", + "key": " \u2514 \uf120 shell ", + "keyColor": "#9D8FD9" + }, + "break", + { + "type": "custom", + "format": "\u001b[1;38;2;185;174;230m hardware" + }, + { + "type": "host", + "key": " \u251c \udb80\udf22 board ", + "keyColor": "#B9AEE6" + }, + { + "type": "cpu", + "key": " \u251c \uf4bc cpu ", + "keyColor": "#B9AEE6", + "format": "{1}" + }, + { + "type": "gpu", + "key": " \u251c \udb82\udcae gpu ", + "keyColor": "#B9AEE6", + "format": "{2}", + "hideType": "integrated" + }, + { + "type": "memory", + "key": " \u251c \udb80\udf5b mem ", + "keyColor": "#B9AEE6" + }, + { + "type": "disk", + "key": " \u251c \udb80\udeca disk ", + "keyColor": "#B9AEE6", + "folders": "/", + "showReadOnly": false + }, + { + "type": "display", + "key": " \u2514 \udb80\udf79 display ", + "keyColor": "#B9AEE6", + "compactType": "original-with-refresh-rate" + }, + "break", + { + "type": "custom", + "format": "\u001b[1;38;2;221;218;236m uptime" + }, + { + "type": "command", + "key": " \u251c \udb86\udd9f os age ", + "keyColor": "#DDDAEC", + "text": "birth=$(stat -c %W /); now=$(date +%s); echo $(( (now - birth) / 86400 )) days" + }, + { + "type": "uptime", + "key": " \u251c \udb81\udd1b uptime ", + "keyColor": "#DDDAEC" + }, + { + "type": "command", + "key": " \u2514 \udb82\udd54 time ", + "keyColor": "#DDDAEC", + "text": "date '+%I:%M %p \u00b7 %Y-%m-%d'" + }, + "break", + { + "type": "colors", + "paddingLeft": 2, + "symbol": "circle" + } + ] +} diff --git a/configs/fish/files/.config/fish/conf.d/done.fish b/configs/fish/files/.config/fish/conf.d/done.fish new file mode 100644 index 0000000..9252660 --- /dev/null +++ b/configs/fish/files/.config/fish/conf.d/done.fish @@ -0,0 +1,340 @@ +# MIT License + +# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if not status is-interactive + exit +end + +set -g __done_version 1.19.1 + +function __done_run_powershell_script + set -l powershell_exe (command --search "powershell.exe") + + if test $status -ne 0 + and command --search wslvar + + set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe) + end + + if string length --quiet "$powershell_exe" + and test -x "$powershell_exe" + + set cmd (string escape $argv) + + eval "$powershell_exe -Command $cmd" + end +end + +function __done_windows_notification -a title -a message + if test "$__done_notify_sound" -eq 1 + set soundopt "