├── .directory ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .python-version ├── .ruby-version ├── .vscode └── extensions.json ├── Brewfile ├── Brewfile.app ├── Brewfile.desktop ├── Brewfile.font ├── Brewfile.makedep ├── Brewfile.util ├── Brewfile.vscode ├── LICENSE ├── README.md ├── README.md.nu ├── blend ├── blend.test.nu ├── blend_util ├── bootstrap_archlinux.sh ├── bootstrap_macos.sh ├── macos_config.sh ├── packages ├── .gitignore ├── X │ └── .xprofile ├── aerospace │ └── aerospace │ │ └── aerospace.toml ├── alacritty-macos │ └── alacritty │ │ └── alacritty.toml ├── alacritty │ ├── alacritty │ │ └── alacritty.toml │ └── program.home.nix ├── alsa │ └── .asoundrc ├── atom │ └── .atom │ │ ├── .apmrc │ │ ├── keymap.cson │ │ └── styles.less ├── bash │ ├── .bashrc │ └── .profile ├── bat │ └── bat │ │ └── config ├── bin │ └── bin │ │ ├── .directory │ │ ├── blend │ │ ├── clean-elvish-directory-history.elv │ │ ├── compton-convgen.py │ │ ├── cvttgsticker.sh │ │ ├── defaults-detective.elv │ │ ├── defaults-detective.mts │ │ ├── encodingprober.py │ │ ├── extractgst.sh │ │ ├── ffconcat.elv │ │ ├── fffakonadistop.sh │ │ ├── fffbrightness.sh │ │ ├── fffconfhost.elv │ │ ├── fffcoverart.elv │ │ ├── fffjpg.elv │ │ ├── ffflockscreen.elv │ │ ├── fffmacproresolution.elv │ │ ├── fffmouse-acc.elv │ │ ├── fffmouse-acc.sh │ │ ├── fffp2v.sh │ │ ├── fffpixiv-rename.elv │ │ ├── fffplaying.elv │ │ ├── fffrpm.elv │ │ ├── ffftohevc_cq32.sh │ │ ├── ffftohevc_vaapi.sh │ │ ├── fffwacommap.sh │ │ ├── fffwallpaper.sh │ │ ├── fffwebp.elv │ │ ├── git-ls-remote-branch-status.ts │ │ ├── gpu-sensor.pl │ │ ├── hitokoto.sh │ │ ├── i3-video-wallpaper.elv │ │ ├── i3_workspace_walk.py │ │ ├── is-merge-commit │ │ ├── journalctl-filter-process.elv │ │ ├── loi.js │ │ ├── macos-flush-dns.sh │ │ ├── mpdio.js │ │ ├── pacman-stat.sh │ │ ├── print-bfg-changed-commits.elv │ │ ├── qtcreator.sh │ │ ├── qtcreator_style.css │ │ ├── refresh-gpg-cardno.elv │ │ ├── shellenv │ │ ├── shellenv.elv │ │ ├── ssh-archlinuxcn-sign.sh │ │ ├── tts.py │ │ ├── utf8everywhere.elv │ │ ├── waifu │ │ └── yabaictl.elv ├── color │ └── DisplayCAL │ │ └── storage │ │ ├── 27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX │ │ └── 27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX.icc │ │ ├── 27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX │ │ └── 27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc │ │ ├── Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX │ │ └── Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX.icc │ │ ├── SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX │ │ └── SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc │ │ ├── SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB │ │ └── SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB.icc │ │ └── Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX │ │ └── Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX.icc ├── darwin-system │ ├── README.md │ ├── darwin.configuration.nix │ ├── darwin.home.nix │ ├── flake.lock │ └── flake.nix ├── elvish │ ├── .gitignore │ └── elvish │ │ ├── lib │ │ ├── kokkoro.elv │ │ ├── whtsky.elv │ │ └── カフェラテ・カフェモカ・カプチーノ │ │ │ ├── alias.elv │ │ │ ├── completion.elv │ │ │ ├── env.elv │ │ │ └── prompt.elv │ │ └── rc.elv ├── fastfetch │ └── fastfetch │ │ └── config.jsonc ├── fcitx │ ├── .gitignore │ └── fcitx │ │ ├── config │ │ └── data │ │ └── QuickPhrase.mb ├── fontconfig │ └── fontconfig │ │ ├── conf.d │ │ ├── 10-universal.conf │ │ ├── 20-general-font-family.conf │ │ └── 30-telegram-opensans.conf │ │ └── fonts.conf ├── ghostty │ └── ghostty │ │ └── config ├── git │ └── git │ │ ├── .gitignore │ │ ├── config │ │ ├── config.user.work.example │ │ ├── gitk │ │ └── ignore ├── gpg │ └── .gnupg │ │ └── gpg.conf ├── htop │ └── htop │ │ └── htoprc ├── i3wm │ └── i3 │ │ └── config ├── kitty │ └── kitty │ │ ├── colors.conf │ │ ├── current-theme.conf │ │ ├── kitty.conf │ │ └── themes │ │ ├── latte.conf │ │ ├── mocha.conf │ │ └── rose-pine-moon.conf ├── krita │ └── .local │ │ └── share │ │ └── krita │ │ ├── bundles │ │ └── deevad-v8-2.bundle │ │ ├── input │ │ ├── kritadefault.profile │ │ ├── painttoolsaicompatible.profile │ │ ├── photoshopcompatible.profile │ │ └── tabletpro.profile │ │ ├── kis_brushes.blacklist │ │ ├── kis_paintoppresets.blacklist │ │ ├── kis_workspaces.blacklist │ │ ├── ko_palettes.blacklist │ │ ├── krita.rc │ │ ├── kritaDefaultshortcuts.rc │ │ ├── palettes │ │ ├── Chino.gpl │ │ ├── Chino2.gpl │ │ ├── Chiya.gpl │ │ ├── Palette.gpl │ │ └── Restia.gpl │ │ ├── predefined_image_sizes │ │ ├── 2160p__4K_UHD_.predefinedimage │ │ ├── 2K__QWXGA_.predefinedimage │ │ ├── 4K.predefinedimage │ │ ├── 4K_UHD.predefinedimage │ │ ├── 720p__WXGA-H,_min._.predefinedimage │ │ ├── 8K.predefinedimage │ │ ├── 8K_UHD.predefinedimage │ │ ├── A4__120_ppi_.predefinedimage │ │ ├── Full_HD.predefinedimage │ │ ├── QHD.predefinedimage │ │ └── WUXGA.predefinedimage │ │ ├── tags.xml │ │ ├── tags │ │ ├── kis_brushes_tags.xml │ │ ├── kis_paintoppresets_tags.xml │ │ ├── kis_resourcebundles_tags.xml │ │ ├── kis_taskset_tags.xml │ │ ├── kis_workspaces_tags.xml │ │ ├── ko_gradients_tags.xml │ │ ├── ko_palettes_tags.xml │ │ ├── ko_patterns_tags.xml │ │ └── psd_layer_style_collections_tags.xml │ │ └── workspaces │ │ ├── 1048Rendering1.kws │ │ ├── 1048p.kws │ │ ├── 1048ptya1.kws │ │ ├── 1048ptya_floatToolbox.kws │ │ ├── MyWorkSpace II.kws │ │ ├── MyWorkSpace.kws │ │ ├── MyWrokSpace.kws │ │ ├── TicoSpace.kws │ │ └── TicoSpace1.kws ├── makepkg │ └── .makepkg.conf ├── mako │ └── mako │ │ └── config ├── mise │ └── mise │ │ └── config.toml ├── nano │ └── nano │ │ └── nanorc ├── ncdu │ └── ncdu │ │ └── config ├── neofetch │ └── neofetch │ │ └── config.conf ├── neovim │ └── nvim │ │ ├── init.lua │ │ ├── lazy-lock.json │ │ └── lua │ │ ├── config │ │ └── lazy.lua │ │ └── plugins │ │ └── 00.lua ├── npm │ └── .npmrc ├── nushell │ ├── .stow-local-ignore │ └── nushell │ │ ├── .gitignore │ │ ├── config.nu │ │ ├── env.nu │ │ └── scripts │ │ ├── dhd.nu │ │ └── g.nu ├── pam_env │ └── .pam_environment ├── picom │ └── picom │ │ └── picom.conf ├── pipewire │ ├── .gitignore │ └── pipewire │ │ ├── client.conf.d │ │ └── 10-chino.conf │ │ └── pipewire.conf.d │ │ └── 10-chino.conf ├── proto │ └── .proto │ │ ├── .prototools │ │ └── tools │ │ └── node │ │ └── globals │ │ └── bin │ │ └── .gitkeep ├── psd │ └── .config │ │ └── psd │ │ ├── .psd.conf │ │ └── psd.conf ├── pueue │ ├── .gitignore │ └── pueue │ │ └── pueue.yml ├── pulseaudio │ ├── .gitignore │ └── pulse │ │ ├── daemon.conf │ │ └── default.pa ├── rofi │ └── rofi │ │ └── config.rasi ├── root │ ├── etc │ │ ├── environment │ │ ├── modules-load.d │ │ │ ├── snd-seq-midi.conf │ │ │ └── virtualbox.conf │ │ ├── sysctl.d │ │ │ └── 10-ptrace.conf │ │ └── udev │ │ │ └── rules.d │ │ │ └── 99-writeintelbacklight.rules │ └── usr │ │ └── sbin │ │ └── writeintelbacklight.sh ├── sakura │ └── sakura │ │ └── sakura.conf ├── sapling │ └── sapling │ │ └── sapling.conf ├── sketchybar │ └── sketchybar │ │ ├── plugins │ │ ├── battery.sh │ │ ├── clock.sh │ │ ├── space.sh │ │ └── window_title.sh │ │ └── sketchybarrc ├── skhd │ └── skhd │ │ └── skhdrc ├── starship │ └── starship.toml ├── stow │ └── .stow-global-ignore ├── sway │ └── sway │ │ └── config ├── swayshot │ └── swayshot.sh ├── sxiv │ └── sxiv │ │ └── exec │ │ └── image-info ├── tealdeer │ └── tealdeer │ │ └── config.toml ├── tint2 │ └── tint2 │ │ └── tint2rc ├── tmux │ └── .tmux.conf ├── vscode │ ├── .stow-local-ignore │ └── User │ │ ├── .gitignore │ │ ├── keybindings.json │ │ └── settings.json ├── waybar │ └── waybar │ │ ├── config │ │ └── style.css ├── wezterm │ ├── program.home.nix │ └── wezterm │ │ └── wezterm.lua ├── yabai │ └── yabai │ │ ├── yabairc │ │ └── yabairc.yabai ├── zellij-macos │ └── zellij │ │ └── config.kdl └── zsh │ ├── .zshenv │ └── .zshrc ├── raycast-and-finder.md └── screenshots ├── amausaan_2022-04-05-232523.png ├── macbook_2024-12-19.png ├── toastx900_2021-07-30_13-00.png └── toastx900_2021-07-30_13-14.png /.directory: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Icon=/home/chino/kde-theme/icon/discrete/anime_icon_pack_21_by_reyhan06_by_reyhan06-d9n052e/ICO/256/Gochuumon wa Usagi Desu ka Second Season v5.ico 3 | 4 | [Dolphin] 5 | Timestamp=2017,8,3,12,38,12 6 | Version=4 7 | ViewMode=1 8 | 9 | [Settings] 10 | HiddenFilesShown=true 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # See: https://editorconfig.org/ 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | charset = utf-8 8 | indent_style = space 9 | indent_size = 2 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # To check a file's attributes, use: 2 | # git check-attr -a path/to/file 3 | 4 | # Linguist overrides 5 | /screenshots/** linguist-documentation 6 | /Brewfile* linguist-language=Ruby 7 | /*.json linguist-language=JSON 8 | 9 | # Text filters 10 | /packages/git/git/gitk filter=vanilla.gitk 11 | /packages/sway/sway/config filter=vanilla.sway 12 | /packages/htop/htop/htoprc filter=vanilla.htop 13 | /packages/npm/.npmrc filter=vanilla.npm 14 | /packages/vscode/User/settings.json filter=vanilla.code 15 | 16 | # Binary stuff 17 | *.png filter=lfs diff=lfs merge=lfs -text 18 | *.jpg filter=lfs diff=lfs merge=lfs -text 19 | *.jpeg filter=lfs diff=lfs merge=lfs -text 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS 2 | .DS_Store 3 | 4 | # brew bundle 5 | # https://github.com/Homebrew/homebrew-bundle?tab=readme-ov-file#versions-and-lockfiles 6 | Brewfile.lock.json 7 | 8 | # npm 9 | node_modules 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "conky/.conky/i3bar"] 2 | path = conky/.conky/i3bar 3 | url = https://github.com/frantic1048/conky-i3bar 4 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.12.3 -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.3.2 -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | // search 4 | "ast-grep.ast-grep-vscode", 5 | 6 | // lint and format 7 | "dbaeumer.vscode-eslint", 8 | "dprint.dprint", 9 | "esbenp.prettier-vscode", 10 | "foxundermoon.shell-format", 11 | "timonwong.shellcheck", 12 | 13 | // git 14 | "eamodio.gitlens", 15 | "waderyan.gitblame", 16 | 17 | // language 18 | "elves.elvish", 19 | "github.vscode-github-actions", 20 | "gitlab.gitlab-workflow", 21 | "grafana.vscode-jsonnet", 22 | "graphql.vscode-graphql", 23 | "hashicorp.terraform", 24 | "jnoortheen.nix-ide", 25 | "ms-vscode.vscode-typescript-next", 26 | "myriad-dreamin.tinymist", 27 | "redhat.vscode-xml", 28 | "redhat.vscode-yaml", 29 | "tamasfe.even-better-toml", 30 | "rust-lang.rust-analyzer", 31 | "thenuprojectcontributors.vscode-nushell-lang", 32 | "unifiedjs.vscode-mdx", 33 | "tintinweb.graphviz-interactive-preview", 34 | "yoavbls.pretty-ts-errors", 35 | 36 | // utils 37 | "streetsidesoftware.code-spell-checker", 38 | "tailscale.vscode-tailscale", 39 | "nicoespeon.abracadabra", 40 | "wayou.vscode-todo-highlight", 41 | "naumovs.color-highlight", 42 | "ms-playwright.playwright", 43 | 44 | // theme 45 | "emily-curry.base16-tomorrow-dark-vscode", 46 | "github.github-vscode-theme", 47 | "klyap.vscode-stardew-icon-theme", 48 | "teabyii.ayu", 49 | 50 | // keybindings 51 | "ms-vscode.atom-keybindings" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/bundle" 2 | tap "homebrew/services" 3 | 4 | # loading another Brewfile: https://github.com/Homebrew/homebrew-bundle/issues/521 5 | instance_eval(File.read("./Brewfile.makedep")) 6 | instance_eval(File.read("./Brewfile.font")) 7 | instance_eval(File.read("./Brewfile.desktop")) 8 | instance_eval(File.read("./Brewfile.util")) 9 | instance_eval(File.read("./Brewfile.app")) 10 | instance_eval(File.read("./Brewfile.vscode")) 11 | -------------------------------------------------------------------------------- /Brewfile.app: -------------------------------------------------------------------------------- 1 | tap "wez/wezterm" 2 | 3 | cask "google-chrome" 4 | cask "firefox@developer-edition" 5 | 6 | cask "karabiner-elements" 7 | cask "keepassxc" 8 | cask "keycastr" 9 | cask "keymapp" 10 | cask "rancher" 11 | cask "raycast" 12 | cask "sublime-merge" 13 | cask "visual-studio-code" 14 | 15 | # terminal emulators 16 | cask "alacritty" 17 | cask "kitty" 18 | cask "wezterm" 19 | cask "ghostty" 20 | 21 | # virtual machine 22 | cask "utm" 23 | 24 | cask "slack" 25 | 26 | # media player 27 | cask "vlc" 28 | 29 | cask "inkscape" 30 | 31 | cask "deeper" -------------------------------------------------------------------------------- /Brewfile.desktop: -------------------------------------------------------------------------------- 1 | tap "nikitabobko/tap" 2 | 3 | cask "linearmouse" 4 | cask "nikitabobko/tap/aerospace" 5 | 6 | # Using aerospace for now 7 | =begin 8 | tap "koekeishiya/formulae" 9 | brew "koekeishiya/formulae/skhd" 10 | brew "koekeishiya/formulae/yabai" 11 | 12 | tap "felixkratz/formulae" 13 | brew "felixkratz/formulae/sketchybar" 14 | =end 15 | -------------------------------------------------------------------------------- /Brewfile.font: -------------------------------------------------------------------------------- 1 | cask "font-fantasque-sans-mono-noloopk" 2 | cask "font-fontawesome" 3 | cask "font-hack-nerd-font" 4 | cask "font-jetbrains-mono-nerd-font" 5 | cask "font-jetbrains-mono" 6 | cask "font-symbols-only-nerd-font" 7 | cask "font-victor-mono" -------------------------------------------------------------------------------- /Brewfile.makedep: -------------------------------------------------------------------------------- 1 | # libs and build tools 2 | brew "pkg-config" 3 | brew "cairo" 4 | brew "pango" 5 | brew "libpng" 6 | brew "jpeg" 7 | brew "giflib" 8 | brew "librsvg" 9 | brew "pixman" 10 | -------------------------------------------------------------------------------- /Brewfile.util: -------------------------------------------------------------------------------- 1 | tap "hashicorp/tap" 2 | tap "vectordotdev/brew" 3 | 4 | # shell 5 | brew "elvish" 6 | brew "nushell" 7 | 8 | # macOS has very old versions of these tools 9 | # builtin rsync@2.6.9, Nov 2006 10 | brew "rsync" 11 | # builtin bash@3.2.57, Nov 2014 12 | brew "bash" 13 | # builtin make@3.81, Apr 2006 14 | brew "make" 15 | 16 | brew "actionlint" 17 | brew "bat" 18 | brew "coreutils" 19 | brew "difftastic" 20 | brew "eza" 21 | brew "fastfetch" 22 | brew "fd" 23 | brew "ffmpeg" 24 | brew "findutils" 25 | brew "freetype" 26 | brew "fzf" 27 | brew "gawk" 28 | brew "gh" 29 | brew "glab" 30 | brew "go-jsonnet" 31 | brew "graphviz" 32 | brew "harfbuzz" 33 | brew "neovim" 34 | brew "htop" 35 | brew "hyperfine" 36 | brew "imagemagick" 37 | brew "inxi" 38 | brew "jq" 39 | brew "ldns" 40 | brew "libqalculate" 41 | brew "librsvg" 42 | brew "marksman" 43 | brew "mise" 44 | brew "mtr" 45 | brew "ncdu" 46 | brew "onefetch" 47 | brew "pueue" 48 | brew "ripgrep" 49 | brew "scc" 50 | brew "shellcheck" 51 | brew "shfmt" 52 | brew "starship" 53 | brew "stow" 54 | brew "svgo" 55 | brew "tailscale" 56 | brew "tealdeer" 57 | brew "tesseract" 58 | brew "unar" 59 | brew "watchman" 60 | brew "webp" 61 | brew "ykman" 62 | brew "youtube-dl" 63 | cask "android-platform-tools" 64 | brew "ntopng" 65 | brew "ast-grep" 66 | brew "gnu-time" 67 | brew "optipng" 68 | 69 | # git and friends 70 | # brew "git" 71 | brew "git-lfs" 72 | cask "git-credential-manager" 73 | brew "git-delta" 74 | 75 | brew "curl" 76 | brew "wget" 77 | 78 | # JSON viewer 79 | brew "jless" 80 | 81 | # virtual machine 82 | # https://tart.run 83 | brew "cirruslabs/cli/tart" 84 | 85 | # terminal multiplexer 86 | brew "tmux" 87 | brew "zellij" 88 | 89 | # docker and friends 90 | brew "docker-slim" 91 | brew "tilt" 92 | brew "vector" 93 | brew "hashicorp/tap/terraform" 94 | brew "butane" 95 | brew "vultr/vultr-cli/vultr-cli" 96 | brew "s3cmd" 97 | brew "kubectl" 98 | brew "Azure/kubelogin/kubelogin" 99 | brew "kubectx" 100 | cask "ngrok" 101 | brew "cloudflared" 102 | brew "caddy" 103 | 104 | # resource monitoring 105 | brew "btop" 106 | 107 | brew "ipcalc" 108 | 109 | # TLS certificate for local development 110 | # https://github.com/FiloSottile/mkcert 111 | brew "mkcert" 112 | brew "nss" 113 | -------------------------------------------------------------------------------- /Brewfile.vscode: -------------------------------------------------------------------------------- 1 | vscode "dprint.dprint" 2 | vscode "elves.elvish" 3 | vscode "emily-curry.base16-tomorrow-dark-vscode" 4 | vscode "esbenp.prettier-vscode" 5 | vscode "foxundermoon.shell-format" 6 | vscode "github.copilot" 7 | vscode "github.copilot-chat" 8 | vscode "github.github-vscode-theme" 9 | vscode "github.vscode-github-actions" 10 | vscode "grafana.vscode-jsonnet" 11 | vscode "graphql.vscode-graphql" 12 | vscode "graphql.vscode-graphql-syntax" 13 | vscode "hashicorp.terraform" 14 | vscode "jnoortheen.nix-ide" 15 | vscode "klyap.vscode-stardew-icon-theme" 16 | vscode "meta.sapling-scm" 17 | vscode "mrmlnc.vscode-json5" 18 | vscode "ms-playwright.playwright" 19 | vscode "ms-python.debugpy" 20 | vscode "ms-python.isort" 21 | vscode "ms-python.python" 22 | vscode "ms-python.vscode-pylance" 23 | vscode "ms-toolsai.jupyter" 24 | vscode "ms-toolsai.jupyter-keymap" 25 | vscode "ms-toolsai.jupyter-renderers" 26 | vscode "ms-toolsai.vscode-jupyter-cell-tags" 27 | vscode "ms-toolsai.vscode-jupyter-slideshow" 28 | vscode "ms-vscode-remote.remote-containers" 29 | vscode "ms-vscode-remote.remote-ssh" 30 | vscode "ms-vscode-remote.remote-ssh-edit" 31 | vscode "ms-vscode-remote.remote-wsl" 32 | vscode "ms-vscode-remote.vscode-remote-extensionpack" 33 | vscode "ms-vscode.atom-keybindings" 34 | vscode "ms-vscode.remote-explorer" 35 | vscode "ms-vscode.remote-server" 36 | vscode "ms-vscode.vscode-typescript-next" 37 | vscode "naumovs.color-highlight" 38 | vscode "nicoespeon.abracadabra" 39 | vscode "redhat.vscode-xml" 40 | vscode "redhat.vscode-yaml" 41 | vscode "rust-lang.rust-analyzer" 42 | vscode "styled-components.vscode-styled-components" 43 | vscode "tailscale.vscode-tailscale" 44 | vscode "tamasfe.even-better-toml" 45 | vscode "teabyii.ayu" 46 | vscode "thenuprojectcontributors.vscode-nushell-lang" 47 | vscode "timonwong.shellcheck" 48 | vscode "tintinweb.graphviz-interactive-preview" 49 | vscode "unifiedjs.vscode-mdx" 50 | vscode "waderyan.gitblame" 51 | vscode "wayou.vscode-todo-highlight" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2024 Jiahao Guo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | let content = $"# 𝒱𝒶𝓃𝒾𝓁𝓁𝒶 4 | 5 | frantic1048's daily configs, scripts etc. 6 | 7 | ## Screenshots 8 | 9 | _Sway_: 10 | 11 | ![toastx900]\(screenshots/toastx900_2021-07-30_13-00.png) 12 | ![toastx900]\(screenshots/toastx900_2021-07-30_13-14.png) 13 | 14 | _i3_: 15 | 16 | ![amausaan]\(screenshots/amausaan_2022-04-05-232523.png) 17 | 18 | _macOS_: 19 | 20 | ![macos_screenshot]\(screenshots/macbook_2024-12-19.png) 21 | 22 | ## Config packages 23 | 24 | (./blend stat_markdown) 25 | 26 | ## Usage 27 | 28 | ### All in one 29 | 30 | #### macOS 31 | 32 | Require following dependencies in `PATH`: 33 | 34 | 1. `git`: https://git-scm.com/ 35 | 2. `bash`: https://www.gnu.org/software/bash/ 36 | 3. `curl`: https://curl.se/ 37 | 38 | ```sh 39 | # necessary for git 40 | sudo xcode-select --install 41 | 42 | git clone https://github.com/frantic1048/Vanilla.git 43 | cd Vanilla 44 | 45 | ./bootstrap_macos.sh 46 | ``` 47 | 48 | ### Install standalone config package\(s) 49 | 50 | Require following dependencies in `PATH`: 51 | 52 | 1. `git`: https://git-scm.com/ 53 | 2. `stow`: https://www.gnu.org/software/stow/ 54 | 3. `nu`: https://www.nushell.sh/ 55 | 56 | ```sh 57 | ./blend install [package1] [package2] ... 58 | 59 | # install all available packages 60 | ./blend install 61 | ``` 62 | " 63 | 64 | $content | save --force README.md -------------------------------------------------------------------------------- /blend.test.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | use std assert 4 | use blend_util [expand_package_dir, is_git_ignored, log] 5 | 6 | cd $env.FILE_PWD 7 | 8 | def describe (title, block) { 9 | log info -i $"($title)" 10 | do $block 11 | } 12 | def it (title, block) { 13 | log info $" ($title)" 14 | do $block 15 | } 16 | 17 | describe "expand_package_dir()" { 18 | it "Expand to directory when multiple files are present" { 19 | assert equal (expand_package_dir "vscode") "packages/vscode/User" 20 | } 21 | it "Expand to file when only one file is present" { 22 | assert equal (expand_package_dir "sway") "packages/sway/sway/config" 23 | } 24 | it "Support filtering non git files" { 25 | assert equal (expand_package_dir "pueue") "packages/pueue/pueue/pueue.yml" 26 | } 27 | } 28 | 29 | describe "is_git_ignored()" { 30 | it "Ignore .DS_Store" { 31 | assert equal (is_git_ignored ".DS_Store") true 32 | } 33 | it "Don't ignore pueue.yml" { 34 | assert equal (is_git_ignored "packages/pueue/pueue/pueue.yml") false 35 | } 36 | } 37 | 38 | describe "blend readme" { 39 | it "Benchmark" { 40 | hyperfine --warmup 3 $"./blend readme" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /blend_util: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | # How to wrap an external command 4 | # https://github.com/nushell/nushell/issues/7758#issuecomment-2097184688 5 | # How to wrap an internal command with flags ??? 6 | 7 | # Possible levels of logging: 8 | # - debug 9 | # - info 10 | # - warning 11 | # - error 12 | # - critical 13 | # - success 14 | # https://www.nushell.sh/book/stdout_stderr_exit_codes.html#echo-print-and-log-commands 15 | export def log [ 16 | level: string, 17 | --important (-i), 18 | message: string] { 19 | # check usable ansi styles 20 | # ansi -l 21 | let color = match $level { 22 | "debug" => "white_dimmed" 23 | "info" => { 24 | match $important { 25 | true => "default" 26 | _ => "default_dimmed" 27 | }} 28 | "warn" => { 29 | match $important { 30 | true => "light_yellow" 31 | _ => "yellow" 32 | }} 33 | "error" => { 34 | match $important { 35 | true => "light_red" 36 | _ => "red" 37 | }} 38 | "success" => { 39 | match $important { 40 | true => "light_green" 41 | _ => "green" 42 | }} 43 | _ => "reset" 44 | } 45 | print $"(ansi $color)($message)(ansi reset)" 46 | } 47 | 48 | export def print_heading [ 49 | variant: string, 50 | title: string 51 | ] { 52 | match $variant { 53 | "note" => { 54 | print $"(ansi bg_green)(ansi --escape { fg: '#ffffff' })(ansi attr_bold) ($title) (ansi reset)(ansi green)(char nf_left_segment)(ansi reset)" 55 | } 56 | "info" => { 57 | print $"(ansi bg_light_blue)(ansi --escape { fg: '#ffffff' })(ansi attr_bold) ⬝($title) (ansi reset)(ansi light_blue)(char nf_left_segment)(ansi reset)" 58 | } 59 | _ => { 60 | print $"($title)" 61 | } 62 | } 63 | } 64 | 65 | export const git_files = [ 66 | .gitignore 67 | .gitattributes 68 | .gitmodules 69 | ] 70 | 71 | export def get_package_base_dir []: nothing -> string { 72 | $env.FILE_PWD | path join "packages" 73 | } 74 | 75 | export def is_git_ignored [path: string]: nothing -> bool { 76 | # FIXME: this method is not very efficient but works for now 77 | do { git check-ignore $path} | complete | get exit_code | $in == 0 78 | } 79 | 80 | export def expand_package_dir [package_dir: string] { 81 | def expand_inner [dir] { 82 | let dir_contents = (ls $dir | where name not-in $git_files and not (is_git_ignored $it.name)) 83 | if ($dir_contents | length) == 1 { 84 | let first_item = ($dir_contents | first) 85 | if ($first_item.type == "dir") { 86 | # MEMO: nushell `ls` is not the same as system's `ls` 87 | # @see https://www.nushell.sh/commands/docs/ls.html 88 | expand_inner $first_item.name 89 | } else { 90 | $first_item.name 91 | } 92 | } else { 93 | $dir 94 | } 95 | } 96 | 97 | expand_inner (get_package_base_dir | path relative-to $env.FILE_PWD | path join $package_dir) 98 | } 99 | -------------------------------------------------------------------------------- /bootstrap_archlinux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | function handle_exit { 5 | echo "Finished" 6 | } 7 | trap handle_exit EXIT 8 | 9 | self_path="$(command -v "$0")" 10 | self_dir="$(dirname "$self_path")" 11 | 12 | # Install pacman packages 13 | 14 | # MEMO: 15 | # At this point, we have nushell and elvish. 16 | # We could move following steps to nushell or elvish scripts 17 | # with better error handling. 18 | 19 | # Install dotfiles 20 | "$self_dir/blend" 21 | 22 | # Install proto 23 | # https://moonrepo.dev/docs/proto/install 24 | curl -fsSL https://moonrepo.dev/install/proto.sh | bash -s -- --yes --no-profile 25 | 26 | # Temporary make proto available in the current shell 27 | export PATH="$HOME/.proto/bin:$PATH" 28 | # Generate shims based on config from ~/.proto/.prototools 29 | proto regen 30 | 31 | # MEMO: VSCode settings sync 32 | 33 | # MEMO: Change default shell to elvish 34 | # which elvish | sudo tee -a /etc/shells 35 | chsh -s "$(which elvish)" 36 | 37 | # TODO: Configure git for ~/work 38 | # Copy config.user.work.example to config.user.work and edit it 39 | 40 | git credential-manager configure 41 | 42 | # TODO: chmod +i shell rc files to prevent external modification 43 | -------------------------------------------------------------------------------- /bootstrap_macos.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | function handle_exit { 5 | echo "Finished" 6 | } 7 | trap handle_exit EXIT 8 | 9 | self_path="$(command -v "$0")" 10 | self_dir="$(dirname "$self_path")" 11 | 12 | # FIXME: install Xcode Command Line Tools 13 | # 14 | # We are in a git repo, need git to clone the repo first. 15 | # So this step needs to be done manually before running this script 16 | # 17 | # xcode-select --install 18 | 19 | # Install Homebrew 20 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 21 | 22 | # Add necessary Homebrew environment variables 23 | UNAME_MACHINE="$(uname -m)" 24 | if [[ "${UNAME_MACHINE}" == "arm64" ]]; then 25 | # On ARM macOS 26 | eval "$(/opt/homebrew/bin/brew shellenv)" 27 | else 28 | # On Intel macOS 29 | eval "$(/usr/local/bin/brew shellenv)" 30 | fi 31 | 32 | if [[ "${UNAME_MACHINE}" == "arm64" ]]; then 33 | softwareupdate --install-rosetta --agree-to-license 34 | fi 35 | 36 | brew analytics off 37 | 38 | # Install Homebrew packages 39 | brew bundle install 40 | 41 | # MEMO: 42 | # At this point, we have nushell and elvish. 43 | # We could move following steps to nushell or elvish scripts 44 | # with better error handling. 45 | 46 | # Install dotfiles 47 | "$self_dir/blend" install 48 | 49 | # Install proto 50 | # https://moonrepo.dev/docs/proto/install 51 | curl -fsSL 'https://moonrepo.dev/install/proto.sh' | bash -s -- --yes --no-profile 52 | 53 | # Temporary make proto available in the current shell 54 | export PATH="$HOME/.proto/bin:$PATH" 55 | # Generate shims based on config from ~/.proto/.prototools 56 | proto regen 57 | 58 | # TODO: install gpg(GnuPG for OS X) 59 | # https://sourceforge.net/p/gpgosx/docu/Download/ 60 | 61 | # MEMO: Change default shell to elvish 62 | which elvish | sudo tee -a /etc/shells 63 | chsh -s "$(which elvish)" 64 | 65 | # TODO: Configure git for ~/work 66 | # Copy config.user.work.example to config.user.work and edit it 67 | 68 | git credential-manager configure 69 | 70 | # TODO: Pointer size: very large 71 | # System Preferences -> Accessibility -> Display -> Pointer 72 | 73 | echo "To configure Raycast" 74 | echo "See https://manual.raycast.com/hotkey" 75 | echo "To disable Spotlight indexing for all volumes, run:" 76 | echo "sudo mdutil -a -i off" 77 | 78 | # https://stackoverflow.com/questions/15769615/remove-last-login-message-for-new-tabs-in-terminal 79 | touch ~/.hushlogin 80 | 81 | # MEMO: Prevent any external program from messing with these files 82 | chflags uimmutable ~/.config/elvish/rc.elv ~/.zshrc ~/.zshenv ~/.bashrc ~/.profile ~/.hushlogin 83 | # `chflags nouimmutable ` for temporary editing 84 | 85 | "$self_dir/macos_config.sh" 86 | -------------------------------------------------------------------------------- /macos_config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ################ 4 | # macOS config 5 | ################ 6 | 7 | # Close any open System Preferences panes, to prevent them from overriding 8 | # settings we’re about to change 9 | osascript -e 'tell application "System Preferences" to quit' 10 | 11 | # references: 12 | # https://github.com/mathiasbynens/dotfiles/blob/main/.macos 13 | 14 | # MEMO: macOS debug menu 15 | defaults write -g _NS_4445425547 -bool true 16 | 17 | # ------------ 18 | # Input device 19 | # ------------ 20 | # fast keyboard repeat rate 21 | defaults write NSGlobalDomain KeyRepeat -int 1 22 | defaults write NSGlobalDomain InitialKeyRepeat -int 10 23 | 24 | # Disable “natural” (Lion-style) scrolling 25 | defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false 26 | 27 | # Trackpad: tab to click 28 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 29 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 30 | 31 | # ----------- 32 | # Finder 33 | # ----------- 34 | # Finder: show status bar 35 | defaults write com.apple.finder ShowStatusBar -bool true 36 | 37 | # Finder: show path bar 38 | defaults write com.apple.finder ShowPathbar -bool true 39 | 40 | # Finder: show all filename extensions 41 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 42 | 43 | # Finder: Keep folders on top when sorting by name 44 | defaults write com.apple.finder _FXSortFoldersFirst -bool true 45 | 46 | # Disable the warning when changing a file extension 47 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 48 | 49 | # Avoid creating .DS_Store files on network or USB volumes 50 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 51 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 52 | 53 | # ----------- 54 | # Safari 55 | # ----------- 56 | 57 | # Enable the Develop menu and the Web Inspector in Safari 58 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 59 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 60 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true 61 | 62 | # Add a context menu item for showing the Web Inspector in web views 63 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 64 | 65 | # ------------------------------------- 66 | # Activate settings of `defaults write` 67 | # ------------------------------------- 68 | defaults write com.apple.activatesettings log true 69 | /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u 70 | -------------------------------------------------------------------------------- /packages/.gitignore: -------------------------------------------------------------------------------- 1 | *.AppImage 2 | 3 | /darwin-system/result 4 | 5 | #dolphin 6 | .directory 7 | !/.directory 8 | !/bin/bin/.directory 9 | 10 | # atom 11 | /atom/* 12 | !/atom/.atom 13 | /atom/.atom/* 14 | !/atom/.atom/.apmrc 15 | !/atom/.atom/keymap.cson 16 | !/atom/.atom/styles.less 17 | 18 | # color 19 | /color/* 20 | !/color/DisplayCAL 21 | /color/DisplayCAL/* 22 | !/color/DisplayCAL/storage 23 | /color/DisplayCAL/storage/* 24 | !/color/DisplayCAL/storage/*/ 25 | /color/DisplayCAL/storage/*/* 26 | !/color/DisplayCAL/storage/*/*.icc 27 | 28 | # krita 29 | /krita/.local/* 30 | !/krita/.local/share 31 | /krita/.local/share/* 32 | !/krita/.local/share/krita 33 | 34 | # Proto 35 | /proto/* 36 | !/proto/.proto 37 | /proto/.proto/* 38 | !/proto/.proto/.prototools 39 | 40 | !/proto/.proto/tools 41 | /proto/.proto/tools/* 42 | !/proto/.proto/tools/node 43 | /proto/.proto/tools/node/* 44 | !/proto/.proto/tools/node/globals 45 | /proto/.proto/tools/node/globals/* 46 | !/proto/.proto/tools/node/globals/bin 47 | /proto/.proto/tools/node/globals/bin/* 48 | !/proto/.proto/tools/node/globals/bin/.gitkeep 49 | -------------------------------------------------------------------------------- /packages/X/.xprofile: -------------------------------------------------------------------------------- 1 | #export LANG=zh_CN.utf-8 2 | export GTK_IM_MODULE=fcitx 3 | export QT_IM_MODULE=fcitx 4 | export XMODIFIERS=@im=fcitx 5 | #export XDG_CURRENT_DESKTOP=KDE 6 | XDG_MENU_PREFIX=plasma- 7 | #export QT_QPA_PLATFORMTHEME=qt6ct 8 | export QT_STYLE_OVERRIDE=kvantum 9 | export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" 10 | 11 | #export QT_AUTO_SCREEN_SCALE_FACTOR=1 12 | export QT_FONT_DPI=144 13 | -------------------------------------------------------------------------------- /packages/aerospace/aerospace/aerospace.toml: -------------------------------------------------------------------------------- 1 | # Reference: https://github.com/i3/i3/blob/next/etc/config 2 | 3 | enable-normalization-flatten-containers = false 4 | enable-normalization-opposite-orientation-for-nested-containers = false 5 | 6 | [workspace-to-monitor-force-assignment] 7 | # FIXME: not work with multiple monitors in same name 8 | # 1 = 'DELL P2723QE (2)' 9 | # 2 = 'DELL P2723QE (1)' 10 | 1 = 1 11 | 2 = 3 12 | 3 = 'built-in' 13 | 14 | [mode.main.binding] 15 | alt-enter = 'exec-and-forget /Applications/kitty.app/Contents/MacOS/kitty --single-instance ~' 16 | 17 | alt-n = 'focus left' 18 | alt-e = 'focus down' 19 | alt-i = 'focus up' 20 | alt-o = 'focus right' 21 | 22 | alt-shift-n = 'move left' 23 | alt-shift-e = 'move down' 24 | alt-shift-i = 'move up' 25 | alt-shift-o = 'move right' 26 | 27 | alt-h = 'split horizontal' 28 | alt-v = 'split vertical' 29 | 30 | alt-f = 'fullscreen' 31 | 32 | alt-s = 'layout v_accordion' # 'layout stacking' in i3 33 | alt-t = 'layout h_accordion' # 'layout tabbed' in i3 34 | alt-p = 'layout tiles horizontal vertical' # 'layout toggle split' in i3 35 | 36 | alt-shift-space = 'layout floating tiling' # 'floating toggle' in i3 37 | 38 | # Not supported, because this command is redundant in AeroSpace mental model. 39 | # See: https://nikitabobko.github.io/AeroSpace/guide#floating-windows 40 | # alt-space = 'focus toggle_tiling_floating' 41 | 42 | # `focus parent`/`focus child` are not yet supported, and it's not clear whether they 43 | # should be supported at all https://github.com/nikitabobko/AeroSpace/issues/5 44 | # alt-a = 'focus parent' 45 | 46 | alt-1 = 'workspace 1' 47 | alt-2 = 'workspace 2' 48 | alt-3 = 'workspace 3' 49 | alt-4 = 'workspace 4' 50 | alt-5 = 'workspace 5' 51 | alt-6 = 'workspace 6' 52 | alt-7 = 'workspace 7' 53 | alt-8 = 'workspace 8' 54 | alt-9 = 'workspace 9' 55 | alt-0 = 'workspace 10' 56 | 57 | alt-shift-1 = 'move-node-to-workspace 1' 58 | alt-shift-2 = 'move-node-to-workspace 2' 59 | alt-shift-3 = 'move-node-to-workspace 3' 60 | alt-shift-4 = 'move-node-to-workspace 4' 61 | alt-shift-5 = 'move-node-to-workspace 5' 62 | alt-shift-6 = 'move-node-to-workspace 6' 63 | alt-shift-7 = 'move-node-to-workspace 7' 64 | alt-shift-8 = 'move-node-to-workspace 8' 65 | alt-shift-9 = 'move-node-to-workspace 9' 66 | alt-shift-0 = 'move-node-to-workspace 10' 67 | 68 | alt-shift-c = 'reload-config' 69 | 70 | alt-r = 'mode resize' 71 | 72 | [mode.resize.binding] 73 | n = 'resize width -50' 74 | e = 'resize height +50' 75 | i = 'resize height -50' 76 | o = 'resize width +50' 77 | enter = 'mode main' 78 | esc = 'mode main' 79 | 80 | # Window rules 81 | # https://nikitabobko.github.io/AeroSpace/guide#callbacks 82 | # 83 | # To get app-id: 84 | # - https://nikitabobko.github.io/AeroSpace/goodness#popular-apps-ids 85 | # - `aerospace list-apps` 86 | [[on-window-detected]] 87 | if.app-id = 'com.todoist.mac.Todoist' 88 | run = ['layout floating', 'move-node-to-workspace 3'] 89 | 90 | [[on-window-detected]] 91 | if.app-id = 'com.apple.MobileSMS' 92 | run = ['move-node-to-workspace 3'] 93 | 94 | [[on-window-detected]] 95 | if.app-id = 'com.apple.Music' 96 | run = ['move-node-to-workspace 3'] 97 | 98 | [[on-window-detected]] 99 | if.app-id = 'com.apple.AppStore' 100 | run = ['layout floating', 'move-node-to-workspace 3'] 101 | 102 | [[on-window-detected]] 103 | if.app-id = 'io.zsa.keymapp' 104 | run = ['layout floating'] 105 | 106 | [[on-window-detected]] 107 | if.window-title-regex-substring = '^Playwright Inspector$' 108 | run = ['move-node-to-workspace 3'] 109 | -------------------------------------------------------------------------------- /packages/alacritty-macos/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [window] 2 | decorations = "Buttonless" 3 | opacity = 0.7 4 | 5 | [font] 6 | size = 12.0 7 | 8 | [font.bold] 9 | family = "JetBrains Mono" 10 | style = "Bold" 11 | 12 | [font.bold_italic] 13 | family = "Jetbrains Mono" 14 | style = "Bold Italic" 15 | 16 | [font.italic] 17 | family = "Jetbrains Mono" 18 | style = "Italic" 19 | 20 | [font.normal] 21 | family = "Jetbrains Mono" 22 | style = "Regular" 23 | 24 | # How to easily clear all bindings ? 25 | [bindings] 26 | -------------------------------------------------------------------------------- /packages/alacritty/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [terminal.shell] 2 | program = "/usr/bin/env" 3 | args = ["elvish"] 4 | 5 | [window] 6 | decorations = "None" 7 | opacity = 0.7 8 | 9 | [font] 10 | size = 12.0 11 | 12 | [font.bold] 13 | family = "JetBrains Mono" 14 | style = "Bold" 15 | 16 | [font.bold_italic] 17 | family = "Jetbrains Mono" 18 | style = "Bold Italic" 19 | 20 | [font.italic] 21 | family = "Jetbrains Mono" 22 | style = "Italic" 23 | 24 | [font.normal] 25 | family = "Jetbrains Mono" 26 | style = "Regular" 27 | 28 | [terminal] 29 | -------------------------------------------------------------------------------- /packages/alacritty/program.home.nix: -------------------------------------------------------------------------------- 1 | let 2 | extraConfig = builtins.readFile .config/alacritty/alacritty.yml; 3 | in 4 | { 5 | programs.alacritty = { 6 | enable = false; 7 | settings = rec { 8 | env.TERM = "xterm-256color"; 9 | dpi.x = 96.0; 10 | dpi.y = 96.0; 11 | draw_bold_text_with_bright_colors = true; 12 | font.size = 10; 13 | font.normal.family = "Victor Mono"; 14 | font.normal.style = "Regular"; 15 | font.bold.family = font.normal.family; 16 | font.bold.style = "Regular"; 17 | font.italic.family = font.normal.family; 18 | font.italic.style = "Regular"; 19 | colors = { 20 | # Default colors 21 | primary = { 22 | background = "#000000"; 23 | foreground = "#c5c8c6"; 24 | }; 25 | 26 | # Colors the cursor will use if `custom_cursor_colors` is true 27 | cursor = { 28 | text = "#1d1f21"; 29 | cursor = "#ffffff"; 30 | }; 31 | 32 | # Normal colors 33 | normal = { 34 | black = "#1d1f21"; 35 | red = "#cc6666"; 36 | green = "#b5bd68"; 37 | yellow = "#e6c547"; 38 | blue = "#81a2be"; 39 | magenta = "#b294bb"; 40 | cyan = "#70c0ba"; 41 | white = "#373b41"; 42 | }; 43 | 44 | # Bright colors 45 | bright = { 46 | black = "#aaaaaa"; 47 | red = "#ff3334"; 48 | green = "#9ec400"; 49 | yellow = "#f0c674"; 50 | blue = "#81a2be"; 51 | magenta = "#b77ee0"; 52 | cyan = "#54ced6"; 53 | white = "#282a2e"; 54 | }; 55 | }; 56 | }; 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /packages/alsa/.asoundrc: -------------------------------------------------------------------------------- 1 | defaults.pcm.rate_converter "speexrate_best" 2 | -------------------------------------------------------------------------------- /packages/atom/.atom/.apmrc: -------------------------------------------------------------------------------- 1 | http-proxy=http://127.0.0.1:8118 2 | strict-ssl=false 3 | -------------------------------------------------------------------------------- /packages/atom/.atom/keymap.cson: -------------------------------------------------------------------------------- 1 | 'atom-workspace': 2 | # 'ctrl-alt-o': 'unset!' 3 | 'ctrl-alt-o': 'application:add-project-folder' 4 | 'ctrl-|': 'symbols-tree-view:toggle' 5 | 'alt-s': 'window:save-all' 6 | 7 | '.platform-linux': 8 | # disable default keybinding resolver 9 | 'ctrl-.': 'unset!' 10 | 11 | 'atom-text-editor:not([mini])': 12 | # 'ctrl-e': 'unset!' 13 | 'ctrl-e' : 'emmet:expand-abbreviation' 14 | 'f10' : 'editor:toggle-soft-wrap' # soft wrap trigger like Kate 15 | 'alt-[': 'tern:definition' 16 | 'alt-]': 'tern:markerCheckpointBack' 17 | 'alt-l': 'tern:references' 18 | 'alt-r': 'tern:rename' 19 | 'alt-p': 'tern:documentation' 20 | 'alt-;': 'tern:startCompletion' 21 | 'ctrl-.': 'linter-tslint:fix-file' 22 | 'ctrl-,': 'prettier:format' 23 | -------------------------------------------------------------------------------- /packages/atom/.atom/styles.less: -------------------------------------------------------------------------------- 1 | atom-workspace, 2 | html { 3 | background-color: rgba(0, 0, 0, 0.2); 4 | // background-color: #333; 5 | } 6 | 7 | // atom-text-editor::shadow .leading-whitespace { 8 | // background-image: url('/var/sora/fixtures/119-1.png'); 9 | // background-size: contain; 10 | // background-repeat:no-repeat; 11 | // background-position: center; 12 | // } 13 | 14 | // FIX settings-view overflow 15 | .settings-view { 16 | overflow: auto; 17 | } 18 | 19 | // syntax fonts 20 | .syntax--class.syntax--name { 21 | font-family: "Montaga"; 22 | } 23 | 24 | .syntax--variable { 25 | // font-family: "Neucha"; 26 | // font-family: 'Almendra'; 27 | // font-family: 'Alike Angular'; 28 | // font-family: 'Simonetta'; 29 | font-family: "Federant"; 30 | } 31 | 32 | .syntax--entity.syntax--name.syntax--function, 33 | .syntax--support.syntax--function.syntax--dom { 34 | font-family: "Kavivanar"; 35 | } 36 | 37 | .syntax--constant { 38 | // font-family: "Neucha"; 39 | font-family: "Metamorphous"; 40 | font-weight: bolder; 41 | } 42 | 43 | // Term3 customization 44 | // .term3 .terminal { 45 | // background: transparent !important; 46 | // // background: rgba(0,0,0,0.5) !important; 47 | // } 48 | 49 | // @global-font:"Source Han Sans SC Light","文泉驿等宽微米黑","Symbolla",sans-serif; 50 | // @markdown-preview-general-font:"Source Han Sans SC Light","文泉驿等宽微米黑","Symbolla",sans-serif; 51 | // @markdown-preview-code-font:"Droid Sans Mono", "文泉驿等宽微米黑","Symbolla", monospace; 52 | // 53 | // #cursor-bg{ 54 | // background-image:url("/home/chino/Media/pic/sACG/chibi/chino_kafuu___gochuumon_wa_usagi_desu_ka__by_vforvu-d8kzzcy.small.png"); 55 | // // background-image:url("/home/chino/Media/pic/sACG/chibi/Rewrite Icons/1.png"); 56 | // background-position: center center; 57 | // background-size: contain; 58 | // background-repeat: no-repeat; 59 | // } 60 | // 61 | // // cursor related animation 62 | // // just justify to fit the animation pic 63 | // @keyframes cursor_pic_float { 64 | // from{ 65 | // bottom:-2.2em; 66 | // } 67 | // to{ 68 | // bottom:-1.6rem; 69 | // } 70 | // } 71 | // 72 | // @keyframes cursor_pic_flash { 73 | // from{ 74 | // transform:scale(1); 75 | // opacity:0.9; 76 | // } 77 | // to{ 78 | // transform:scale(1.6); 79 | // opacity:0; 80 | // } 81 | // } 82 | // 83 | // 84 | // // cursor styling 85 | // atom-text-editor::shadow{ 86 | // .cursors{ 87 | // .cursor{ 88 | // &::after, 89 | // &::before{ 90 | // position: absolute; 91 | // left: 10rem; 92 | // bottom: -2.2rem; 93 | // width: 10rem; 94 | // height:10rem; 95 | // display: block; 96 | // color:white; 97 | // content: "\200b"; 98 | // #cursor-bg(); 99 | // transition:all 1s ease; 100 | // } 101 | // &::before{ 102 | // animation: 1.3s alternate infinite ease-in-out cursor_pic_float; 103 | // } 104 | // &::after{ 105 | // animation: 1.3s alternate infinite ease-in-out cursor_pic_float, 106 | // 1s normal infinite ease cursor_pic_flash; 107 | // } 108 | // } 109 | // &.blink-off{ 110 | // .cursor{ 111 | // opacity: 1; 112 | // background: rgba(0,0,0,0); 113 | // box-shadow: 0 0 3px rgba(0,0,0,0); 114 | // } 115 | // } 116 | // } 117 | // } 118 | -------------------------------------------------------------------------------- /packages/bash/.bashrc: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # non-login interactive shells 3 | eval "$(starship init bash)" 4 | -------------------------------------------------------------------------------- /packages/bash/.profile: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | eval "$(~/bin/shellenv)" 3 | -------------------------------------------------------------------------------- /packages/bat/bat/config: -------------------------------------------------------------------------------- 1 | # `bat --list-themes` 2 | --theme="gruvbox-dark" 3 | 4 | # Uncomment the following line if you are using less version >= 551 and want to 5 | # enable mouse scrolling support in `bat` when running inside tmux. This might 6 | # disable text selection, unless you press shift. 7 | #--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" 8 | 9 | # no line number 10 | --style="plain" 11 | -------------------------------------------------------------------------------- /packages/bin/bin/.directory: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Icon=/home/chino/kde-theme/icon/discrete/anime_icon_pack_17_by_reyhan06_by_reyhan06-d8og483/PNG/512/Shakugan no Shana v2.png 3 | 4 | [Dolphin] 5 | HeaderColumnWidths=249,84,114 6 | Timestamp=2017,5,6,22,23,13 7 | Version=4 8 | ViewMode=1 9 | 10 | [Settings] 11 | HiddenFilesShown=true 12 | -------------------------------------------------------------------------------- /packages/bin/bin/blend: -------------------------------------------------------------------------------- 1 | ../../../blend -------------------------------------------------------------------------------- /packages/bin/bin/clean-elvish-directory-history.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | # clear invalid directories from elvish directory history 4 | 5 | # FIXME: 6 | # The store: module provides access to Elvish’s persistent data store. It is only available in interactive mode now. 7 | # 8 | # do this to call the script: 9 | # eval (slurp <~/bin/clean-elvish-directory-history.elv) 10 | 11 | use store 12 | use path 13 | 14 | put (store:dirs) | each {|dir| 15 | if (not (path:is-dir $dir[path])) { 16 | echo found invalid dir: $dir[path] 17 | store:del-dir $dir[path] 18 | } 19 | } -------------------------------------------------------------------------------- /packages/bin/bin/compton-convgen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # vim:fileencoding=utf-8 4 | 5 | import math 6 | import argparse 7 | 8 | 9 | class CGError(Exception): 10 | '''An error in the convolution kernel generator.''' 11 | def __init__(self, desc): 12 | super().__init__(desc) 13 | 14 | 15 | class CGBadArg(CGError): 16 | '''An exception indicating an invalid argument has been passed to the 17 | convolution kernel generator.''' 18 | pass 19 | 20 | 21 | def mbuild(width, height): 22 | """Build a NxN matrix filled with 0.""" 23 | result = list() 24 | for i in range(height): 25 | result.append(list()) 26 | for j in range(width): 27 | result[i].append(0.0) 28 | return result 29 | 30 | 31 | def mdump(matrix): 32 | """Dump a matrix in natural format.""" 33 | for col in matrix: 34 | print("[ ", end='') 35 | for ele in col: 36 | print(format(ele, "13.6g") + ", ", end=" ") 37 | print("],") 38 | 39 | 40 | def mdumpcompton(matrix): 41 | """Dump a matrix in compton's format.""" 42 | width = len(matrix[0]) 43 | height = len(matrix) 44 | print("{},{},".format(width, height), end='') 45 | for i in range(height): 46 | for j in range(width): 47 | if int(height / 2) == i and int(width / 2) == j: 48 | continue 49 | print(format(matrix[i][j], ".6f"), end=",") 50 | print() 51 | 52 | 53 | def mnormalize(matrix): 54 | """Scale a matrix according to the value in the center.""" 55 | width = len(matrix[0]) 56 | height = len(matrix) 57 | factor = 1.0 / matrix[int(height / 2)][int(width / 2)] 58 | if 1.0 == factor: 59 | return matrix 60 | for i in range(height): 61 | for j in range(width): 62 | matrix[i][j] *= factor 63 | return matrix 64 | 65 | 66 | def mmirror4(matrix): 67 | """Do a 4-way mirroring on a matrix from top-left corner.""" 68 | width = len(matrix[0]) 69 | height = len(matrix) 70 | for i in range(height): 71 | for j in range(width): 72 | x = min(i, height - 1 - i) 73 | y = min(j, width - 1 - j) 74 | matrix[i][j] = matrix[x][y] 75 | return matrix 76 | 77 | 78 | def gen_gaussian(width, height, factors): 79 | """Build a Gaussian blur kernel.""" 80 | 81 | if width != height: 82 | raise CGBadArg("Cannot build an uneven Gaussian blur kernel.") 83 | 84 | size = width 85 | sigma = float(factors.get('sigma', 0.84089642)) 86 | 87 | result = mbuild(size, size) 88 | for i in range(int(size / 2) + 1): 89 | for j in range(int(size / 2) + 1): 90 | diffx = i - int(size / 2) 91 | diffy = j - int(size / 2) 92 | result[i][j] = 1.0 / (2 * math.pi * sigma) \ 93 | * pow(math.e, - (diffx * diffx + diffy * diffy) \ 94 | / (2 * sigma * sigma)) 95 | mnormalize(result) 96 | mmirror4(result) 97 | 98 | return result 99 | 100 | 101 | def gen_box(width, height, factors): 102 | """Build a box blur kernel.""" 103 | result = mbuild(width, height) 104 | for i in range(height): 105 | for j in range(width): 106 | result[i][j] = 1.0 107 | return result 108 | 109 | 110 | def _gen_invalid(width, height, factors): 111 | '''Handle a convolution kernel generation request of an unrecognized type.''' 112 | raise CGBadArg("Unknown kernel type.") 113 | 114 | 115 | def _args_readfactors(lst): 116 | """Parse the factor arguments.""" 117 | factors = dict() 118 | if lst: 119 | for s in lst: 120 | res = s.partition('=') 121 | if not res[0]: 122 | raise CGBadArg("Factor has no key.") 123 | if not res[2]: 124 | raise CGBadArg("Factor has no value.") 125 | factors[res[0]] = float(res[2]) 126 | return factors 127 | 128 | 129 | def _parse_args(): 130 | '''Parse the command-line arguments.''' 131 | 132 | parser = argparse.ArgumentParser(description='Build a convolution kernel.') 133 | parser.add_argument('type', help='Type of convolution kernel. May be "gaussian" (factor sigma = 0.84089642) or "box".') 134 | parser.add_argument('width', type=int, help='Width of convolution kernel. Must be an odd number.') 135 | parser.add_argument('height', nargs='?', type=int, help='Height of convolution kernel. Must be an odd number. Equals to width if omitted.') 136 | parser.add_argument('-f', '--factor', nargs='+', help='Factors of the convolution kernel, in name=value format.') 137 | parser.add_argument('--dump-compton', action='store_true', help='Dump in compton format.') 138 | return parser.parse_args() 139 | 140 | 141 | def _main(): 142 | args = _parse_args() 143 | 144 | width = args.width 145 | height = args.height 146 | if not height: 147 | height = width 148 | if not (width > 0 and height > 0): 149 | raise CGBadArg("Invalid width/height.") 150 | factors = _args_readfactors(args.factor) 151 | 152 | funcs = dict(gaussian=gen_gaussian, box=gen_box) 153 | matrix = (funcs.get(args.type, _gen_invalid))(width, height, factors) 154 | if args.dump_compton: 155 | mdumpcompton(matrix) 156 | else: 157 | mdump(matrix) 158 | 159 | 160 | if __name__ == '__main__': 161 | _main() 162 | -------------------------------------------------------------------------------- /packages/bin/bin/cvttgsticker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # convert jpg/png images under cwd into ./stickers folder 4 | # optimize for publishing telegram stickers 5 | # 6 | # requires: 7 | # - imagemagick: scaling and converting format 8 | # - optipng: optimize png size 9 | 10 | mkdir -p stickers 11 | mogrify -resize 512x512\> -format png -path stickers *.png *.jpg 12 | optipng stickers/*.png 13 | -------------------------------------------------------------------------------- /packages/bin/bin/defaults-detective.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | # MEMO: 4 | # nushell does not support signal trap or similar feature 5 | # https://github.com/nushell/nushell/issues/8360 6 | use os 7 | use str 8 | use file 9 | 10 | var tmpdir = (os:temp-dir 'defaults-detective-*') 11 | 12 | set before-exit = [ 13 | $@before-exit 14 | { 15 | echo (styled 'Cleaning up' bold blue) $tmpdir 16 | if (os:is-dir $tmpdir) { 17 | rm -r $tmpdir 18 | } else { 19 | echo $tmpdir does not exist, skipping cleanup 20 | } 21 | } 22 | ] 23 | 24 | echo (styled 'Discovering domains' bold blue) 25 | 26 | # TODO: 27 | # use `defaults export DOMAIN - >domain.plist` 28 | # diff plist (plist have extra type info) 29 | # print defaults command to reflect changes 30 | 31 | # Domains that are not useful for system configuration 32 | var maskedDomains = [ 33 | com.apple.biomesyncd 34 | com.apple.CallHistorySyncHelper 35 | com.apple.cseventlistener 36 | com.apple.DuetExpertCenter.AppPredictionExpert 37 | com.apple.FaceTime 38 | com.apple.HIToolbox 39 | com.apple.knowledge-agent 40 | com.apple.madrid 41 | com.apple.mmcs 42 | com.apple.photolibraryd 43 | com.apple.photos.shareddefaults 44 | com.apple.proactive.PersonalizationPortrait 45 | com.apple.routined 46 | com.apple.spaces 47 | com.apple.spotlightknowledge 48 | com.apple.tipsd 49 | com.apple.xpc.activity2 50 | ContextStoreAgent 51 | ] 52 | 53 | var domains = [] 54 | peach {|domain| 55 | if (and ?(e:defaults read $domain >/dev/null 2>&1) (not (has-value $maskedDomains $domain))) { 56 | echo '->' (styled $domain bold green) 57 | set domains = (conj $domains $domain) 58 | } 59 | } [(str:split ', ' (e:defaults domains))] 60 | 61 | peach {|domain| 62 | touch $tmpdir/$domain{.old, ''} 63 | e:defaults read $domain > $tmpdir/$domain 64 | # e:defaults export $domain - > $tmpdir/$domain 65 | } $domains 66 | 67 | echo (styled 'Detecting changes' bold blue) 68 | 69 | while $true { 70 | each {|domain| 71 | cp $tmpdir/$domain{'', .old} 72 | e:defaults read $domain > $tmpdir/$domain 73 | # e:defaults export $domain - > $tmpdir/$domain 74 | 75 | # for shorter path display 76 | with pwd = $tmpdir { 77 | var difference = (file:pipe) 78 | var result = ?(e:git diff -U0 --word-diff=porcelain --no-index --no-prefix -- $domain{.old, ''} > $difference[w]) 79 | if (and (has-key $result[reason] exit-status) (== $result[reason][exit-status] 1)) { 80 | file:close $difference[w] 81 | var changes = [(str:trim-space (slurp < $difference[r]) | to-lines)][4..-1] 82 | set changes = ['~' $@changes] 83 | # multiple sections like this: 84 | # '@@ -8 +8 @@' 85 | # ' ArcadePayoutIntervalStartDate = ' 86 | # '-"2024-12-12 22:40:34' 87 | # '+"2024-12-13 10:41:13' 88 | # ' +0000";' 89 | # '~' 90 | # 91 | # end with empty line 92 | each {|change| 93 | if (==s $change '~') { 94 | print &sep='' "\n" (styled $domain bold '#e7cb21' 'bg-#111111') " " 95 | } elif (str:has-prefix $change ' ') { 96 | print (str:trim-space $change[1..]) 97 | } elif (str:has-prefix $change '-') { 98 | print (styled $change[1..] bold red) 99 | } elif (str:has-prefix $change '+') { 100 | print (styled $change[1..] bold green) 101 | } 102 | } $changes 103 | file:close $difference[r] 104 | } 105 | } 106 | 107 | } $domains 108 | 109 | sleep 1s 110 | } 111 | -------------------------------------------------------------------------------- /packages/bin/bin/encodingprober.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import time 5 | 6 | # API: https://api.kde.org/frameworks/kcodecs/html/classKEncodingProber.html 7 | from PyKF5.KCodecs import KEncodingProber 8 | 9 | # https://doc.qt.io/qt-5/qbytearray.html 10 | from PyQt5.QtCore import QByteArray 11 | 12 | prober_types = [ 13 | KEncodingProber.Unicode, 14 | KEncodingProber.ChineseSimplified, 15 | KEncodingProber.Japanese, 16 | KEncodingProber.Universal, 17 | ] 18 | 19 | 20 | prober_list = [KEncodingProber(prober_type) for prober_type in prober_types] 21 | 22 | input_list = sys.argv[1:] 23 | 24 | 25 | def usage(): 26 | print("Usage:") 27 | print("\tencodingprober.py text_file1 [text_file2 ...]") 28 | 29 | 30 | def assert_input_not_empty(): 31 | if len(input_list) < 1: 32 | print("Insufficient args, aborted") 33 | usage() 34 | exit(1) 35 | 36 | 37 | assert_input_not_empty() 38 | 39 | for text_file in input_list: 40 | with open(text_file, "rb") as f: 41 | raw_data = f.read(2048) 42 | probe_records = {} 43 | for prober in prober_list: 44 | prober.reset() 45 | 46 | if prober.feed(QByteArray(raw_data)) == KEncodingProber.FoundIt: 47 | probe_records[ 48 | str(prober.encoding(), encoding="ascii") 49 | ] = prober.confidence() 50 | 51 | probe_result_list = sorted( 52 | list(probe_records.items()), key=lambda x: x[1], reverse=True 53 | ) 54 | 55 | # FIXME: why utf8 show 0.0 confidence on utf8 file 56 | print(text_file) 57 | for [encoding, confidence] in probe_result_list: 58 | print(encoding, confidence) 59 | 60 | -------------------------------------------------------------------------------- /packages/bin/bin/extractgst.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # https://wiki.archlinux.org/title/GDM#Log-in_screen_background_image 4 | 5 | gst=/usr/share/gnome-shell/gnome-shell-theme.gresource 6 | workdir=${HOME}/shell-theme 7 | 8 | for r in `gresource list $gst`; do 9 | r=${r#\/org\/gnome\/shell/} 10 | if [ ! -d $workdir/${r%/*} ]; then 11 | mkdir -p $workdir/${r%/*} 12 | fi 13 | done 14 | 15 | for r in `gresource list $gst`; do 16 | gresource extract $gst $r >$workdir/${r#\/org\/gnome\/shell/} 17 | done 18 | -------------------------------------------------------------------------------- /packages/bin/bin/ffconcat.elv: -------------------------------------------------------------------------------- 1 | #!/bin/env elvish 2 | 3 | use re 4 | #use whtsky 5 | use str 6 | use path 7 | 8 | var temp_file = (mktemp -p ./) 9 | var files = [(fd -e wmv --regex '[[:digit:]]{2}\.wmv')] 10 | #var files = (whtsky:filter [name]{ put (re:match '[\d]{2}\.wmv' $name) } [*.wmv]) 11 | var list = (str:join "\n" [(each [f]{ put file" '"$f"'" } $files)]) 12 | 13 | echo Files to concat: 14 | pprint (all $files) 15 | echo 16 | echo $list >$temp_file 17 | 18 | var output_file_name = (re:replace '[\d]{2}\.wmv' '_full.wmv' (path:base [*.wmv][0])) 19 | 20 | ffmpeg -f concat -safe 0 -i $temp_file -c copy $output_file_name 21 | 22 | rm -v $temp_file 23 | -------------------------------------------------------------------------------- /packages/bin/bin/fffakonadistop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # stop akonadi service 4 | 5 | akonadictl stop 6 | -------------------------------------------------------------------------------- /packages/bin/bin/fffbrightness.sh: -------------------------------------------------------------------------------- 1 | #set brightness for intel HD videocard 2 | 3 | 4 | BRIGHTNESS_DEFAULT=20 #Default brightness value 5 | BRIGHTNESS_MAX=976 6 | BRIGHTNESS_MIN=1 7 | ROOT_UID=0 8 | E_NOTROOT=87 9 | 10 | if [ "$UID" -ne "$ROOT_UID" ] 11 | then 12 | echo "Must be root to run this script." 13 | exit $E_NOTROOT 14 | fi 15 | 16 | if [ -n "$1" ] 17 | then 18 | if [[ $1 =~ ^[0-9]+$ ]] 19 | then 20 | if [ $(($1)) -gt $BRIGHTNESS_MAX ] 21 | then 22 | brightness=$BRIGHTNESS_MAX 23 | elif [ $(($1)) -lt $BRIGHTNESS_MIN ] 24 | then 25 | brightness=$BRIGHTNESS_MIN 26 | else 27 | brightness=$(($1)) 28 | fi 29 | else 30 | if [ "$1" == "max" ] 31 | then 32 | brightness=$BRIGHTNESS_MAX 33 | elif [ "$1" == "min" ] 34 | then 35 | brightness=$BRIGHTNESS_MIN 36 | else 37 | brightness=$BRIGHTNESS_DEFAULT 38 | fi 39 | fi 40 | else 41 | brightness=$BRIGHTNESS_DEFAULT 42 | fi 43 | 44 | echo $brightness > /sys/class/backlight/intel_backlight/brightness 45 | -------------------------------------------------------------------------------- /packages/bin/bin/fffcoverart.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | use re 3 | use path 4 | 5 | var script_name = (path:base (src)[name]) 6 | 7 | var exceptions = [ 8 | &input_not_flac='Ignored, Non FLAC file' 9 | &no_cover_found='Ignored, No cover art found' 10 | &already_have_cover='Ignored, already have embedded cover' 11 | ] 12 | 13 | fn usage { 14 | echo Usage: 15 | echo "\t" $script_name a.flac [b.flac ...] 16 | echo "\t" $script_name '(fd -e flac)' 17 | echo 18 | echo "For each input file:" 19 | echo "\t"$script_name" will find cover art named cover.jpg|png in" 20 | echo "\tsame folder where each file is, and try to embed the cover art" 21 | echo "\tinto each flac file." 22 | echo 23 | echo "\tThis script will do nothing if no cover art found," 24 | echo "\tor flac file already have one PICTURE in metadata" 25 | } 26 | 27 | fn assert_valid_flac {|f| 28 | if (not (re:match '^FLAC audio bitstream data' (file -b $f))) { 29 | fail $exceptions[input_not_flac]":"$f 30 | } 31 | } 32 | 33 | fn find_coverart {|f| 34 | var search_dir = (path:dir $f) 35 | var coverart_list = [(fd ^ 36 | --absolute-path ^ 37 | --type file ^ 38 | --max-depth 1 ^ 39 | --ignore-case ^ 40 | '^cover\.(png|jpg)$' ^ 41 | $search_dir 42 | )] 43 | 44 | if (> (count $coverart_list) 0) { 45 | # use the first match as cover art 46 | put $coverart_list[0] 47 | } else { 48 | fail $exceptions[no_cover_found]":"$f 49 | } 50 | } 51 | 52 | fn assert_flac_no_embedded_cover {|f| 53 | var picture = [(metaflac --list --block-type=PICTURE $f)] 54 | if (!= 0 (count $picture)) { 55 | fail $exceptions[already_have_cover]':'$f 56 | } 57 | } 58 | 59 | if (== (count $args) 0) { 60 | usage 61 | exit 62 | } 63 | 64 | put $@args | each {|file| 65 | var flac_file = (path:abs $file) 66 | 67 | try { 68 | assert_valid_flac $flac_file 69 | assert_flac_no_embedded_cover $flac_file 70 | } catch e { 71 | echo $e 72 | continue 73 | } 74 | 75 | var coverart_file = $false 76 | 77 | try { set coverart_file = (find_coverart $flac_file) } catch e { 78 | echo $e 79 | continue 80 | } 81 | 82 | metaflac --import-picture-from=$coverart_file $flac_file 83 | } -------------------------------------------------------------------------------- /packages/bin/bin/fffjpg.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | use path 4 | 5 | var script_name = (path:base (src)[name]) 6 | 7 | if (== (count $args) 0) { 8 | echo Usage: 9 | echo "\t" $script_name image1.webp image2.png ... 10 | echo 11 | echo "\t" output will be like image1.webp.jpg image2.png.jpg ... 12 | exit 13 | } 14 | 15 | put $@args | peach {|image| 16 | if (!=s $image '') { 17 | echo converting $image 18 | convert $image ^ 19 | -resize '2800x2800>' ^ 20 | -quality 95 ^ 21 | $image'.jpg' 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/bin/bin/ffflockscreen.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | use kokkoro 4 | 5 | at-env~ = $kokkoro:at-env~ 6 | hosts = $kokkoro:hosts 7 | desktops = $kokkoro:desktops 8 | 9 | 10 | at-env &desktop=$desktops[sway] { 11 | if ?(pidof stretchly) { 12 | # 2021-05-13 13 | # stretchly causes unlock failure, weird... 14 | killall stretchly 15 | 16 | # MEMO: restart stretchly after unlock ? 17 | } 18 | } 19 | 20 | at-env &host=$hosts[fantastic-rabbithouse] &desktop=$desktops[sway] { 21 | swaylock -u ^ 22 | -i "eDP-1:/home/chino/Pictures/photo/twitter EKNNutiUYAYcNzW.jpg" ^ 23 | -i "DP-1:/home/chino/Pictures/photo/yande.re 570936.png" ^ 24 | -i "DP-2:/home/chino/Pictures/photo/yande.re 482810.jpg" 25 | exit 26 | } 27 | 28 | at-env &host=$hosts[chimame-tai] &desktop=$desktops[i3] { 29 | # scrot -zmo /tmp/fff_screen_lock.png 30 | # i3lock -tue -p win -i /tmp/fff_screen_lock.png 31 | # i3lock -tue -p win -i /home/chino/Pictures/bg/photo/IMG_2642_01.crop.4320x3840.png 32 | # i3lock -tue -p win -i /home/chino/Pictures/bg/pcr/101431.2160x1920_waifu_s3_n0.bmp.png 33 | i3lock -tue -p win -i "/home/chino/Pictures/bg/fff_screen_lock.1.png" 34 | exit 35 | } 36 | 37 | at-env &host=$hosts[chimame-tai] &desktop=$desktops[sway] { 38 | swaylock -u ^ 39 | -i "eDP-1:/home/chino/Pictures/bg/pixiv 73124833_p0.png" ^ 40 | -i "DP-1:/home/chino/Pictures/bg/twitter EpLcMJYVoAAp0oo.jpg" ^ 41 | -i "DP-2:/home/chino/Pictures/bg/pixiv 85946505_p0.jpg" 42 | #-i "HEADLESS-1:/home/chino/Pictures/bg/IMG_2950.png" 43 | exit 44 | } 45 | 46 | at-env &host=$hosts[toastx900] &desktop=$desktops[sway] { 47 | swaylock -u ^ 48 | -i "DP-1:/home/chino/Pictures/bg/photo/_DSC2075.png" ^ 49 | -i "DP-2:/home/chino/Pictures/bg/photo/_DSC3011.png" 50 | #-i "HEADLESS-1:/home/chino/Pictures/bg/IMG_2950.png" 51 | exit 52 | } 53 | -------------------------------------------------------------------------------- /packages/bin/bin/fffmacproresolution.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | internal = eDP1 4 | external = DP2 5 | 6 | # 1600x1000 59.87 Hz (CVT 1.60MA) hsync: 62.15 kHz; pclk: 132.25 MHz 7 | # Modeline "1600x1000_60.00" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync 8 | # 1400x875 59.89 Hz (CVT) hsync: 54.38 kHz; pclk: 100.50 MHz 9 | # Modeline "1400x875_60.00" 100.50 1400 1480 1624 1848 875 878 888 908 -hsync +vsync 10 | #xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync 11 | #xrandr --addmode $internal "1920x1200_60.00" 12 | #xrandr --output $internal --mode "1920x1200_60.00" 13 | 14 | xrandr --newmode "1400x875_60.00" 100.50 1400 1480 1624 1848 875 878 888 908 -hsync +vsync 15 | xrandr --addmode $internal "1400x875_60.00" 16 | xrandr --output $internal --mode "1400x875_60.00" 17 | 18 | #xrandr --output $external --mode "1920x1080" 19 | #xrandr --output $external --right-of $internal 20 | 21 | sleep 2 22 | #fffwallpaper.sh & 23 | 24 | # need to restart conky 25 | # to make it being correctly positioned 26 | killall conky 27 | conky -c /home/chino/.conky/i3bar/conkyrc.lua & 28 | -------------------------------------------------------------------------------- /packages/bin/bin/fffmouse-acc.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | use re 4 | 5 | #Mouse = 'Lenovo USB Receiver' 6 | #Mouse = 'Logitech USB Receiver' 7 | #Mouse = 'Logitech G Pro Gaming Mouse' 8 | #Mouse = 'Logitech G102' 9 | var Mouse = 'Logitech G903' 10 | 11 | var DeviceAccelProfile = 'libinput Accel Profile Enabled' 12 | var Acc = [1 0] 13 | var NoAcc = [0 1] 14 | 15 | var DeviceAccelConstantDeceleration = 'libinput Accel Speed' 16 | var AccSpeed = '0' 17 | # 1: Logitech G102 18 | var NoAccSpeed = '1' 19 | 20 | echo 'finding mouse: '$Mouse 21 | 22 | var founded = $false 23 | 24 | for device [(xinput)] { 25 | for pointer [(re:find $Mouse'.*id=([[:digit:]]+).*pointer' $device)] { 26 | var id = $pointer[groups][1][text] 27 | for prop [(xinput list-props $id)] { 28 | if (re:match $DeviceAccelProfile $prop) { 29 | # we have found the real mouse device 30 | echo 'found device (id='$id'): '$Mouse 31 | xinput set-prop $id $DeviceAccelProfile $@NoAcc 32 | xinput set-prop $id $DeviceAccelConstantDeceleration $NoAccSpeed 33 | set founded = $true 34 | break 35 | } 36 | } 37 | } 38 | } 39 | 40 | if $founded { 41 | echo '(っ*'ω'*c) mouse acc turned off.' 42 | } else { 43 | echo 'ヾ(°ω。ヽ=ノ°ω。)ノ'$Mouse' not found.' 44 | } 45 | -------------------------------------------------------------------------------- /packages/bin/bin/fffmouse-acc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #use parameter "on" to turn on the mouse acceleration 4 | #otherwise turn off the mouse acceleration 5 | 6 | DeviceAccelProfile="libinput Accel Profile Enabled" 7 | Acc="0, 1" 8 | NoAcc="0, 1" 9 | 10 | DeviceAccelConstantDeceleration="libinput Accel Speed" 11 | AccSpeed=-0.2 12 | NoAccSpeed=-0.2 13 | 14 | #get from xinput 15 | #sample output: 16 | # ⎡ Virtual core pointer id=2 [master pointer (3)] 17 | # ⎜ ↳ RAPOO RAPOO 5G Wireless Device id=11 [slave pointer (2)] 18 | # ⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)] 19 | # ⎜ ... 20 | # ⎣ Virtual core keyboard id=3 [master keyboard (2)] 21 | # ... 22 | 23 | #mouseName="RAPOO RAPOO 5G Wireless Device" 24 | #mouseName="SteelSeries SteelSeries Kinzu V3 Gaming Mouse" 25 | #mouseName="Lenovo USB Receiver" 26 | #mouse="pointer:${mouseName}" 27 | mouse="11" 28 | 29 | if [[ -z `xinput | grep "$mouseName"".*pointer"` ]] 30 | then 31 | echo 'No Mouse found ,Goshujinsama ×_×' 32 | exit 33 | fi 34 | 35 | if [ "$1" == "on" ] 36 | then 37 | #an "on" parameter, turn on acceleration. 38 | xinput set-prop "${mouse}" "${DeviceAccelProfile}" $Acc 39 | xinput set-prop "${mouse}" "${DeviceAccelConstantDeceleration}" $AccSpeed 40 | echo 'Mouse Acceleration turned ON,Goshujinsama ^_^' 41 | else 42 | #otherwise, turn off acceleration. 43 | xinput set-prop "${mouse}" "${DeviceAccelProfile}" $NoAcc 44 | xinput set-prop "${mouse}" "${DeviceAccelConstantDeceleration}" $NoAccSpeed 45 | echo 'Mouse Acceleration turned OFF,Goshujinsama ^.^' 46 | fi 47 | -------------------------------------------------------------------------------- /packages/bin/bin/fffp2v.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -eq 0 ]]; then 4 | cat << EOF 5 | Convert pictures to single frame video 6 | 7 | Usage: fffp2v input0 [input1...] 8 | 9 | Options: 10 | -d dry run, just print out the commands to exec. 11 | -- terminate options list 12 | 13 | EOF 14 | exit 0 15 | fi 16 | 17 | DRYRUN='' 18 | 19 | while [[ $# -gt 0 ]]; do 20 | opt="$1" 21 | 22 | case $opt in 23 | --) # terminate options list 24 | shift 25 | break 26 | ;; 27 | -d) # dry run 28 | DRYRUN="yes" 29 | ;; 30 | *) # no more options 31 | break 32 | ;; 33 | esac 34 | shift 35 | done 36 | 37 | if [[ $# -eq 0 ]]; then 38 | echo no input file was specified, exiting. 39 | exit 1 40 | fi 41 | 42 | for f in "$@"; do 43 | NAME=$(basename -- "$f") 44 | EXT="${NAME##*.}" 45 | NAME="${NAME%.*}" 46 | if [[ -n "$DRYRUN" ]]; then 47 | #echo ffmpeg -i "$f" -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p "$NAME.mp4" 48 | echo ffmpeg -i "$f" -vf "scale=1280:-2" -pix_fmt yuv420p "$NAME.mp4" 49 | else 50 | #ffmpeg -i "$f" -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p "$NAME.mp4" 51 | ffmpeg -loop 1 -i "$f" -t 2 -vf "scale=1280:-2" -pix_fmt yuv420p "$NAME.mp4" 52 | fi 53 | done 54 | -------------------------------------------------------------------------------- /packages/bin/bin/fffpixiv-rename.elv: -------------------------------------------------------------------------------- 1 | #!/bin/env elvish 2 | 3 | use path 4 | 5 | var script_name = (path:base (src)[name]) 6 | 7 | if (!= (count $args) 0) { 8 | echo Usage: 9 | echo "\t" $script_name 10 | echo 11 | echo "\t" 'rename files like "12345_p0.jpg" to "pixiv 12345_p0.jpg" in curren folder.' 12 | exit 13 | } 14 | 15 | fd -e jpg -e png --type file -d 1 '^[0-9]+_p[0-9]+\.\w+$' -x mv '{/}' 'pixiv {/}' 16 | -------------------------------------------------------------------------------- /packages/bin/bin/fffplaying.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | fn select_player { 4 | var players = [(playerctl -l)] 5 | # TODO: support player priority by name 6 | if (count $players) { 7 | put $players[0] 8 | } 9 | } 10 | 11 | fn beat { 12 | var player = (select_player) 13 | if (== (count [player]) 0) { 14 | return 15 | } 16 | 17 | fn p {|@args| playerctl -p $player $@args} 18 | 19 | # TODO: parse (p metadata) 20 | # TODO: calculatet relative position 21 | var artist = (p metadata artist) 22 | var title = (p metadata title) 23 | var status = (p status) 24 | echo $artist - $title 25 | } 26 | 27 | fn exit_when_parent_is_init { 28 | var ppid = (cat /proc/$pid/status | rg '^PPid' | rg -o '[[:digit:]]+') 29 | if (== $ppid 1) { 30 | exit 31 | } 32 | } 33 | 34 | while (put $true) { 35 | beat 36 | exit_when_parent_is_init 37 | sleep 2 38 | } 39 | -------------------------------------------------------------------------------- /packages/bin/bin/fffrpm.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | beat~ = []{ 4 | echo [(sensors applesmc-isa-0300 | rg '^Exhaust {2}:' | rg -o '[[:digit:]]{1,4}')][0] 'RPM' 5 | } 6 | 7 | ppid~ = []{ put (cat /proc/$pid/status | rg '^PPid' | rg -o '[[:digit:]]+') } 8 | 9 | while (put $true) { 10 | beat 11 | 12 | if (== (ppid) 1) { 13 | exit 14 | } 15 | 16 | sleep 2 17 | } 18 | -------------------------------------------------------------------------------- /packages/bin/bin/ffftohevc_cq32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ffmpeg -i input -f mp4 -c:v hevc_nvenc -preset slow -qp 0 -c:a copy output.mp4 4 | # ffmpeg -i input -f mp4 -c:v hevc_nvenc -preset slow -crf 16 -c:a copy output.mp4 5 | # ffmpeg -i input -f mp4 -c:v hevc_nvenc -preset slow -cq 36 -c:a copy output.mp4 6 | 7 | if [[ $# -eq 0 ]]; then 8 | cat << EOF 9 | 10 | Usage: ffftohevc_cq32 input0 [input1...] 11 | 12 | Options: 13 | -d dry run, just print out the commands to exec. 14 | -- terminate options list 15 | 16 | EOF 17 | exit 0 18 | fi 19 | 20 | DRYRUN='' 21 | 22 | while [[ $# -gt 0 ]]; do 23 | opt="$1" 24 | 25 | case $opt in 26 | --) # terminate options list 27 | shift 28 | break 29 | ;; 30 | -d) # dry run 31 | DRYRUN="yes" 32 | ;; 33 | *) # no more options 34 | break 35 | ;; 36 | esac 37 | shift 38 | done 39 | 40 | if [[ $# -eq 0 ]]; then 41 | echo no input file was specified, exiting. 42 | exit 1 43 | fi 44 | 45 | POSTFIX=".hevc.cq32" 46 | 47 | for f in "$@"; do 48 | NAME=$(basename -- "$f") 49 | EXT="${NAME##*.}" 50 | NAME="${NAME%.*}" 51 | if [[ -n "$DRYRUN" ]]; then 52 | 53 | #echo ffmpeg -i "$f" -f mp4 -c:v hevc_nvenc -preset slow -cq 32 -c:a copy "$NAME$POSTFIX.mp4" 54 | echo ffmpeg -i "$f" -f mp4 -c:v hevc_nvenc -preset slow -cq 32 -c:a aac "$NAME$POSTFIX.mp4" 55 | else 56 | #ffmpeg -i "$f" -f mp4 -c:v hevc_nvenc -preset slow -cq 32 -c:a copy "$NAME$POSTFIX.mp4" 57 | ffmpeg -i "$f" -f mp4 -c:v hevc_nvenc -preset slow -cq 32 -c:a aac "$NAME$POSTFIX.mp4" 58 | fi 59 | done 60 | -------------------------------------------------------------------------------- /packages/bin/bin/ffftohevc_vaapi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # https://trac.ffmpeg.org/wiki/Hardware/VAAPI 4 | # ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -i 'input.wmv' -c:v hevc_vaapi output.mp4 5 | 6 | if [[ $# -eq 0 ]]; then 7 | cat << EOF 8 | 9 | Usage: ffftohevc_vaapi input0 [input1...] 10 | 11 | Options: 12 | -d dry run, just print out the commands to exec. 13 | -- terminate options list 14 | 15 | EOF 16 | exit 0 17 | fi 18 | 19 | DRYRUN='' 20 | 21 | while [[ $# -gt 0 ]]; do 22 | opt="$1" 23 | 24 | case $opt in 25 | --) # terminate options list 26 | shift 27 | break 28 | ;; 29 | -d) # dry run 30 | DRYRUN="yes" 31 | ;; 32 | *) # no more options 33 | break 34 | ;; 35 | esac 36 | shift 37 | done 38 | 39 | if [[ $# -eq 0 ]]; then 40 | echo no input file was specified, exiting. 41 | exit 1 42 | fi 43 | 44 | POSTFIX="_hevc" 45 | 46 | for f in "$@"; do 47 | NAME=$(basename -- "$f") 48 | EXT="${NAME##*.}" 49 | NAME="${NAME%.*}" 50 | if [[ -n "$DRYRUN" ]]; then 51 | echo ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 \ 52 | -i "$f" -c:v hevc_vaapi -c:a aac \ 53 | "$NAME$POSTFIX.mp4" 54 | else 55 | ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 \ 56 | -i "$f" -c:v hevc_vaapi -c:a aac \ 57 | "$NAME$POSTFIX.mp4" 58 | fi 59 | done 60 | -------------------------------------------------------------------------------- /packages/bin/bin/fffwacommap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # modified from: https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default 4 | 5 | # CONFIGURATION 6 | 7 | # Set this to your (stylus) device. Find it by running: 8 | # xsetwacom --list devices 9 | DEVICE='Wacom Intuos Pro M Pen stylus' 10 | ERASER='Wacom Intuos Pro M Pen eraser' 11 | 12 | # These numbers are specific for each device. Get them by running: 13 | # xsetwacom --set "Your device name here" ResetArea 14 | # xsetwacom --get "Your device name here" Area 15 | AREAX=44800 16 | AREAY=29600 17 | 18 | # END OF CONFIGURATION 19 | 20 | 21 | SCREEN="$1" 22 | 23 | if [ -z "$SCREEN" -o "$SCREEN" = "--help" -o "$SCREEN" = "-help" -o "$SCREEN" = "-h" ]; then 24 | echo 'This script configures a Wacom tablet to one specific monitor, or to ' 25 | echo 'the entire desktop. In addition, it also reduces the tablet area in ' 26 | echo 'order to keep the same aspect ratio as the monitor.' 27 | echo 28 | echo 'How to run this script? Run one of the following lines:' 29 | CONNECTED_DISPLAYS=`xrandr -q --current | sed -n 's/^\([^ ]\+\) connected .*/\1/p'` 30 | for d in desktop $CONNECTED_DISPLAYS; do 31 | echo " $0 $d" 32 | done 33 | exit 34 | fi 35 | 36 | if [ "$SCREEN" = "desktop" ]; then 37 | # Sample xrandr line: 38 | # Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 32767 x 32767 39 | 40 | LINE=`xrandr -q --current | sed -n 's/^Screen 0:.*, current \([0-9]\+\) x \([0-9]\+\),.*/\1 \2/p'` 41 | read WIDTH HEIGHT <<< "$LINE" 42 | else 43 | # Sample xrandr lines: 44 | # LVDS1 connected 1366x768+0+312 (normal left inverted right x axis y axis) 309mm x 174mm 45 | # VGA1 disconnected (normal left inverted right x axis y axis) 46 | # HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 509mm x 286mm 47 | # DisplayPort-0 connected primary 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm 48 | 49 | LINE=`xrandr -q --current | sed -e s/primary\ // | sed -n "s/^${SCREEN}"' connected \([0-9]\+\)x\([0-9]\+\)+.*/\1 \2/p'` 50 | read WIDTH HEIGHT <<< "$LINE" 51 | fi 52 | 53 | if [ -z "$WIDTH" -o -z "$HEIGHT" ]; then 54 | echo "Aborting." 55 | exit 1 56 | fi 57 | 58 | # New values respecint aspect ratio: 59 | RATIOAREAY=$(( AREAX * HEIGHT / WIDTH )) 60 | RATIOAREAX=$(( AREAY * WIDTH / HEIGHT )) 61 | 62 | if [ "$AREAY" -gt "$RATIOAREAY" ]; then 63 | NEWAREAX="$AREAX" 64 | NEWAREAY="$RATIOAREAY" 65 | else 66 | NEWAREAX="$RATIOAREAX" 67 | NEWAREAY="$AREAY" 68 | fi 69 | 70 | xsetwacom --set "$DEVICE" Area 0 0 "$NEWAREAX" "$NEWAREAY" 71 | xsetwacom --set "$DEVICE" MapToOutput "$SCREEN" 72 | xsetwacom --set "$ERASER" Area 0 0 "$NEWAREAX" "$NEWAREAY" 73 | xsetwacom --set "$ERASER" MapToOutput "$SCREEN" 74 | 75 | # $ xsetwacom --list devices 76 | # Wacom Graphire4 6x8 stylus id: 9 type: STYLUS 77 | # Wacom Graphire4 6x8 eraser id: 10 type: ERASER 78 | # Wacom Graphire4 6x8 cursor id: 11 type: CURSOR 79 | # Wacom Graphire4 6x8 pad id: 12 type: PAD 80 | 81 | # Button mappings only apply to the "pad" device. 82 | # The wheel on Graphire4 acts as mouse buttons 4 and 5 (as a mouse wheel) 83 | # The buttons on Graphire4 act as mouse buttons 8 and 9 84 | 85 | # Default Area: 0 0 16704 12064 86 | # ResetArea 87 | # 88 | # Other potentially useful parameters: 89 | # * Mode: absolute or relative 90 | # * Rotate: none, cw, ccw, half 91 | # * MapToOutput: "next" (but is buggy), "desktop", or a name from xrandr 92 | -------------------------------------------------------------------------------- /packages/bin/bin/fffwallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | LOCKFILE=/tmp/fffwallpaper.sh.lock 4 | 5 | # kill previous instance 6 | fuser -k $LOCKFILE 7 | 8 | # run under lock 9 | ( 10 | flock 200 11 | 12 | PATH_LANDSCAPE=$(echo ~/sACG/_wallpaperLandscape) 13 | PATH_PORTRAIT=$(echo ~/sACG/_wallpaperPortrait) 14 | PATH_WALLPAPER=$PATH_LANDSCAPE 15 | 16 | # in second 17 | INTERVAL=300 18 | 19 | help() { 20 | cat << EOF 21 | 22 | Usage: fffwallpaper.sh [OPTIONS] FILE1 [FILE2 ...] 23 | 24 | Options: 25 | -h show this message. 26 | -l, --landscape (default)use landscape wallpaper 27 | -p, --portrait use portrait wallpaper 28 | -i (default 300)interval 29 | 30 | EOF 31 | } 32 | 33 | while [[ $# -gt 0 ]]; do 34 | opt="$1" 35 | 36 | case $opt in 37 | -h) 38 | help 39 | ;; 40 | -l | --landscape) 41 | PATH_WALLPAPER=$PATH_LANDSCAPE 42 | ;; 43 | -p | --portrait) 44 | PATH_WALLPAPER=$PATH_PORTRAIT 45 | ;; 46 | -i) 47 | INTERVAL="$2" 48 | shift 49 | ;; 50 | esac 51 | shift 52 | done 53 | 54 | 55 | wlist=(${PATH_WALLPAPER}/*.{png,jpg}) 56 | 57 | while : 58 | do 59 | # $RANDOM is reliable when $wlist is not very long 60 | w="${wlist[ $RANDOM % ${#wlist[@]}]}" 61 | echo $w 62 | feh --bg-fill "${w}" 63 | sleep $INTERVAL 64 | done 65 | 66 | )200>$LOCKFILE 67 | -------------------------------------------------------------------------------- /packages/bin/bin/fffwebp.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | script_name=(path-base (src)[name]) 4 | 5 | if (== (count $args) 0) { 6 | echo Usage: 7 | echo "\t" $script_name image1.png image2.jpg ... 8 | echo 9 | echo "\t" output will be like image1.png.webp image2.jpg.webp ... 10 | exit 11 | } 12 | 13 | put $@args | peach [image]{ 14 | if (!=s $image '') { 15 | echo converting $image 16 | convert $image \ 17 | -resize '2160x2160>' \ 18 | -quality 95 \ 19 | -define webp:method=6 \ 20 | -define webp:auto-filter=true \ 21 | -define webp:thread-level=1 \ 22 | -define webp:pass=10 \ 23 | $image'.webp' 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/bin/bin/git-ls-remote-branch-status.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env deno run --allow-env --allow-read --allow-run 2 | 3 | import { $ } from "npm:execa"; 4 | import _ from "npm:lodash"; 5 | import chalk from "npm:chalk"; 6 | import { parseArgs } from "node:util"; 7 | import { argv } from "node:process"; 8 | 9 | const usage = ` 10 | Usage: 11 | git ls-remote-branch-status [options] 12 | 13 | Options: 14 | -h, --help Show help 15 | -u, --user Specify the branch author, default is current git user, can match part of the name or email 16 | -a, --allUser Show all users' branches, this option will ignore -u option 17 | `; 18 | 19 | const args = parseArgs({ 20 | args: argv.slice(2), 21 | options: { 22 | help: { 23 | type: "boolean", 24 | short: "h", 25 | }, 26 | /** 27 | * MEMO: 28 | * Match against the canonical user name? 29 | * https://git-scm.com/docs/git-check-mailmap 30 | */ 31 | user: { 32 | type: "string", 33 | short: "u", 34 | default: (await $`git config user.name`).stdout.trim(), 35 | }, 36 | allUser: { 37 | short: "a", 38 | type: "boolean", 39 | }, 40 | }, 41 | }); 42 | 43 | if (args.values.help) { 44 | console.log(usage); 45 | } else { 46 | await lsRemoteBranches(); 47 | } 48 | 49 | async function lsRemoteBranches() { 50 | const remoteName = "origin"; 51 | const mainBranch = "develop"; 52 | const ignoredBranches = ["develop", "master", "HEAD"]; 53 | 54 | const remoteMainBranch = `${remoteName}/${mainBranch}`; 55 | 56 | await $("git", ["fetch", "--prune", remoteName]); 57 | 58 | const rawRefInfo = ( 59 | await $("git", [ 60 | "for-each-ref", 61 | ...ignoredBranches.map( 62 | (branch) => `--exclude=refs/remotes/${remoteName}/${branch}` 63 | ), 64 | `--sort=ahead-behind:${remoteMainBranch}`, 65 | "--sort=author", 66 | // lstrip=3: refs/remotes/origin/my-branch -> my-branch 67 | `--format=%(ahead-behind:${remoteMainBranch}),%(refname:lstrip=3),%(authorname)%(authoremail)`, 68 | `refs/remotes/${remoteName}`, 69 | ]) 70 | ).stdout; 71 | 72 | interface IRefInfo { 73 | aheadBehind: { 74 | ahead: number; 75 | behind: number; 76 | }; 77 | refName: string; 78 | author: string; 79 | } 80 | const refInfos: IRefInfo[] = rawRefInfo.split("\n").map((line: string) => { 81 | const [rawAheadBehind, refName, author] = line.split(",", 3); 82 | const aheadBehind = rawAheadBehind.split(" ").map(Number); 83 | return { 84 | aheadBehind: { 85 | ahead: aheadBehind[0], 86 | behind: aheadBehind[1], 87 | }, 88 | refName, 89 | author, 90 | }; 91 | }); 92 | 93 | const refInfosByAuthor: Record = _.groupBy( 94 | refInfos, 95 | "author" 96 | ); 97 | 98 | for (const [author, refInfos] of Object.entries(refInfosByAuthor)) { 99 | if (!args.values.allUser && !author.includes(args.values.user)) { 100 | continue; 101 | } 102 | console.log(chalk.bold.bgBlue.white(author)); 103 | const sortedRefInfos = refInfos.sort((a, b) => { 104 | // ahead asc, behind desc 105 | if (a.aheadBehind.ahead === b.aheadBehind.ahead) { 106 | return b.aheadBehind.behind - a.aheadBehind.behind; 107 | } 108 | return a.aheadBehind.ahead - b.aheadBehind.ahead; 109 | }); 110 | for (const refInfo of sortedRefInfos) { 111 | const { behind, ahead } = refInfo.aheadBehind; 112 | console.log( 113 | [ 114 | (behind > 0 ? chalk.redBright.bold : chalk.red.dim)( 115 | `${(String(behind) + "⇣").padStart(5)}` 116 | ), 117 | (ahead > 0 ? chalk.greenBright.bold : chalk.green.dim)( 118 | `${(String(ahead) + "⇡").padEnd(5)}` 119 | ), 120 | ahead > 0 121 | ? refInfo.refName 122 | : chalk.yellow.bold.italic(refInfo.refName), 123 | ].join(" ") 124 | ); 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /packages/bin/bin/gpu-sensor.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # act as a KSysGuard sensor 4 | # provides NVIDIA GPU info via `nvidia-settings` 5 | 6 | # Usage (e.g. add gpu temperature sensor) 7 | # 1. save this file, make sure it has a exec permission 8 | # 2. in KSysGuard's menu, open `File` -> `Monitor Remote Machine` 9 | # 3.1 in new dialog, type `Host` whatever you want 10 | # 3.2 set `Connection Type` to `Custom command` 11 | # 3.3 set `Command` like `path/to/this-sensor.pl` 12 | # 4. click `OK`, now you can find new sensor named `gpu_temp` 13 | # which is provides GPU temperature 14 | 15 | # See Also 16 | # https://techbase.kde.org/Development/Tutorials/Sensors 17 | 18 | 19 | $|=1; 20 | 21 | print "ksysguardd 1.2.0\n"; 22 | print "ksysguardd> "; 23 | 24 | while(<>){ 25 | if(/monitors/){ 26 | print "gpu_temp\tinteger\n"; 27 | print "gpu_graphics\tinteger\n"; 28 | print "gpu_memory\tinteger\n"; 29 | print "gpu_video_engine\tinteger\n"; 30 | } 31 | if(/gpu_temp/){ 32 | if(/\?/){ 33 | print "GPU Temp\t0\t0\n"; 34 | }else{ 35 | print `nvidia-settings -tq gpucoretemp | head -n1`; 36 | } 37 | } 38 | if(/gpu_graphics/){ 39 | if(/\?/){ 40 | print "GPU\t0\t0\n"; 41 | }else{ 42 | print `nvidia-settings -tq [gpu:0]/GPUUtilization | awk -F"," '{print(substr(\$1,index(\$1,"=")+1))}'`; 43 | } 44 | } 45 | if(/gpu_memory/){ 46 | if(/\?/){ 47 | print "GPU Memory\t0\t0\n"; 48 | }else{ 49 | print `nvidia-settings -tq [gpu:0]/GPUUtilization | awk -F"," '{print(substr(\$2,index(\$2,"=")+1))}'`; 50 | } 51 | } 52 | if(/gpu_video_engine/){ 53 | if(/\?/){ 54 | print "Video Engine\t0\t0\n"; 55 | }else{ 56 | print `nvidia-settings -tq [gpu:0]/GPUUtilization | awk -F"," '{print(substr(\$3,index(\$3,"=")+1))}'`; 57 | } 58 | } 59 | print "ksysguardd> "; 60 | } 61 | -------------------------------------------------------------------------------- /packages/bin/bin/hitokoto.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #输出一条一言的内容 4 | 5 | #来源 6 | #http://hitokoto.us/ 7 | 8 | echo $(node -p "($(curl -ks https://api.hitokoto.us:214/rand?charset=utf-8)).hitokoto") 9 | 10 | -------------------------------------------------------------------------------- /packages/bin/bin/i3-video-wallpaper.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | use path 3 | use re 4 | use whtsky 5 | 6 | # Depends on: 7 | # xrandr 8 | # aur/xwinwrap-git, https://github.com/ujjwal96/xwinwrap 9 | # mpv 10 | 11 | var script_name = (path:base (src)[name]) 12 | 13 | # [&DisplayPort-0= 2560x1440+0+0] 14 | var output_geometry_table = ({ 15 | # DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm 16 | var lines = (whtsky:filter [(xrandr)] {|v| re:match '\bconnected\b' $v }) 17 | 18 | # [[DisplayPort-0 0000x0000+0+0]] 19 | var monitors = (whtsky:map $lines {|v| 20 | put (whtsky:map (re:find '^([\w-]+) [\w ]+?(\d+x\d+\+\d+\+\d+)\b' $v)[groups][1..3] {|match| 21 | put $match[text] 22 | } 23 | ) 24 | }) 25 | 26 | var result = [&] 27 | each {|m| set result[$m[0]] = $m[1]} $monitors 28 | put $result 29 | }) 30 | 31 | fn usage { 32 | echo Usage: 33 | echo "\t"$script_name" " 34 | echo 35 | echo "OUTPUT (geometry)": 36 | each {|o| echo "\t"$o" ("$output_geometry_table[$o]")"} [(keys $output_geometry_table)] 37 | } 38 | 39 | if (!= (count $args) 2) { 40 | usage 41 | exit 42 | } 43 | 44 | var output video = $@args 45 | 46 | if (not (has-key $output_geometry_table $output)) { 47 | echo "Output \""$output"\" cannot be recognized, check xrandr output!" 48 | echo "Supported outputs:" 49 | each {|o| echo "\t"$o} [(keys $output_geometry_table)] 50 | fail "Output cannot be recognized" 51 | } 52 | 53 | # TODO: optimize video before using? (lower the cost of video wallpaper) 54 | # see https://gist.github.com/CSaratakij/788261f1ebcf2aefa320255120f75efe 55 | # 56 | # mpv costs: 57 | # ~170M MEM, 2.5~6% CPU on 2950X desktop, h264 1920x1080 119.880fps 58 | 59 | xwinwrap -ov -g $output_geometry_table[$output] -- ^ 60 | mpv -wid WID ^ 61 | --no-osc --no-osd-bar --no-input-default-bindings ^ 62 | --loop --no-audio ^ 63 | --hwdec ^ 64 | $video 65 | -------------------------------------------------------------------------------- /packages/bin/bin/i3_workspace_walk.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import json 4 | import subprocess 5 | import argparse 6 | 7 | parser = argparse.ArgumentParser(description='walk around i3 workspaces') 8 | 9 | parser.add_argument('--next_active', action='store_true') 10 | parser.add_argument('--previous_active', action='store_true') 11 | parser.add_argument('--next', action='store_true') 12 | parser.add_argument('--previous', action='store_true') 13 | 14 | args = parser.parse_args() 15 | 16 | activeWorkspaces = json.loads(subprocess\ 17 | .Popen('i3-msg -t get_workspaces', 18 | shell=True, 19 | stdout=subprocess.PIPE) \ 20 | .stdout.read()) 21 | 22 | allWorkspaces = [i + 1 for i in range(10)] 23 | 24 | presentWorkspace = 1 25 | previousActiveWorkspace = 1 26 | nextActiveWorkspace = 1 27 | previousWorkspace = 1 28 | nextWorkspace = 1 29 | 30 | for i in range(len(activeWorkspaces)): 31 | if activeWorkspaces[i]['focused'] == True: 32 | activeWSIndex = i 33 | allWSIndex = activeWorkspaces[i]['num'] - 1 34 | 35 | if i == (len(activeWorkspaces) - 1): 36 | activeWSIndex -= len(activeWorkspaces) 37 | allWSIndex -= len(allWorkspaces) 38 | 39 | presentWorkspace = activeWorkspaces[activeWSIndex]['num'] 40 | previousActiveWorkspace = activeWorkspaces[activeWSIndex - 1]['num'] 41 | nextActiveWorkspace = activeWorkspaces[activeWSIndex + 1]['num'] 42 | 43 | previousWorkspace = allWorkspaces[allWSIndex - 1] 44 | nextWorkspace = allWorkspaces[allWSIndex + 1] 45 | 46 | targetWorkspace = nextWorkspace 47 | 48 | print(args) 49 | 50 | if args.next_active: 51 | targetWorkspace = nextActiveWorkspace 52 | elif args.previous_active: 53 | targetWorkspace = previousActiveWorkspace 54 | elif args.next: 55 | targetWorkspace = nextWorkspace 56 | elif args.previous: 57 | targetWorkspace = previousWorkspace 58 | 59 | subprocess.call(['i3-msg', 'workspace', str(targetWorkspace)]) 60 | -------------------------------------------------------------------------------- /packages/bin/bin/is-merge-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | parent_count="$(git show -s --pretty=format:%p "${1:-HEAD}" | wc -w)" 6 | if [[ "$parent_count" -le 1 ]]; then 7 | # this is not a merge commit 8 | exit 1 9 | fi 10 | exit 0 -------------------------------------------------------------------------------- /packages/bin/bin/journalctl-filter-process.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | use path 4 | 5 | var script_name = (path:base (src)[name]) 6 | 7 | fn usage { 8 | echo Usage: 9 | echo journalctl -b0 '('$script_name processName0 processName1 ...')' 10 | } 11 | 12 | if (< (count $args) 1) { 13 | usage 14 | exit 15 | } 16 | 17 | # journalctl filter: https://serverfault.com/a/923436/449202 18 | each [process_name]{ put (err = ?(pidof -S "\n" $process_name)) } $args | each [pid]{ echo '_PID='$pid } 19 | -------------------------------------------------------------------------------- /packages/bin/bin/loi.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * loi.js 5 | * 6 | * Extract video frames with subtitle according to .ass subtitle file. 7 | * 8 | * usage: 9 | * loi.js VIDEO_FILE SUBTITLE_FILE 10 | * 11 | * requirement: 12 | * - Node.js 13 | * - ffmpeg executable in PATH 14 | * 15 | */ 16 | 17 | const process = require("node:process"); 18 | 19 | const read = (...argv) => 20 | require('fs').readFileSync(...argv).toString() 21 | 22 | const execffmpeg = (args) => 23 | require('child_process').spawnSync('ffmpeg', args, {stdio: [0, 0, 0]}) 24 | 25 | const log = (i) => console.log(i) 26 | 27 | const usage = ` 28 | Extract video frames with subtitle according to .ass subtitle file. 29 | 30 | Usage: loi.js VIDEO_FILE SUBTITLE_FILE 31 | ` 32 | 33 | let videoPath 34 | let subtitlePath 35 | 36 | if (process.argv.length !== 4) { 37 | log('unsatisfied number of input files, exiting...') 38 | log(process.argv) 39 | log(usage) 40 | } else { 41 | videoPath = process.argv[2] 42 | subtitlePath = process.argv[3] 43 | } 44 | 45 | /** 46 | * UNUSED ... 47 | * escape input string for ffmpeg 48 | * @see man ffmpeg-utils 49 | * @see https://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping 50 | * @param {[type]} s [description] 51 | * @return {[type]} [description] 52 | */ 53 | function _ffescape (s) { 54 | const specialChar = /'|\\| /g 55 | return s.replace(specialChar, '\\$&') 56 | } 57 | 58 | /** 59 | * convert 00:00:00.000 to 00.000 format 60 | * @param {string} time 00:00:00.000 format time 61 | * @return {string} 00.000 format time 62 | */ 63 | function normalizeTimestamp (time) { 64 | const [h, m, s] = time 65 | .split(':') 66 | .map(parseFloat) 67 | 68 | // add 0.2s shift 69 | // to ensure fade-in subtitle fully appeared 70 | const shift = 0.2 71 | 72 | const resultTime = h * 60 * 60 + m * 60 + s + shift 73 | return `${resultTime.toFixed(2)}` 74 | } 75 | 76 | function extractASSDialogues (subtitle) { 77 | const filter = /^Dialogue/ 78 | const newline = /\r\n|\r|\n/ 79 | const extra = /{.*?}/g 80 | const dialogues = subtitle 81 | .split(newline) 82 | .filter(v => filter.test(v)) 83 | .map(v => { 84 | const s = v.replace(extra, '').split(',') 85 | // s[1] is start time 86 | // s[2] is end time 87 | return [s[1], s[9]] 88 | }) 89 | .filter(v => v[0] !== '0:00:00.00') 90 | .map(v => [normalizeTimestamp(v[0]), v[1]]) 91 | 92 | return dialogues 93 | } 94 | 95 | function captureDialogues (dialogues) { 96 | for (const d of dialogues) { 97 | log(`${d[0]} ${d[1]}`) 98 | const args = [ 99 | '-loglevel', 'warning', 100 | '-y', 101 | '-ss', `${d[0]}`, 102 | '-i', `${videoPath}`, 103 | '-vf', 104 | 105 | /** 106 | * workaround for rendering correct subtitle 107 | * when using input seeking 108 | * https://trac.ffmpeg.org/ticket/2067#comment:15 109 | */ 110 | `setpts=PTS+${d[0]}/TB,subtitles=${subtitlePath},setpts=PTS-STARTPTS`, 111 | '-vframes', '1', 112 | `${d[1]}.png` 113 | ] 114 | execffmpeg(args) 115 | } 116 | } 117 | 118 | const dialogues = extractASSDialogues(read(subtitlePath)) 119 | captureDialogues(dialogues) 120 | -------------------------------------------------------------------------------- /packages/bin/bin/macos-flush-dns.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -xeo pipefail 4 | 5 | sudo dscacheutil -flushcache 6 | sudo killall -HUP mDNSResponder 7 | -------------------------------------------------------------------------------- /packages/bin/bin/mpdio.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const net = require("node:net"); 4 | const { exec } = require("node:child_process"); 5 | const process = require("node:process"); 6 | 7 | const host = "localhost"; 8 | const port = 6600; 9 | 10 | const _prompt = "> "; 11 | 12 | const debuginfo = (info) => process.stderr.write(`--- ${info}\n`); 13 | 14 | const idlePattern = /^changed:/; 15 | const statePattern = /^state: (\w+)/m; 16 | 17 | // TODO: reconnecting logic, or just let systemd do the restart? 18 | const client = net.createConnection(port, host, () => { 19 | debuginfo("doc: https://mpd.readthedocs.io/en/latest/protocol.html"); 20 | debuginfo(`connected to mpd server: ${host}:${port}`); 21 | client.setEncoding("utf8"); 22 | // process.stdin.pipe(client); 23 | client.write("status\n"); 24 | }); 25 | 26 | client.on("data", (data) => { 27 | // process.stdout.write(`${data}${prompt}`); 28 | // process.stdout.write(data); 29 | 30 | if (idlePattern.test(data)) { 31 | client.write("status\n"); 32 | } else if (statePattern.test(data)) { 33 | const state = statePattern.exec(data)[1]; 34 | debuginfo(`state: ${state}`); 35 | if (state === "play") { 36 | // TODO: check profile before setting 37 | // MEMO: pactl list short cards 38 | exec( 39 | "pactl set-card-profile alsa_card.usb-TEAC_Corporation_UD-505-00 off" 40 | ); 41 | } else { 42 | exec( 43 | "pactl set-card-profile alsa_card.usb-TEAC_Corporation_UD-505-00 pro-audio" 44 | ); 45 | } 46 | client.write("idle player\n"); 47 | } 48 | }); 49 | 50 | client.on("end", () => { 51 | console.debug("disconnected from mpd server"); 52 | }); 53 | 54 | process.on("SIGINT", () => { 55 | client.end(); 56 | }); 57 | -------------------------------------------------------------------------------- /packages/bin/bin/pacman-stat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # by Felix Yan 3 | # stat of system update 4 | 5 | echo $(head -n1 /var/log/pacman.log | cut -d " " -f 1,2) 以来一共滚了 $(grep -c "full system upgrade" /var/log/pacman.log) 次 6 | -------------------------------------------------------------------------------- /packages/bin/bin/print-bfg-changed-commits.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | use str 4 | use path 5 | 6 | var script_name = (path:base (src)[name]) 7 | 8 | fn usage []{ 9 | echo proceeds object-id-map.old-new.txt logged by BFG repo cleaner 10 | echo prints old commit object hash to stdout. 11 | echo 12 | echo Usage: 13 | echo "\t" $script_name path-to-object-id-map.old-new.txt 14 | echo 15 | echo "\t" each line of path-to-object-id-map.old-new.txt 16 | echo "\t" looks like "("old_object_hash new_object_hash")": 17 | echo 18 | echo "\t" 02fe4b871cde55a6e2cd33857632f4ba6031b477 940689fef04e7ef9fea61be75e40d281e18b1355 19 | } 20 | 21 | if (< (count $args) 1) { 22 | usage 23 | exit 24 | } 25 | 26 | cat $args[0] | each [line]{ 27 | var old_object_hash = [(str:split ' ' $line)][0] 28 | if (==s (git cat-file -t $old_object_hash) 'commit') { 29 | echo (git cat-file -t $old_object_hash) $old_object_hash 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/bin/bin/qtcreator.sh: -------------------------------------------------------------------------------- 1 | # add custom style for QtCreator 2 | /usr/bin/qtcreator -stylesheet='qtcreator_style.css' & 3 | -------------------------------------------------------------------------------- /packages/bin/bin/qtcreator_style.css: -------------------------------------------------------------------------------- 1 | /* code editor */ 2 | QPlainTextEdit { 3 | /** Debugger editor fix >>> */ 4 | font-family: "larabiefont","Source Han Sans SC Light","Symbola",sans-serif; 5 | font-size:12px !important; 6 | /** <<<<<<<<<<<<<<<<<<<<<<< */ 7 | 8 | background-color:rgba(50,50,50,0); 9 | background-image:url(""); 10 | background-position:right bottom; 11 | background-repeat:no-repeat; 12 | background-attachment:fixed; 13 | } 14 | 15 | /* Project Tree View */ 16 | QTreeView { 17 | background-color:rgba(50,50,50,0); 18 | background-image:url("WOW_SUCH_MOE_BG.png"); 19 | background-position:right bottom; 20 | background-repeat:no-repeat; 21 | background-attachment:fixed; 22 | } 23 | 24 | /* output pane */ 25 | #EditModeOutputPanePlaceHolder QPlainTextEdit, 26 | #EditModeOutputPanePlaceHolder QTreeView{ 27 | background-image:url("WOW_SUCH_MOE_BG.png"); 28 | } 29 | -------------------------------------------------------------------------------- /packages/bin/bin/refresh-gpg-cardno.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | # https://security.stackexchange.com/questions/165286/how-to-use-multiple-smart-cards-with-gnupg 4 | gpg-connect-agent "scd serialno" "learn --force" /bye 5 | -------------------------------------------------------------------------------- /packages/bin/bin/shellenv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Ensure Homebrew environment variables are set 4 | # So we can use elvish to generate other environment variables 5 | UNAME_SYSTEM="$(uname -s)" 6 | UNAME_MACHINE="$(uname -m)" 7 | 8 | # on macOS: 9 | # many essential binaries(e.g. `elvish`) are installed by brew 10 | # so we need to update PATH to contain brew's bin path 11 | # 12 | # on Arch Linux: 13 | # essential binaries are installed by pacman 14 | # we don't need to update PATH here 15 | if [ "${UNAME_SYSTEM}" = "Darwin" ]; then 16 | if [ "${UNAME_MACHINE}" = "arm64" ]; then 17 | # On ARM macOS 18 | eval "$(/opt/homebrew/bin/brew shellenv)" 19 | else 20 | # On Intel macOS 21 | eval "$(/usr/local/bin/brew shellenv)" 22 | fi 23 | fi 24 | 25 | SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) 26 | 27 | "$SCRIPT_DIR"/shellenv.elv 28 | -------------------------------------------------------------------------------- /packages/bin/bin/shellenv.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | 3 | # Generate essential environment variables for zsh and bash 4 | 5 | each {|env_name| 6 | if (has-env $env_name) { 7 | # WARN: add escape for ' 8 | printf "export %s='%s'\n" $env_name (get-env $env_name) 9 | } 10 | } [ 11 | 'PATH' 12 | 'PROTO_HOME' 13 | 'RUSTUP_HOME' 14 | 'CARGO_HOME' 15 | 'NIX_SSL_CERT_FILE' 16 | 'NIX_PROFILES' 17 | 'GOPATH' 18 | 'GOBIN' 19 | 'SSH_AUTH_SOCK' 20 | 'GPG_TTY' 21 | 'VISUAL' 22 | ] -------------------------------------------------------------------------------- /packages/bin/bin/ssh-archlinuxcn-sign.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # forwarding gpg-agent 4 | ssh -R /run/user/1046/gnupg/S.gpg-agent:/home/chino/.gnupg/S.gpg-agent.extra -o StreamLocalBindUnlink=yes frantic1048@build.archlinuxcn.org 5 | -------------------------------------------------------------------------------- /packages/bin/bin/tts.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | #TTS via espeak 5 | 6 | import os 7 | 8 | while(1): 9 | os.system('espeak -v zh -s 200 ' + '" ' + input() + ' "') 10 | -------------------------------------------------------------------------------- /packages/bin/bin/utf8everywhere.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | use re 3 | 4 | script_name=(path-base (src)[name]) 5 | 6 | backup_suffix=".utf8everywhere.bak" 7 | 8 | to_charset="UTF8" 9 | 10 | fn usage []{ 11 | echo Usage: 12 | echo "\t" $script_name TextFile1.txt TextFile2.txt ... 13 | echo 14 | echo "\t" each file will be replaced by utf8 encoded version 15 | echo "\t" and original file will be renamed to FILENAME.utf8everywhere.bak 16 | } 17 | 18 | if (== (count $args) 0) { 19 | usage 20 | exit 21 | } 22 | 23 | # process each input 24 | put $@args | each [f]{ 25 | 26 | # could be: 27 | # CHARSET with confidence [0,1] 28 | # no result 29 | chardet_result = (replaces &max=1 $f": " "" (chardetect $f)) 30 | 31 | detected = (re:match "confidence" $chardet_result) 32 | detected_charset = "" 33 | detected_confidence = 0 34 | 35 | if $detected { 36 | splits_result = [(splits " with confidence " $chardet_result)] 37 | detected_charset = $splits_result[0] 38 | detected_confidence = $splits_result[1] 39 | } 40 | 41 | if (!=s 'utf-8' $detected_charset) { 42 | echo "file\t\t"$f 43 | echo "detected\t"(to-string $detected) 44 | echo "charset\t\t"$detected_charset 45 | echo "confidence\t"$detected_confidence 46 | } 47 | 48 | if (and $detected (> $detected_confidence 0.5)) { 49 | if (==s 'GB2312' $detected_charset) { 50 | mv $f $f$backup_suffix 51 | echo iconv -f $detected_charset -t $to_charset $f$backup_suffix -o $f 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /packages/bin/bin/waifu: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # waifu2x helper script 4 | 5 | # depends: 6 | # - waifu2x-converter-cpp 7 | 8 | WAIFU2X='waifu2x-converter-cpp' 9 | 10 | if [[ $# -eq 0 ]]; then 11 | cat << EOF 12 | 13 | Usage: waifu [OPTIONS] FILE1 [FILE2 ...] 14 | 15 | Options: 16 | -d dry run, just print out the commands to exec. 17 | -n<1|2> noise reduction level 18 | -s scale ratio; default: -s2 19 | -- terminate options list 20 | 21 | EOF 22 | $WAIFU2X --version 23 | $WAIFU2X --list-processor 24 | exit 0 25 | fi 26 | 27 | DRYRUN='' 28 | SCALE='' 29 | NOISE='' 30 | 31 | while [[ $# -gt 0 ]]; do 32 | opt="$1" 33 | 34 | case $opt in 35 | --) # terminate options list 36 | shift 37 | break 38 | ;; 39 | -d) # dry run 40 | DRYRUN="yes" 41 | ;; 42 | -s*) # scale ratio 43 | SCALE=${opt:2} 44 | ;; 45 | -n*) # noise reduction level 46 | NOISE=${opt:2} 47 | ;; 48 | *) # no more options 49 | break 50 | ;; 51 | esac 52 | shift 53 | done 54 | 55 | if [[ $# -eq 0 ]]; then 56 | echo no input file was specified, exiting. 57 | exit 1 58 | fi 59 | 60 | CONFIG="" 61 | POSTFIX="_waifu" 62 | 63 | if [[ -n "$SCALE" ]]; then 64 | CONFIG+=" --scale-ratio $SCALE" 65 | POSTFIX+="_s$SCALE" 66 | else 67 | # defaults to 2x scale 68 | CONFIG+=" --scale-ratio 2" 69 | POSTFIX+="_s2" 70 | fi 71 | 72 | if [[ -n "$NOISE" ]]; then 73 | CONFIG+=" --noise-level $NOISE" 74 | POSTFIX+="_n$NOISE" 75 | else 76 | POSTFIX+="_n0" 77 | fi 78 | 79 | for f in "$@"; do 80 | BASENAME=$(basename -- "$f") 81 | EXT="${BASENAME##*.}" 82 | NAME="${BASENAME%.*}" 83 | if [[ -n "$DRYRUN" ]]; then 84 | echo $WAIFU2X $CONFIG -i "$f" -o "$NAME$POSTFIX.$EXT" 85 | else 86 | $WAIFU2X $CONFIG -i "$f" -o "$NAME$POSTFIX.$EXT" 87 | fi 88 | done 89 | -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX/27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX/27GL850 #1 2022-10-03 15-52 sRGB F-S XYZLUT+MTX.icc -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX/27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX/27GL850 #1 2022-10-05 01-20 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX/Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX/Monitor 1 #1 2019-10-07 01-40 D6500 2.2 F-S 3xCurve+MTX.icc -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX/SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX/SW270C #2 2022-10-05 02-21 160cdm² D6500 2.2 F-S XYZLUT+MTX.icc -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB/SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB/SW270C #2 2022-10-05 02-41 D6500 S XYZLUT+MTX-ARGB.icc -------------------------------------------------------------------------------- /packages/color/DisplayCAL/storage/Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX/Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/color/DisplayCAL/storage/Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX/Ultra HD #2 2022-10-03 16-58 sRGB F-S XYZLUT+MTX.icc -------------------------------------------------------------------------------- /packages/darwin-system/README.md: -------------------------------------------------------------------------------- 1 | macOS configuration, managed with `nix-darwin`: https://github.com/LnL7/nix-darwin/ 2 | 3 | # Bootstrap 4 | 5 | Install Nix: https://nixos.org/download.html#nix-install-macos 6 | 7 | Setup Nix, `nix-darwin` and `home-manager`: 8 | 9 | ``` 10 | nix-channel --add https://nixos.org/channels/nixpkgs-unstable 11 | nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager 12 | nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer 13 | ``` 14 | 15 | TODO: add more explanation. 16 | 17 | Apply configuration to system: `darwin-rebuild switch --flake .` 18 | 19 | # Memo 20 | 21 | Useful commands: 22 | 23 | - List homebrew packages: `brew leaves --installed-on-request` 24 | - Search nix packages: `nix-env -qaP | grep wget` 25 | -------------------------------------------------------------------------------- /packages/darwin-system/darwin.configuration.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | { 3 | # List packages installed in system profile. To search by name, run: 4 | # $ nix-env -qaP | grep wget 5 | environment.systemPackages = with pkgs; [ 6 | # dev 7 | git 8 | delta # pager for git, fancy 9 | git-lfs 10 | git-annex 11 | vim # text editor 12 | nano # text editor 13 | o # text editor 14 | nixpkgs-fmt # nix 15 | cloc # code stats 16 | scc # code stats, fancy 17 | tmux 18 | shellcheck 19 | go 20 | # pinentry_mac, useful ? 21 | 22 | # scripting 23 | ripgrep # regex 24 | jq # JSON 25 | unixtools.watch 26 | 27 | # system 28 | stow # dotfiles 29 | inxi # system info 30 | neofetch # system info, fancy 31 | mas # Mac App Store CLI 32 | coreutils 33 | htop 34 | ldns # drill 35 | mtr 36 | 37 | # file system 38 | fd # find 39 | exa # ls 40 | bat # like cat, fancy 41 | 42 | qalculate-gtk 43 | starship # shell prompt 44 | ]; 45 | nixpkgs.config.packageOverrides = pkgs: { 46 | htop = pkgs.htop.overrideAttrs 47 | (oldAttrs: { 48 | systemdSupport = false; 49 | sensorsSupport = false; 50 | }); 51 | }; 52 | nixpkgs.config.allowUnfree = true; 53 | 54 | 55 | # Use a custom configuration.nix location. 56 | # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix 57 | # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; 58 | 59 | # Auto upgrade nix package and the daemon service. 60 | services.nix-daemon.enable = true; 61 | nix.package = pkgs.nix; 62 | nix.extraOptions = '' 63 | experimental-features = nix-command flakes 64 | ''; 65 | 66 | # Create /etc/zshrc that loads the nix-darwin environment. 67 | programs.zsh.enable = true; # default shell on catalina 68 | # programs.fish.enable = true; 69 | 70 | # Used for backwards compatibility, please read the changelog before changing. 71 | # $ darwin-rebuild changelog 72 | system.stateVersion = 4; 73 | system.defaults = { 74 | # defaults read .GlobalPreferences 75 | ".GlobalPreferences" = { 76 | # Disable mouse acceleration 77 | # https://apple.stackexchange.com/questions/439131/how-to-permanently-disable-mouse-acceleration-macos-monterey 78 | "com.apple.mouse.scaling" = "-1"; 79 | }; 80 | "NSGlobalDomain" = { 81 | AppleInterfaceStyle = "Dark"; 82 | AppleShowScrollBars = "WhenScrolling"; 83 | NSWindowResizeTime = 0.001; 84 | AppleICUForce24HourTime = true; 85 | KeyRepeat = 2; 86 | "com.apple.keyboard.fnState" = true; 87 | }; 88 | dock = { 89 | autohide = true; 90 | }; 91 | }; 92 | } 93 | -------------------------------------------------------------------------------- /packages/darwin-system/darwin.home.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, lib, ... }: 2 | 3 | { 4 | home = { 5 | stateVersion = "22.11"; 6 | }; 7 | 8 | programs.home-manager.enable = true; 9 | imports = [ 10 | ../wezterm/program.home.nix 11 | ../git/program.home.nix 12 | ../alacritty/program.home.nix 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/darwin-system/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "darwin": { 4 | "inputs": { 5 | "nixpkgs": [ 6 | "nixpkgs" 7 | ] 8 | }, 9 | "locked": { 10 | "lastModified": 1673295039, 11 | "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", 12 | "owner": "lnl7", 13 | "repo": "nix-darwin", 14 | "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", 15 | "type": "github" 16 | }, 17 | "original": { 18 | "owner": "lnl7", 19 | "repo": "nix-darwin", 20 | "type": "github" 21 | } 22 | }, 23 | "home-manager": { 24 | "inputs": { 25 | "nixpkgs": [ 26 | "nixpkgs" 27 | ], 28 | "utils": "utils" 29 | }, 30 | "locked": { 31 | "lastModified": 1673343300, 32 | "narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=", 33 | "owner": "nix-community", 34 | "repo": "home-manager", 35 | "rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e", 36 | "type": "github" 37 | }, 38 | "original": { 39 | "owner": "nix-community", 40 | "repo": "home-manager", 41 | "type": "github" 42 | } 43 | }, 44 | "nixpkgs": { 45 | "locked": { 46 | "lastModified": 1686087926, 47 | "narHash": "sha256-mXzfJpCCT7Vup2sC3rZPB/AbEW+uBjwT027XWm7R6rA=", 48 | "owner": "nixos", 49 | "repo": "nixpkgs", 50 | "rev": "9ea6dd599d2781168e36486745b5d17e826ab015", 51 | "type": "github" 52 | }, 53 | "original": { 54 | "owner": "nixos", 55 | "ref": "nixpkgs-23.05-darwin", 56 | "repo": "nixpkgs", 57 | "type": "github" 58 | } 59 | }, 60 | "root": { 61 | "inputs": { 62 | "darwin": "darwin", 63 | "home-manager": "home-manager", 64 | "nixpkgs": "nixpkgs" 65 | } 66 | }, 67 | "utils": { 68 | "locked": { 69 | "lastModified": 1667395993, 70 | "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", 71 | "owner": "numtide", 72 | "repo": "flake-utils", 73 | "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", 74 | "type": "github" 75 | }, 76 | "original": { 77 | "owner": "numtide", 78 | "repo": "flake-utils", 79 | "type": "github" 80 | } 81 | } 82 | }, 83 | "root": "root", 84 | "version": 7 85 | } 86 | -------------------------------------------------------------------------------- /packages/darwin-system/flake.nix: -------------------------------------------------------------------------------- 1 | # darwin-rebuild switch --flake 2 | { 3 | description = "Darwin configuration"; 4 | 5 | inputs = { 6 | nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin"; 7 | darwin.url = "github:lnl7/nix-darwin"; 8 | darwin.inputs.nixpkgs.follows = "nixpkgs"; 9 | home-manager.url = "github:nix-community/home-manager"; 10 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; 11 | }; 12 | 13 | outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: { 14 | darwinConfigurations = { 15 | # FIXME: how to avoid hardcoded hostname? 16 | "Kafuus-Xperia-Tab-S27-Ultra-Elite-Mini-Max-Plus-RM5" = darwin.lib.darwinSystem { 17 | system = "x86_64-darwin"; 18 | modules = [ 19 | ./darwin.configuration.nix 20 | home-manager.darwinModules.home-manager 21 | { 22 | home-manager.useGlobalPkgs = true; 23 | home-manager.useUserPackages = true; 24 | home-manager.users.kafuuchino = import ./darwin.home.nix; 25 | 26 | # Optionally, use home-manager.extraSpecialArgs to pass 27 | # arguments to home.nix 28 | } 29 | ]; 30 | }; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /packages/elvish/.gitignore: -------------------------------------------------------------------------------- 1 | # elvish 2 | /* 3 | !.gitignore 4 | !/elvish 5 | /elvish/* 6 | !/elvish/rc.elv 7 | !/elvish/lib 8 | -------------------------------------------------------------------------------- /packages/elvish/elvish/lib/kokkoro.elv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env elvish 2 | use platform 3 | use path 4 | 5 | fn string-enum {|items-list| 6 | var result = [&] 7 | each {|item| set result[$item] = $item } $items-list 8 | 9 | put $result 10 | } 11 | 12 | var hosts = (string-enum [ 13 | amausaan 14 | chimame-tai 15 | fantastic-rabbithouse 16 | toastx900 17 | ]) 18 | 19 | var desktops = (string-enum [ 20 | i3 21 | sway 22 | ]) 23 | 24 | var current-host = (uname -n) 25 | var current-desktop = $E:XDG_SESSION_DESKTOP 26 | 27 | # linux,darwin 28 | var current-os = $platform:os 29 | 30 | fn at-env {| 31 | &host='' 32 | &desktop='' 33 | &os='' 34 | callback~ 35 | | 36 | if (or ^ 37 | (and (!=s $host '') (!=s $host $current-host)) ^ 38 | (and (!=s $desktop '') (!=s $desktop $current-desktop)) ^ 39 | (and (!=s $os '') (!=s $os $current-os)) ^ 40 | ) { 41 | return 42 | } 43 | 44 | callback 45 | } 46 | 47 | # return input string if it is a valid directory, otherwise return nothing 48 | fn existing-dir { |maybe-dir| if (path:is-dir $maybe-dir) { put $maybe-dir } } 49 | -------------------------------------------------------------------------------- /packages/elvish/elvish/lib/カフェラテ・カフェモカ・カプチーノ/completion.elv: -------------------------------------------------------------------------------- 1 | use str 2 | 3 | # git 4 | fn complete-g {|@args| 5 | # 0 1 2 6 | # g OP "STUFF TO BE COMPLETED" 7 | if (!= (count $args) 3) { 8 | # this is not our case, use default filename completion 9 | edit:complete-filename $args[-1] 10 | return 11 | } 12 | 13 | var op = $args[1] 14 | 15 | if (eq $op 'ck') { 16 | # git checkout 17 | # completes recent branches 18 | git for-each-ref 'refs/heads/' ^ 19 | --sort="-committerdate" ^ 20 | --format="%(refname:short)\t%(objectname:short) %(refname:short) %(authorname) %(committerdate:relative)" ^ 21 | | rg -v (g cb) | nl -nrz -w3 ^ 22 | | each {|line| 23 | var index candidate message = (str:split "\t" $line) 24 | 25 | edit:complex-candidate $candidate &display=$index" "$message 26 | 27 | # FIXME: 28 | # --sort not working yet since elvish always sort candidates... 29 | # using nl to workaround this issue... 30 | 31 | # MEMO: 32 | # git for-each-ref --no-contains=(git rev-parse HEAD) 33 | # omits all branch with same ref. 34 | # 35 | # I only want to omit current branch. 36 | # using `rg` to remove current branch from candidates 37 | } 38 | } else { 39 | # default completion 40 | edit:complete-filename $args[-1] 41 | } 42 | } 43 | 44 | set edit:completion:arg-completer[g] = $complete-g~ 45 | -------------------------------------------------------------------------------- /packages/elvish/elvish/lib/カフェラテ・カフェモカ・カプチーノ/env.elv: -------------------------------------------------------------------------------- 1 | use str 2 | 3 | use kokkoro 4 | 5 | var existing-dir~ = $kokkoro:existing-dir~ 6 | var at-env~ = $kokkoro:at-env~ 7 | 8 | 9 | # PATH 10 | at-env &os="darwin" { 11 | # MacOS 12 | 13 | # https://nixos.org/manual/nix/stable/installation/env-variables.html 14 | var nixPaths = [ 15 | {~}/.nix-profile/bin 16 | /nix/var/nix/profiles/default/bin 17 | ] 18 | 19 | set paths = [ 20 | ~/bin 21 | 22 | (existing-dir ~/.local/share/mise/shims) 23 | 24 | (existing-dir ~/.go/bin) 25 | 26 | # CLI form Rancher Desktop 27 | (existing-dir ~/.rd/bin) 28 | 29 | # npm prefix 30 | (existing-dir ~/.npm-global/bin) # legacy 31 | (existing-dir ~/.local/share/npm/bin) # current 32 | 33 | $@nixPaths 34 | 35 | # GnuPG for OS X 36 | # https://sourceforge.net/p/gpgosx/docu/Download/ 37 | (existing-dir /usr/local/gnupg-2.4/bin) 38 | 39 | # tk in MacOS is broken :( 40 | # 41 | # check `brew info tcl-tk` 42 | # https://superuser.com/questions/1696372/wish-based-tools-git-gui-gitk-showing-broken-black-ui-on-macos-monterey 43 | (existing-dir /usr/local/opt/tcl-tk/bin) 44 | 45 | # homebrew(x86_64), and other binaries 46 | (existing-dir /usr/local/bin) 47 | # homebrew(apple silicon) 48 | (existing-dir /opt/homebrew/bin) 49 | 50 | $@paths 51 | ] 52 | } 53 | 54 | # Go 55 | at-env &os="darwin" { 56 | set-env GOPATH {~}/.go 57 | set-env GOBIN {~}/.go/bin 58 | } 59 | 60 | # Nix 61 | at-env &os="darwin" { 62 | set-env NIX_SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt 63 | set-env NIX_PROFILES (str:join " " [ 64 | /nix/var/nix/profiles/default 65 | /Users/(whoami)/.nix-profile 66 | ]) 67 | } 68 | 69 | at-env &os="linux" { 70 | # arch linux 71 | set paths = [ 72 | {~}/bin 73 | {~}/.local/bin 74 | {~}/.nix-profile/bin 75 | {~}/.go/bin 76 | {~}/.gem/ruby/2.2.0/bin 77 | /usr/bin/vendor_perl 78 | $@paths 79 | ] 80 | } 81 | 82 | # Proto 83 | # https://moonrepo.dev/proto 84 | set-env PROTO_HOME {~}/.proto 85 | set paths = [ 86 | $E:PROTO_HOME/shims 87 | $E:PROTO_HOME/bin 88 | $E:PROTO_HOME/tools/node/globals/bin 89 | $@paths 90 | ] 91 | 92 | # Node.js 93 | set-env NODE_OPTIONS $E:NODE_OPTIONS' --max-old-space-size=8192' 94 | 95 | # Rust 96 | set-env RUSTUP_HOME {~}/.rustup 97 | set-env CARGO_HOME {~}/.cargo 98 | set paths = [{~}/.cargo/bin $@paths] 99 | 100 | if (has-external nvim) { 101 | set-env VISUAL nvim 102 | } else { 103 | set-env VISUAL nano 104 | } 105 | 106 | # GPG 107 | at-env &os="darwin" { 108 | if (not ?(pgrep gpg-agent >&-)) { 109 | gpgconf --launch gpg-agent > /dev/null 110 | } 111 | 112 | # macOS sometimes set SSH_AUTH_SOCK to a weird path like 113 | # /private/tmp/com.apple.launchd.abcdefg123/Listeners 114 | # which is listened by ssh-agent, but not gpg-agent 115 | # (check with `lsof /private/tmp/com.apple.launchd.abcdefg123/Listeners`) 116 | # so we need to set it to the correct path every time :( 117 | if ?(pgrep gpg-agent >&-) { 118 | set-env SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) 119 | } 120 | 121 | if (not (has-env GPG_TTY)) { 122 | set-env GPG_TTY (tty) 123 | } 124 | } 125 | 126 | at-env &os="linux" { 127 | if (not ?(pidof gpg-agent)) { 128 | gpgconf --launch gpg-agent > /dev/null 129 | } 130 | 131 | # FIXME: 132 | # GNOME Keyring's gcr-ssh-agent is setting this to an unusable value...... 133 | # https://bbs.archlinux.org/viewtopic.php?id=293602 134 | # systemctl --user mask gcr-ssh-agent.socket 135 | set-env SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) 136 | 137 | if (not (has-env GPG_TTY)) { 138 | # Configure pinentry to use the correct TTY 139 | # https://wiki.archlinux.org/index.php/GnuPG#Configure_pinentry_to_use_the_correct_TTY 140 | set-env GPG_TTY (tty) 141 | gpg-connect-agent updatestartuptty /bye >/dev/null 142 | } 143 | } 144 | 145 | # launchd is weird 146 | at-env &os="darwin" { 147 | # this is dumb, but... 148 | # https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x 149 | each {|env_name| 150 | if (not (and ^ 151 | (== (count [(launchctl getenv $env_name)]) 1) ^ 152 | (==s (launchctl getenv $env_name) (get-env $env_name)) ^ 153 | )) { 154 | launchctl setenv $env_name (get-env $env_name) 155 | } 156 | } ['PATH' 'PROTO_HOME' 'SHELL'] 157 | } 158 | 159 | # https://docs.grit.io/cli/quickstart#telemetry 160 | set-env GRIT_TELEMETRY_DISABLED true 161 | -------------------------------------------------------------------------------- /packages/elvish/elvish/lib/カフェラテ・カフェモカ・カプチーノ/prompt.elv: -------------------------------------------------------------------------------- 1 | set edit:prompt = { put (tilde-abbr $pwd)'> '; } 2 | 3 | # keep blank, it is not resizing friendly :( 4 | set edit:rprompt = { put '' } 5 | -------------------------------------------------------------------------------- /packages/elvish/elvish/rc.elv: -------------------------------------------------------------------------------- 1 | #!/bin/elvish 2 | 3 | use カフェラテ・カフェモカ・カプチーノ/env 4 | 5 | # "load aliases" 6 | # injecting variables in alias module to current scope 7 | # 8 | # https://elv.sh/ref/builtin.html#use-mod 9 | # https://elv.sh/ref/edit.html#edit:add-var 10 | var alias = (use-mod カフェラテ・カフェモカ・カプチーノ/alias) 11 | keys $alias | each {|f| edit:add-var $f $alias[$f] } 12 | 13 | use カフェラテ・カフェモカ・カプチーノ/prompt 14 | 15 | # FIXME: not working in elvish 0.15.0 yet 16 | use カフェラテ・カフェモカ・カプチーノ/completion 17 | 18 | if (has-external starship) { 19 | eval (starship init elvish) 20 | } 21 | 22 | # feeling bad about this ಠ_ಠ 23 | # https://elv.sh/ref/readline-binding.html 24 | # https://github.com/elves/elvish/blob/master/pkg/mods/readline-binding/readline-binding.elv 25 | # use readline-binding 26 | # { 27 | # var bindsym = {|k f| set edit:insert:binding[$k] = $f } 28 | # # Alt+l for location mode is not working on macOS... 29 | # # bind Ctrl-Y to location mode 30 | # $bindsym Ctrl-Y $edit:location:start~ 31 | # } 32 | 33 | # https://github.com/ghostty-org/ghostty/blob/main/src/shell-integration/README.md#elvish 34 | if (has-env GHOSTTY_RESOURCES_DIR) { 35 | use kokkoro 36 | var at-env~ = $kokkoro:at-env~ 37 | 38 | at-env &os="darwin" { 39 | eval (slurp <$E:GHOSTTY_RESOURCES_DIR/shell-integration/elvish/lib/ghostty-integration.elv) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/fastfetch/fastfetch/config.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", 3 | "logo": { 4 | "padding": { 5 | "top": 2 6 | } 7 | }, 8 | "modules": [ 9 | "title", 10 | "separator", 11 | "os", 12 | "host", 13 | "bootmgr", 14 | "chassis", 15 | "kernel", 16 | "packages", 17 | "shell", 18 | "editor", 19 | { 20 | "type": "display", 21 | "preciseRefreshRate": true 22 | }, 23 | "lm", 24 | "de", 25 | "wm", 26 | "icons", 27 | "terminal", 28 | "terminalfont", 29 | { 30 | "type": "cpu", 31 | "showPeCoreCount": true, 32 | "temp": true 33 | }, 34 | "memory", 35 | "swap", 36 | "disk", 37 | "break", 38 | "colors" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /packages/fcitx/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !/fcitx 4 | /fcitx/* 5 | !/fcitx/config 6 | !/fcitx/data 7 | /fcitx/data/* 8 | !/fcitx/data/QuickPhrase.mb 9 | -------------------------------------------------------------------------------- /packages/fcitx/fcitx/config: -------------------------------------------------------------------------------- 1 | [Hotkey] 2 | # Trigger Input Method 3 | TriggerKey=SUPER_SPACE 4 | # Use extra trigger key only after using it to inactivate 5 | # Available Value: 6 | # True False 7 | #UseExtraTriggerKeyOnlyWhenUseItToInactivate=True 8 | # Extra key for trigger input method 9 | # Available Value: 10 | # R_CTRL 11 | # R_SHIFT 12 | # L_SHIFT 13 | # L_CTRL 14 | # ALT_L_SHIFT 15 | # ALT_R_SHIFT 16 | # CTRL Both 17 | # SHIFT Both 18 | # L_ALT 19 | # R_ALT 20 | # ALT Both 21 | # Left Super 22 | # Right Super 23 | # Super Both 24 | # Ctrl+Left Super 25 | # Ctrl+Right Super 26 | # Super+Left Ctrl 27 | # Super+Right Ctrl 28 | # Disabled 29 | # Custom 30 | #SwitchKey=L_SHIFT 31 | # Custom switch key 32 | #CustomSwitchKey= 33 | # Activate input method 34 | #ActivateKey= 35 | # Inactivate Input Method 36 | #InactivateKey= 37 | # Enable Hotkey to scroll Between Input Method 38 | # Available Value: 39 | # True False 40 | #IMSwitchKey=True 41 | # Include Inactivate when scrolling between Input Method 42 | # Available Value: 43 | # True False 44 | #IMSwitchIncludeInactive=False 45 | # Scroll between Input Method 46 | # Available Value: 47 | # CTRL_SHIFT 48 | # ALT_SHIFT 49 | # CTRL_SUPER 50 | # ALT_SUPER 51 | IMSwitchHotkey=ALT_SUPER 52 | # Reload configuration 53 | #ReloadConfig=CTRL_5 54 | # Interval of Two Key Input 55 | #TimeInterval=250 56 | # Switching Virtual Keyboard 57 | #VKSwitchKey=CTRL_ALT_B 58 | # Switching Remind Mode 59 | #RemindSwitchKey= 60 | # Switching Full Width Character Mode 61 | FullWidthSwitchKey=CTRL_, 62 | # Switch Full Width Punc Mode 63 | #PuncSwitchKey=CTRL_. 64 | # Prev Page 65 | PrevPageKey=- , 66 | # Next Page 67 | NextPageKey== . 68 | # Choose Second and Third Candidate Word 69 | #SecondThirdCandWordKey= 70 | # Saving All Config and Input History 71 | #SaveAllKey=CTRL_ALT_S 72 | # Switch Embedded Preedit 73 | #SwitchPreedit=CTRL_ALT_P 74 | # Previous Candidate Word 75 | #PrevWord=SHIFT_TAB 76 | # Next Candidate Word 77 | #NextWord=TAB 78 | 79 | [Program] 80 | # Seconds sleep before fcitx really start 81 | #DelayStart=0 82 | # Share State Among Window 83 | # Available Value: 84 | # No 85 | # All 86 | # PerProgram 87 | #ShareStateAmongWindow=No 88 | # Default Input Method State 89 | # Available Value: 90 | # Inactive 91 | # Active 92 | #DefaultInputMethodState=Inactive 93 | 94 | [Output] 95 | # Type half width Punc After a Number 96 | # Available Value: 97 | # True False 98 | #HalfPuncAfterNumber=True 99 | # Disable Paging in Remind Mode 100 | # Available Value: 101 | # True False 102 | #RemindModeDisablePaging=True 103 | # Commit when toggle state 104 | # Available Value: 105 | # True False 106 | #SendTextWhenSwitchEng=True 107 | # Candidate Word Number 108 | CandidateWordNumber=6 109 | # Give the tips of Phrase 110 | # Available Value: 111 | # True False 112 | #PhraseTips=True 113 | # Do not commit preedit text when unfocus a window 114 | # Available Value: 115 | # True False 116 | #DontCommitPreeditWhenUnfocus=False 117 | 118 | [Appearance] 119 | # Show Input Method Hint After Input method changed 120 | # Available Value: 121 | # True False 122 | #ShowInputWindowAfterTriggering=True 123 | # Show Input Method Hint After Input method changed and Focus in 124 | # Available Value: 125 | # True False 126 | #ShowInputWindowWhenFocusIn=False 127 | # Input Method Hint will be only shown when state is active 128 | # Available Value: 129 | # True False 130 | #ShowInputWindowOnlyWhenActive=True 131 | # Show Input Speed 132 | # Available Value: 133 | # True False 134 | ShowInputSpeed=True 135 | # Show Version 136 | # Available Value: 137 | # True False 138 | #ShowVersion=False 139 | # Do not show input window if there is only preedit string 140 | # Available Value: 141 | # True False 142 | #HideInputWindowWhenOnlyPreeditString=False 143 | # Do not show input window if there is only one candidate and preedit 144 | # Available Value: 145 | # True False 146 | #HideInputWindowWhenOnlyOneCandidate=False 147 | 148 | -------------------------------------------------------------------------------- /packages/fcitx/fcitx/data/QuickPhrase.mb: -------------------------------------------------------------------------------- 1 | 'konachan http://konachan.com/post/show/ 2 | 'magnet magnet:?xt=urn:btih: 3 | 'mdnio https://mdn.io/ 4 | 'minitokyo http://gallery.minitokyo.net/view/ 5 | 'osb https://osu.ppy.sh/b/ 6 | 'osu https://osu.ppy.sh/u/ 7 | 'pixiv http://www.pixiv.net/member_illust.php?mode=medium&illust_id= 8 | 'twimg https://pbs.twimg.com/media/ 9 | 'xkcd https://www.xkcd.com/ 10 | 'yandere https://yande.re/post/show/ 11 | 'zerochan http://www.zerochan.net/ 12 | STROKE ̶ 13 | ZWS ​ 14 | ah (ˊ_>ˋ) 15 | ah ˊ_>ˋ 16 | ah ╮( ̄▽ ̄)╭ 17 | ah 6Д9 18 | amazed ( ゚Д゚)σ 19 | amazed (°Д°) 20 | amazed Σ(っ°Д °;)っ 21 | blash o(///▽///)q 22 | blood _:(´ཀ`」 ∠):_ 23 | confused (-_-;)・・・ 24 | confused (¯ . ¯٥) 25 | confused (・_・ヾ 26 | confused (゚∀。) 27 | effort (ง •̀_•́)ง 28 | excieted ˭̡̞(◞⁎˃ᆺ˂)◞*✰ 29 | excieted ╰(✧∇✧)╯ 30 | excieted (。>ω<)。 31 | face ( ͠° ͟ʖ ͡°) 32 | face ( ͡° ͜ʖ ͡°) 33 | face ( ಠ ͜ʖ ಠ) 34 | face [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅] 35 | greddy (*´﹃`*) 36 | haha (╹▽╹) 37 | haha ٩( ᐛ )و 38 | happy (*꒦ິ꒳꒦ີ) 39 | happy ∠( ᐛ 」∠)_ 40 | happy ☆*:.。.o(≧▽≦)o.。.:*☆ 41 | ho ヾ(  ̄O ̄)ツ 42 | kira ( > ◡╹) 43 | magic ╰( ͡° ͜ʖ ͡° )つ──☆*:・゚ 44 | maskface <(=*/ω\*=)> 45 | morning ٩(ˊ〇ˋ*)و 46 | mu µ 47 | mu ヽ(★>з<)。 48 | orz _(:з」∠)_ 49 | pai ((└(:3」┌)┘)) 50 | pai (ノシ>△<)ノシ 51 | pai _(-ω-`_)⌒)_ 52 | pai _(:3 ⌒゙)_ 53 | pai _(⌒ノシ 'ω')ノシ 54 | pai c⌒っ.ω.)っ 55 | pai ヾ(:3ノシヾ)ノシ 56 | pai ヾ(:3ノシヾ)ノシ三 57 | pai ヾ(°ω。ヽ=ノ°ω。)ノ 58 | pai ヾ(⌒(_*'ω'*)_ 59 | pai ヾ(⌒(ノ'ω')ノ 60 | pai ヾ(⌒(ノシ >ω<)ノシ 61 | pai ヾ(⌒(ノシ >ω<)ノシ ジタバタ 62 | pai ヾ(ノシヾε:)ノ 63 | paidi ヾ(:3ノシヾ)ノシ 64 | point (「・ω・)「 65 | poke ( ´∀`)σ)Д`) 66 | poor (。・_・。) 67 | put (っ╹ ◡ ╹ )っ 68 | rec ●REC 69 | rush ᕕ(ᐛ)ᕗ 70 | shock Σ(っ°Д°;)っ 71 | shock Σ(゚Д゚||) 72 | shock Σ(゚∀゚ノ)ノ 73 | shy (/ω\) 74 | shy (⁄ ⁄•⁄ω⁄•⁄ ⁄) 75 | sick (っ- ‸ – ς) 76 | sick ~(>_<~) 77 | sob ( >﹏<。) 78 | sob >_< 79 | star (☆ω☆) 80 | stear ,,Ծ‸Ծ,, 81 | suki (´,,•ω•,,)♡ 82 | suki (っ*'ω'*c) 83 | suki (っ´ω`c)♡ 84 | suki (っ˘з(˘⌣˘ ) ♡ 85 | suki Σ>―(〃°ω°〃)♡→ 86 | suki ♡\( ̄▽ ̄)/♡ 87 | surprised ( д ) ゚ ゚ 88 | table-flip (/ .□.)\ ︵╰(゜Д゜)╯︵ /(.□. \) 89 | table-flip (┙>∧<)┙へ┻┻ 90 | table-flip (╯°Д°)╯︵/(.□ . ) 91 | table-flip (╯°□°)╯︵ ┻━┻ 92 | table-flip ┬──┬◡ノ(° -°ノ) 93 | tears (ಥ﹏ಥ) 94 | tears (。•́︿•̀。) 95 | tears .·´¯`(>▂<)´¯`·. 96 | tears 。:゚(。ノω\。)゚・。 97 | tongues (∩❛ڡ❛∩) 98 | tongues (っ˘ڡ˘ς) 99 | wave ( ゚_ゝ゚)ノ 100 | wave (。´_`)ノ 101 | wave o(*'▽'*)/☆゜ 102 | wave ´ ▽ ` )ノ 103 | wave ヾ(≧∇≦*)ゝ 104 | whatever ╮( ̄_ ̄)╭ 105 | wordless (..•˘_˘•..) 106 | xi (≖ ‿ ≖) 107 | xi (✧≖‿ゝ≖) 108 | ya ♡ (。>ω<)ノ゛ 109 | yawn (๑´ڡ`๑) 110 | yawn ( ̄□ ̄) 111 | yi (눈_눈) 112 | yi ( ̄︿ ̄) 113 | zzz <(O_ _)0。゜zzZ 114 | -------------------------------------------------------------------------------- /packages/fontconfig/fontconfig/conf.d/10-universal.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | true 7 | false 8 | hintfull 9 | rgb 10 | lcdlight 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/fontconfig/fontconfig/conf.d/20-general-font-family.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Monospace 7 | 8 | 9 | Victor Mono 10 | Fira Code 11 | Symbols Nerd Font 12 | Noto Sans Mono 13 | Noto Sans CJK SC 14 | 文泉驿等宽正黑 15 | Noto Color Emoji 16 | HanaMinA 17 | HanaMinB 18 | 19 | 20 | 21 | 22 | monospace 23 | 24 | 25 | Victor Mono 26 | Fira Code 27 | Symbols Nerd Font 28 | Noto Sans Mono 29 | Noto Sans CJK SC 30 | 文泉驿等宽正黑 31 | Noto Color Emoji 32 | HanaMinA 33 | HanaMinB 34 | 35 | 36 | 37 | 38 | serif 39 | 40 | 41 | Noto Serif CJK SC 42 | DejaVu Serif 43 | Noto Color Emoji 44 | 45 | 46 | 47 | 48 | sans-serif 49 | 50 | 51 | Noto Sans CJK SC 52 | DejaVu Sans 53 | Noto Color Emoji 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /packages/fontconfig/fontconfig/conf.d/30-telegram-opensans.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Open Sans 6 | 7 | Noto Sans Javanese 8 | Noto Sans CJK SC 9 | 10 | 11 | Open Sans Semibold 12 | 13 | Noto Sans Javanese 14 | Noto Sans CJK SC Medium 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/fontconfig/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | ~/.fonts 9 | conf.d 10 | 11 | -------------------------------------------------------------------------------- /packages/ghostty/ghostty/config: -------------------------------------------------------------------------------- 1 | # https://ghostty.org/docs/config 2 | # The configuration can be reloaded at runtime by pressing 3 | # ctrl+shift+, (Linux) 4 | # cmd+shift+, (macOS) 5 | # Print config 6 | # ghostty +show-config 7 | 8 | # ghostty +list-fonts 9 | font-family = "JetBrainsMono Nerd Font Mono" 10 | font-thicken = true 11 | 12 | background-opacity = 0.55 13 | 14 | # tab bar is also hidden when setting "hidden" 15 | # tab bar is not compatible with AeroSpace currently 16 | # https://ghostty.org/docs/help/macos-tiling-wms 17 | macos-titlebar-style = "hidden" 18 | 19 | # ghostty +list-themes 20 | theme = Tomorrow Night Bright 21 | 22 | keybind = clear 23 | 24 | # macos 25 | # zellij already has copy_to_clipboard 26 | # keybind = cmd+c=copy_to_clipboard 27 | keybind = cmd+v=paste_from_clipboard 28 | keybind = cmd+d=close_window 29 | keybind = cmd+q=quit 30 | 31 | # FIXME: cmd+. eaten by ghostty (°_°) 32 | # even after keybind=clear 33 | # https://github.com/ghostty-org/ghostty/discussions/2881 -------------------------------------------------------------------------------- /packages/git/git/.gitignore: -------------------------------------------------------------------------------- 1 | config.user.work -------------------------------------------------------------------------------- /packages/git/git/config: -------------------------------------------------------------------------------- 1 | # https://git-scm.com/docs/git-config#FILES 2 | # Order: 3 | # ~/.config/git/config (this file, host-independent user settings, managed by this repo) 4 | # ~/.gitconfig (host-specific user settings: maintenance, credential..., not managed by this repo) 5 | [user] 6 | name = Jiahao Guo 7 | email = im@pyonpyon.today 8 | signingkey = 22D8A46B2CDA6605A1C0CFD1E060B3E215CE49BB 9 | [includeIf "gitdir:~/work/"] 10 | path = config.user.work 11 | [core] 12 | fsmonitor = true 13 | pager = "if command -v delta &>/dev/null; then delta; else less; fi" 14 | precomposeunicode = true 15 | quotepath = false 16 | [feature] 17 | manyFiles = true 18 | [diff] 19 | algorithm = histogram 20 | colorMoved = default 21 | [commit] 22 | gpgsign = false 23 | [merge] 24 | ff = only 25 | conflictStyle = zdiff3 26 | [push] 27 | default = simple 28 | autoSetupRemote = false 29 | [fetch] 30 | writeCommitGraph = true 31 | [pull] 32 | ff = only 33 | [rebase] 34 | autoSquash = true 35 | instructionFormat = "%aN\t%s" 36 | [http] 37 | postBuffer = 1048576000 38 | 39 | # filters 40 | # private filters for Vanilla repo 41 | # MEMO: debugging is not easy... 42 | # remove geometry lines from gitk config 43 | [filter "vanilla.gitk"] 44 | clean = sed -e '/^set geometry/d' 45 | smudge = cat 46 | required = true 47 | 48 | # always comment out sway bg config 49 | # to prevent file not found error in another computer 50 | [filter "vanilla.sway"] 51 | clean = sed -e 's/^\\s*bg/ \\x23bg/g' 52 | smudge = cat 53 | required = true 54 | 55 | # ignore tree_view, and color config in htop 56 | [filter "vanilla.htop"] 57 | clean = sed -e '/^tree_view\\|^color_scheme\\|^sort_key/d' 58 | smudge = cat 59 | required = true 60 | 61 | # always comment out npm proxy config 62 | # remove token and registry 63 | [filter "vanilla.npm"] 64 | clean = sed -e 's/^proxy=/\\x23proxy=/' -e 's/^https-proxy=/\\x23https-proxy=/' -e '/_authToken=/d' -e '/registry=/d' 65 | smudge = cat 66 | required = true 67 | 68 | # VS Code config 69 | # ignore zoomLevel 70 | [filter "vanilla.code"] 71 | clean = sed -e '/window.zoomLevel/d' 72 | smudge = cat 73 | required = true 74 | [filter "lfs"] 75 | clean = git-lfs clean -- %f 76 | smudge = git-lfs smudge -- %f 77 | process = git-lfs filter-process 78 | required = true 79 | [diff "lockb"] 80 | textconv = bun 81 | binary = true 82 | 83 | # external tools 84 | [delta] 85 | theme = OneHalfDark 86 | line-numbers = false 87 | keep-plus-minus-markers = true -------------------------------------------------------------------------------- /packages/git/git/config.user.work.example: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Kafuu Chino 3 | email = chino.kafuu@pyonpyon.today 4 | -------------------------------------------------------------------------------- /packages/git/git/gitk: -------------------------------------------------------------------------------- 1 | set mainfont {Almendra 11} 2 | set textfont {{Fira Code} 9} 3 | set uifont {{Linden Hill} 11} 4 | set tabstop 8 5 | set findmergefiles 0 6 | set maxgraphpct 50 7 | set maxwidth 16 8 | set cmitmode patch 9 | set wrapcomment none 10 | set autoselect 1 11 | set autosellen 40 12 | set showneartags 1 13 | set maxrefs 20 14 | set visiblerefs {"master"} 15 | set hideremotes 0 16 | set showlocalchanges 1 17 | set datetimeformat {%Y-%m-%d %H:%M:%S} 18 | set limitdiffs 1 19 | set uicolor grey85 20 | set want_ttk 1 21 | set bgcolor white 22 | set fgcolor black 23 | set uifgcolor black 24 | set uifgdisabledcolor #999 25 | set colors {"#00ff00" red blue magenta darkgrey brown orange} 26 | set diffcolors {red "#00a000" blue} 27 | set mergecolors {red blue "#00ff00" purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} 28 | set markbgcolor #e0e0ff 29 | set diffcontext 3 30 | set selectbgcolor gray85 31 | set foundbgcolor yellow 32 | set currentsearchhitbgcolor orange 33 | set extdifftool meld 34 | set perfile_attrs 0 35 | set headbgcolor #00ff00 36 | set headfgcolor black 37 | set headoutlinecolor black 38 | set remotebgcolor #ffddaa 39 | set tagbgcolor yellow 40 | set tagfgcolor black 41 | set tagoutlinecolor black 42 | set reflinecolor black 43 | set filesepbgcolor #aaaaaa 44 | set filesepfgcolor black 45 | set linehoverbgcolor #ffff80 46 | set linehoverfgcolor black 47 | set linehoveroutlinecolor black 48 | set mainheadcirclecolor yellow 49 | set workingfilescirclecolor red 50 | set indexcirclecolor #00ff00 51 | set circlecolors {white blue gray blue blue} 52 | set linkfgcolor blue 53 | set circleoutlinecolor black 54 | set diffbgcolors {"#fff3f3" "#f0fff0"} 55 | set web_browser xdg-open 56 | set permviews {} 57 | -------------------------------------------------------------------------------- /packages/git/git/ignore: -------------------------------------------------------------------------------- 1 | # Global gitignore 2 | 3 | ################### 4 | # OS-specific files 5 | ################### 6 | 7 | # Dolphin (file manager, Linux) 8 | .directory 9 | 10 | # macOS 11 | .DS_Store 12 | 13 | # Windows 14 | Thumbs.db 15 | [Dd]esktop.ini 16 | 17 | 18 | ################### 19 | # Development tools 20 | ################### 21 | 22 | # Node.js 23 | node_modules -------------------------------------------------------------------------------- /packages/gpg/.gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | keyserver hkps://keys.openpgp.org 2 | -------------------------------------------------------------------------------- /packages/htop/htop/htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten by htop when settings are changed in the interface. 2 | # The parser is also very primitive, and not human-friendly. 3 | htop_version=3.2.1 4 | config_reader_min_version=3 5 | fields=0 48 39 2 46 47 49 1 6 | hide_kernel_threads=1 7 | hide_userland_threads=1 8 | hide_running_in_container=0 9 | shadow_other_users=1 10 | show_thread_names=0 11 | show_program_path=1 12 | highlight_base_name=1 13 | highlight_deleted_exe=1 14 | highlight_megabytes=1 15 | highlight_threads=1 16 | highlight_changes=1 17 | highlight_changes_delay_secs=5 18 | find_comm_in_cmdline=1 19 | strip_exe_from_cmdline=1 20 | show_merged_command=0 21 | header_margin=1 22 | screen_tabs=0 23 | detailed_cpu_time=0 24 | cpu_count_from_one=0 25 | show_cpu_usage=1 26 | show_cpu_frequency=1 27 | update_process_names=0 28 | account_guest_in_cpu_meter=0 29 | enable_mouse=1 30 | delay=15 31 | hide_function_bar=0 32 | header_layout=two_50_50 33 | column_meters_0=AllCPUs4 Memory Swap 34 | column_meter_modes_0=1 1 1 35 | column_meters_1=Hostname Clock Uptime Tasks LoadAverage Battery 36 | column_meter_modes_1=2 2 2 2 2 2 37 | tree_sort_key=0 38 | sort_direction=1 39 | tree_sort_direction=1 40 | all_branches_collapsed=0 41 | screen:Main=PID USER M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command 42 | .sort_key=PERCENT_CPU 43 | .tree_sort_key=PID 44 | .tree_view=1 45 | .tree_view_always_by_pid=0 46 | .sort_direction=1 47 | .tree_sort_direction=1 48 | .all_branches_collapsed=0 49 | -------------------------------------------------------------------------------- /packages/kitty/kitty/colors.conf: -------------------------------------------------------------------------------- 1 | # Base16 Atelier Forest - kitty color config 2 | # Scheme by Bram de Haan (http://atelierbramdehaan.nl) 3 | background #1b1918 4 | foreground #a8a19f 5 | selection_background #a8a19f 6 | selection_foreground #1b1918 7 | url_color #9c9491 8 | cursor #a8a19f 9 | active_border_color #766e6b 10 | inactive_border_color #2c2421 11 | active_tab_background #1b1918 12 | active_tab_foreground #a8a19f 13 | inactive_tab_background #2c2421 14 | inactive_tab_foreground #9c9491 15 | tab_bar_background #2c2421 16 | 17 | # normal 18 | color0 #1b1918 19 | color1 #f22c40 20 | color2 #7b9726 21 | color3 #c38418 22 | color4 #407ee7 23 | color5 #6666ea 24 | color6 #3d97b8 25 | color7 #a8a19f 26 | 27 | # bright 28 | color8 #766e6b 29 | color9 #f22c40 30 | color10 #7b9726 31 | color11 #c38418 32 | color12 #407ee7 33 | color13 #6666ea 34 | color14 #3d97b8 35 | color15 #f1efee 36 | 37 | # extended base16 colors 38 | color16 #df5320 39 | color17 #c33ff3 40 | color18 #2c2421 41 | color19 #68615e 42 | color20 #9c9491 43 | color21 #e6e2e0 -------------------------------------------------------------------------------- /packages/kitty/kitty/current-theme.conf: -------------------------------------------------------------------------------- 1 | background #000000 2 | foreground #ffffff 3 | cursor #ffffff 4 | selection_background #b4d5ff 5 | color0 #000000 6 | color8 #666753 7 | color1 #cc0000 8 | color9 #ef2929 9 | color2 #4e9a06 10 | color10 #8ae234 11 | color3 #c4a000 12 | color11 #fce94f 13 | color4 #3465a4 14 | color12 #729fcf 15 | color5 #75507b 16 | color13 #ad7fa8 17 | color6 #06989a 18 | color14 #34e2e2 19 | color7 #d3d7cf 20 | color15 #eeeeec 21 | selection_foreground #000000 22 | -------------------------------------------------------------------------------- /packages/kitty/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # reload kitty config 2 | # - ctrl+shift+f5 (⌃+⌘+, on macOS) 3 | # - sending kitty the SIGUSR1 signal with kill -SIGUSR1 $KITTY_PID 4 | 5 | # font 6 | font_size 12.0 7 | 8 | # kitten choose-fonts 9 | # BEGIN_KITTY_FONTS 10 | font_family family="JetBrainsMono Nerd Font Mono" 11 | bold_font auto 12 | italic_font auto 13 | bold_italic_font auto 14 | # END_KITTY_FONTS 15 | 16 | symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono 17 | 18 | cursor_trail 1 19 | tab_bar_style powerline 20 | tab_powerline_style slanted 21 | 22 | # include colors.conf 23 | include themes/mocha.conf 24 | 25 | # overrides 26 | background_opacity 0.5 27 | background_blur 2 28 | background #000000 29 | tab_bar_background #2c2421 30 | 31 | hide_window_decorations titlebar-only 32 | 33 | close_on_child_death yes 34 | 35 | # for zellij 36 | clear_all_shortcuts yes 37 | 38 | # linux 39 | map ctrl+shift+c copy_to_clipboard 40 | map ctrl+shift+v paste_from_clipboard 41 | 42 | # macos 43 | # map cmd+c copy_to_clipboard 44 | map cmd+v paste_from_clipboard 45 | map cmd+d close_window 46 | map cmd+q quit 47 | 48 | text_fg_override_threshold 10 49 | -------------------------------------------------------------------------------- /packages/kitty/kitty/themes/latte.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Latte 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/latte.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | # The basic colors 10 | foreground #4c4f69 11 | background #eff1f5 12 | selection_foreground #eff1f5 13 | selection_background #dc8a78 14 | 15 | # Cursor colors 16 | cursor #dc8a78 17 | cursor_text_color #eff1f5 18 | 19 | # URL underline color when hovering with mouse 20 | url_color #dc8a78 21 | 22 | # Kitty window border colors 23 | active_border_color #7287fd 24 | inactive_border_color #9ca0b0 25 | bell_border_color #df8e1d 26 | 27 | # OS Window titlebar colors 28 | wayland_titlebar_color system 29 | macos_titlebar_color system 30 | 31 | # Tab bar colors 32 | active_tab_foreground #eff1f5 33 | active_tab_background #8839ef 34 | inactive_tab_foreground #4c4f69 35 | inactive_tab_background #9ca0b0 36 | tab_bar_background #bcc0cc 37 | 38 | # Colors for marks (marked text in the terminal) 39 | mark1_foreground #eff1f5 40 | mark1_background #7287fd 41 | mark2_foreground #eff1f5 42 | mark2_background #8839ef 43 | mark3_foreground #eff1f5 44 | mark3_background #209fb5 45 | 46 | # The 16 terminal colors 47 | 48 | # black 49 | color0 #5c5f77 50 | color8 #6c6f85 51 | 52 | # red 53 | color1 #d20f39 54 | color9 #d20f39 55 | 56 | # green 57 | color2 #40a02b 58 | color10 #40a02b 59 | 60 | # yellow 61 | color3 #df8e1d 62 | color11 #df8e1d 63 | 64 | # blue 65 | color4 #1e66f5 66 | color12 #1e66f5 67 | 68 | # magenta 69 | color5 #ea76cb 70 | color13 #ea76cb 71 | 72 | # cyan 73 | color6 #179299 74 | color14 #179299 75 | 76 | # white 77 | color7 #acb0be 78 | color15 #bcc0cc 79 | -------------------------------------------------------------------------------- /packages/kitty/kitty/themes/mocha.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Mocha 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | # The basic colors 10 | foreground #cdd6f4 11 | background #1e1e2e 12 | selection_foreground #1e1e2e 13 | selection_background #f5e0dc 14 | 15 | # Cursor colors 16 | cursor #f5e0dc 17 | cursor_text_color #1e1e2e 18 | 19 | # URL underline color when hovering with mouse 20 | url_color #f5e0dc 21 | 22 | # Kitty window border colors 23 | active_border_color #b4befe 24 | inactive_border_color #6c7086 25 | bell_border_color #f9e2af 26 | 27 | # OS Window titlebar colors 28 | wayland_titlebar_color system 29 | macos_titlebar_color system 30 | 31 | # Tab bar colors 32 | active_tab_foreground #11111b 33 | active_tab_background #cba6f7 34 | inactive_tab_foreground #cdd6f4 35 | inactive_tab_background #181825 36 | tab_bar_background #11111b 37 | 38 | # Colors for marks (marked text in the terminal) 39 | mark1_foreground #1e1e2e 40 | mark1_background #b4befe 41 | mark2_foreground #1e1e2e 42 | mark2_background #cba6f7 43 | mark3_foreground #1e1e2e 44 | mark3_background #74c7ec 45 | 46 | # The 16 terminal colors 47 | 48 | # black 49 | color0 #45475a 50 | color8 #585b70 51 | 52 | # red 53 | color1 #f38ba8 54 | color9 #f38ba8 55 | 56 | # green 57 | color2 #a6e3a1 58 | color10 #a6e3a1 59 | 60 | # yellow 61 | color3 #f9e2af 62 | color11 #f9e2af 63 | 64 | # blue 65 | color4 #89b4fa 66 | color12 #89b4fa 67 | 68 | # magenta 69 | color5 #f5c2e7 70 | color13 #f5c2e7 71 | 72 | # cyan 73 | color6 #94e2d5 74 | color14 #94e2d5 75 | 76 | # white 77 | color7 #bac2de 78 | color15 #a6adc8 79 | -------------------------------------------------------------------------------- /packages/kitty/kitty/themes/rose-pine-moon.conf: -------------------------------------------------------------------------------- 1 | ## name: Rosé Pine Moon 2 | ## author: mvllow 3 | ## license: MIT 4 | ## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf 5 | ## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist 6 | 7 | foreground #e0def4 8 | background #232136 9 | selection_foreground #e0def4 10 | selection_background #44415a 11 | 12 | cursor #56526e 13 | cursor_text_color #e0def4 14 | 15 | url_color #c4a7e7 16 | 17 | active_tab_foreground #e0def4 18 | active_tab_background #393552 19 | inactive_tab_foreground #6e6a86 20 | inactive_tab_background #232136 21 | 22 | active_border_color #3e8fb0 23 | inactive_border_color #44415a 24 | 25 | # black 26 | color0 #393552 27 | color8 #6e6a86 28 | 29 | # red 30 | color1 #eb6f92 31 | color9 #eb6f92 32 | 33 | # green 34 | color2 #3e8fb0 35 | color10 #3e8fb0 36 | 37 | # yellow 38 | color3 #f6c177 39 | color11 #f6c177 40 | 41 | # blue 42 | color4 #9ccfd8 43 | color12 #9ccfd8 44 | 45 | # magenta 46 | color5 #c4a7e7 47 | color13 #c4a7e7 48 | 49 | # cyan 50 | color6 #ea9a97 51 | color14 #ea9a97 52 | 53 | # white 54 | color7 #e0def4 55 | color15 #e0def4 56 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/bundles/deevad-v8-2.bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/krita/.local/share/krita/bundles/deevad-v8-2.bundle -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/input/kritadefault.profile: -------------------------------------------------------------------------------- 1 | [Alternate Invocation] 2 | 0={1;2;[1000023,1000020];1;0;0} 3 | 1={0;2;[1000021,1000020];1;0;0} 4 | 2={5;2;[1000021];2;0;0} 5 | 3={3;2;[1000021,1000023];2;0;0} 6 | 4={2;2;[1000023,1000021];1;0;0} 7 | 5={4;2;[1000021];1;0;0} 8 | 9 | [Change Primary Setting] 10 | 0={0;2;[1000020];1;0;0} 11 | 12 | [Exposure or Gamma] 13 | 0={0;2;[59];1;0;0} 14 | 15 | [General] 16 | name=Krita Default 17 | version=3 18 | 19 | [Pan Canvas] 20 | 0={0;4;[];0;0;2} 21 | 1={0;2;[20];1;0;0} 22 | 2={0;2;[];4;0;0} 23 | 3={1;1;[];0;0;0} 24 | 4={2;1;[];0;0;0} 25 | 5={3;1;[];0;0;0} 26 | 6={4;1;[];0;0;0} 27 | 28 | [Rotate Canvas] 29 | 0={0;2;[1000020,20];1;0;0} 30 | 1={1;2;[1000020,1000023,20];1;0;0} 31 | 2={0;2;[1000020];4;0;0} 32 | 3={2;1;[34];0;0;0} 33 | 4={4;1;[35];0;0;0} 34 | 5={3;1;[36];0;0;0} 35 | 36 | [Select Layer] 37 | 0={0;2;[52];1;0;0} 38 | 39 | [Show Popup Palette] 40 | 0={0;2;[];2;0;0} 41 | 42 | [Tool Invocation] 43 | 0={3;2;[56];1;0;0} 44 | 1={1;1;[1000005];0;0;0} 45 | 2={0;2;[];1;0;0} 46 | 3={1;1;[1000004];0;0;0} 47 | 4={2;1;[1000000];0;0;0} 48 | 49 | [Zoom Canvas] 50 | 0={0;4;[];0;0;1} 51 | 1={0;2;[1000021,20];1;0;0} 52 | 10={1;2;[1000021,1000023,20];1;0;0} 53 | 11={6;1;[33];0;0;0} 54 | 2={0;2;[1000021];4;0;0} 55 | 3={2;3;[];0;1;0} 56 | 4={3;3;[];0;2;0} 57 | 5={2;1;[3d];0;0;0} 58 | 6={3;1;[2d];0;0;0} 59 | 7={4;1;[31];0;0;0} 60 | 8={2;1;[2b];0;0;0} 61 | 9={5;1;[32];0;0;0} 62 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/input/painttoolsaicompatible.profile: -------------------------------------------------------------------------------- 1 | [Alternate Invocation] 2 | 0={4;2;[];2;0;0} 3 | 1={2;2;[1000023,1000021];1;0;0} 4 | 2={3;2;[1000021,1000023];2;0;0} 5 | 3={5;2;[1000021];2;0;0} 6 | 4={0;2;[1000021,1000020];1;0;0} 7 | 5={1;2;[1000023,1000020];1;0;0} 8 | 9 | [Change Primary Setting] 10 | 0={0;2;[1000021,1000023];1;0;0} 11 | 12 | [Exposure or Gamma] 13 | 0={0;2;[59];1;0;0} 14 | 15 | [General] 16 | name=Paint Tool Sai Compatible 17 | version=3 18 | 19 | [Pan Canvas] 20 | 0={4;1;[];0;0;0} 21 | 1={3;1;[];0;0;0} 22 | 2={2;1;[];0;0;0} 23 | 3={1;1;[];0;0;0} 24 | 4={0;2;[];4;0;0} 25 | 5={0;2;[20];1;0;0} 26 | 6={0;4;[];0;0;2} 27 | 28 | [Rotate Canvas] 29 | 0={3;1;[36];0;0;0} 30 | 1={4;1;[1000010];0;0;0} 31 | 2={2;1;[1000011];0;0;0} 32 | 3={0;2;[1000020];4;0;0} 33 | 4={4;2;[1000023,20];2;0;0} 34 | 5={0;2;[20,1000023];1;0;0} 35 | 6={4;1;[1000006];0;0;0} 36 | 37 | [Select Layer] 38 | 0={0;2;[52];1;0;0} 39 | 40 | [Show Popup Palette] 41 | 0={0;2;[1000021,1000023];2;0;0} 42 | 43 | [Switch Time] 44 | 0={1;1;[1000012];0;0;0} 45 | 1={0;1;[1000014];0;0;0} 46 | 47 | [Tool Invocation] 48 | 0={2;1;[1000000];0;0;0} 49 | 1={1;1;[1000004];0;0;0} 50 | 2={0;2;[];1;0;0} 51 | 3={1;1;[1000005];0;0;0} 52 | 4={3;2;[56];1;0;0} 53 | 54 | [Zoom Canvas] 55 | 0={2;1;[1000021,20];0;0;0} 56 | 1={3;1;[1000021,1000023,20];0;0;0} 57 | 10={0;2;[1000021,20];1;0;0} 58 | 11={0;4;[];0;0;1} 59 | 12={2;3;[];0;1;0} 60 | 13={0;2;[1000021];4;0;0} 61 | 2={5;1;[32];0;0;0} 62 | 3={2;1;[2b];0;0;0} 63 | 4={4;1;[1000010];0;0;0} 64 | 5={3;1;[2d];0;0;0} 65 | 6={2;1;[3d];0;0;0} 66 | 7={3;3;[];0;2;0} 67 | 8={6;1;[33];0;0;0} 68 | 9={1;2;[1000021,1000023,20];1;0;0} 69 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/input/photoshopcompatible.profile: -------------------------------------------------------------------------------- 1 | [Alternate Invocation] 2 | 0={1;2;[1000023,1000020];1;0;0} 3 | 1={0;2;[1000021,1000020];1;0;0} 4 | 2={5;2;[];0;0;0} 5 | 3={3;2;[];0;0;0} 6 | 4={2;2;[];0;0;0} 7 | 5={4;2;[1000023];1;0;0} 8 | 9 | [Change Primary Setting] 10 | 0={0;2;[];0;0;0} 11 | 12 | [Exposure or Gamma] 13 | 0={0;2;[];0;0;0} 14 | 15 | [General] 16 | name=Photoshop Compatible 17 | version=3 18 | 19 | [Pan Canvas] 20 | 0={0;4;[];0;0;2} 21 | 1={0;2;[20];1;0;0} 22 | 2={0;2;[];4;0;0} 23 | 3={1;1;[];0;0;0} 24 | 4={2;1;[];0;0;0} 25 | 5={3;1;[];0;0;0} 26 | 6={4;1;[];0;0;0} 27 | 28 | [Rotate Canvas] 29 | 0={0;2;[1000020,20];1;0;0} 30 | 1={1;2;[1000020,1000023,20];1;0;0} 31 | 2={0;2;[1000020];4;0;0} 32 | 3={2;1;[34];0;0;0} 33 | 4={4;1;[35];0;0;0} 34 | 5={3;1;[36];0;0;0} 35 | 36 | [Select Layer] 37 | 0={0;2;[];0;0;0} 38 | 39 | [Show Popup Palette] 40 | 0={0;2;[];2;0;0} 41 | 42 | [Switch Time] 43 | 0={0;1;[1000014];0;0;0} 44 | 1={1;1;[1000012];0;0;0} 45 | 46 | [Tool Invocation] 47 | 0={3;2;[1000020];1;0;0} 48 | 1={1;1;[1000005];0;0;0} 49 | 2={0;2;[];1;0;0} 50 | 3={1;1;[1000004];0;0;0} 51 | 4={2;1;[1000000];0;0;0} 52 | 53 | [Zoom Canvas] 54 | 0={0;4;[];0;0;1} 55 | 1={0;2;[1000021,20];1;0;0} 56 | 10={0;2;[1000021];4;0;0} 57 | 11={2;3;[];0;1;0} 58 | 2={3;3;[];0;2;0} 59 | 3={2;1;[3d];0;0;0} 60 | 4={3;1;[2d];0;0;0} 61 | 5={4;1;[1000021,31];0;0;0} 62 | 6={2;1;[2b];0;0;0} 63 | 7={5;1;[1000021,30];0;0;0} 64 | 8={1;2;[1000021,1000023,20];1;0;0} 65 | 9={6;1;[];0;0;0} 66 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/input/tabletpro.profile: -------------------------------------------------------------------------------- 1 | [Alternate Invocation] 2 | 0={4;2;[1000021];1;0;0} 3 | 1={2;2;[1000023,1000021];1;0;0} 4 | 2={3;2;[1000021,1000023];2;0;0} 5 | 3={5;2;[1000021];2;0;0} 6 | 4={0;2;[1000021,1000020];1;0;0} 7 | 5={1;2;[1000023,1000020];1;0;0} 8 | 9 | [Change Primary Setting] 10 | 0={0;2;[1000020];1;0;0} 11 | 12 | [Exposure or Gamma] 13 | 0={0;2;[59];1;0;0} 14 | 15 | [General] 16 | name=Tablet Pro 17 | version=3 18 | 19 | [Pan Canvas] 20 | 0={4;1;[];0;0;0} 21 | 1={3;1;[];0;0;0} 22 | 2={2;1;[];0;0;0} 23 | 3={1;1;[];0;0;0} 24 | 4={0;2;[];4;0;0} 25 | 5={0;2;[20];1;0;0} 26 | 6={0;4;[];0;0;2} 27 | 28 | [Rotate Canvas] 29 | 0={3;1;[36];0;0;0} 30 | 1={4;1;[35];0;0;0} 31 | 2={2;1;[34];0;0;0} 32 | 3={0;2;[1000020];4;0;0} 33 | 4={1;2;[1000020,1000023,20];1;0;0} 34 | 5={0;2;[1000020,20];1;0;0} 35 | 6={0;2;[1000039];1;0;0} 36 | 37 | [Select Layer] 38 | 0={0;2;[52];1;0;0} 39 | 1={1;2;[1000020,52];1;0;0} 40 | 41 | [Show Popup Palette] 42 | 0={0;2;[];2;0;0} 43 | 1={0;1;[1000032];0;0;0} 44 | 45 | [Switch Time] 46 | 0={1;1;[1000012];0;0;0} 47 | 1={0;1;[1000014];0;0;0} 48 | 49 | [Tool Invocation] 50 | 0={2;1;[1000000];0;0;0} 51 | 1={1;1;[1000004];0;0;0} 52 | 2={0;2;[];1;0;0} 53 | 3={1;1;[1000005];0;0;0} 54 | 4={3;2;[56];1;0;0} 55 | 56 | [Zoom Canvas] 57 | 0={5;1;[32];0;0;0} 58 | 1={2;1;[2b];0;0;0} 59 | 10={4;1;[31];0;0;0} 60 | 11={3;1;[2d];0;0;0} 61 | 12={2;1;[3d];0;0;0} 62 | 2={3;3;[];0;2;0} 63 | 3={2;3;[];0;1;0} 64 | 4={0;2;[1000021];4;0;0} 65 | 5={6;1;[33];0;0;0} 66 | 6={1;2;[1000021,1000023,20];1;0;0} 67 | 7={0;2;[1000021,20];1;0;0} 68 | 8={0;4;[];0;0;1} 69 | 9={0;2;[5a];1;0;0} 70 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/kis_brushes.blacklist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /tmp/temporaryKritaBrush.gbr 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/kis_workspaces.blacklist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /.local/share/krita/workspaces/MyWorkSpace.kws 6 | 7 | 8 | /.local/share/krita/workspaces/1048paintaing.kws 9 | 10 | 11 | /.local/share/krita/workspaces/1048paintaing1.kws 12 | 13 | 14 | /.local/share/krita/workspaces/1048paintaing2.kws 15 | 16 | 17 | /.local/share/krita/workspaces/1048paintaingya.kws 18 | 19 | 20 | /.local/share/krita/workspaces/MyWorkSpace II.kws 21 | 22 | 23 | /.local/share/krita/workspaces/MyWrokSpace.kws 24 | 25 | 26 | /.local/share/krita/workspaces/1048ptya_floatToolbox.kws 27 | 28 | 29 | /.local/share/krita/workspaces/1048ptya1.kws 30 | 31 | 32 | /.local/share/krita/workspaces/TicoSpace.kws 33 | 34 | 35 | ~/.local/share/krita/workspaces/MyWorkSpace.kws 36 | 37 | 38 | ~/.local/share/krita/workspaces/MyWorkSpace II.kws 39 | 40 | 41 | ~/.local/share/krita/workspaces/MyWrokSpace.kws 42 | 43 | 44 | ~/.local/share/krita/workspaces/TicoSpace1.kws 45 | 46 | 47 | ~/.local/share/krita/workspaces/TicoSpace.kws 48 | 49 | 50 | ~/.local/share/krita/workspaces/1048ptya_floatToolbox.kws 51 | 52 | 53 | ~/.local/share/krita/workspaces/1048ptya1.kws 54 | 55 | 56 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/ko_palettes.blacklist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /.local/share/krita/palettes/Chino1.gpl 6 | 7 | 8 | /.local/share/krita/palettes/Chino_=_=.gpl 9 | 10 | 11 | /.local/share/krita/palettes/Palette.gpl 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/kritaDefaultshortcuts.rc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/palettes/Chino.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Chino 3 | Columns: 10 4 | # 5 | 255 255 255 Untitled 6 | 0 0 0 Untitled 7 | 253 238 216 Untitled 8 | 249 207 185 Untitled 9 | 243 153 176 Untitled 10 | 24 60 105 Untitled 11 | 78 127 174 Untitled 12 | 142 211 220 Untitled 13 | 240 182 172 Untitled 14 | 133 140 195 Untitled 15 | 123 134 231 Untitled 16 | 57 54 71 Untitled 17 | 255 254 252 Untitled 18 | 229 235 255 Untitled 19 | 164 167 228 Untitled 20 | 186 230 252 Untitled 21 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/palettes/Chino2.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Chino2 3 | Columns: 10 4 | # 5 | 255 255 255 Untitled 6 | 0 0 0 Untitled 7 | 250 250 250 Untitled 8 | 214 227 244 Untitled 9 | 250 212 227 Untitled 10 | 171 170 175 Untitled 11 | 251 253 250 Untitled 12 | 238 237 253 Untitled 13 | 180 173 224 Untitled 14 | 129 134 218 Untitled 15 | 255 241 234 Untitled 16 | 232 183 179 Untitled 17 | 234 200 198 Untitled 18 | 251 213 212 Untitled 19 | 251 213 212 Untitled 20 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/palettes/Chiya.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Chiya 3 | Columns: 5 4 | # 5 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/palettes/Palette.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Palette 1 3 | Columns: 1 4 | # 5 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/palettes/Restia.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: Restia 3 | Columns: 5 4 | # 5 | 254 247 237 Untitled 6 | 252 235 219 Untitled 7 | 248 215 184 Untitled 8 | 189 182 215 Untitled 9 | 87 83 142 Untitled 10 | 133 103 165 Untitled 11 | 68 26 108 Untitled 12 | 142 29 147 Untitled 13 | 223 159 209 Untitled 14 | 114 91 143 Untitled 15 | 77 48 112 Untitled 16 | 75 59 108 Untitled 17 | 114 91 143 Untitled 18 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/2160p__4K_UHD_.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2160 4 | 5 | 120 6 | 3840 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/2K__QWXGA_.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1152 4 | 5 | 120 6 | 2048 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/4K.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2160 4 | 5 | 120 6 | 4096 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/4K_UHD.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2160 4 | 5 | 120 6 | 3840 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/720p__WXGA-H,_min._.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 720 4 | 5 | 120 6 | 1280 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/8K.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4320 4 | 5 | 120 6 | 8192 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/8K_UHD.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4320 4 | 5 | 120 6 | 7680 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/A4__120_ppi_.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 296.96 4 | 5 | 120 6 | 209.97 7 | 0 8 | 0 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/Full_HD.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1080 4 | 5 | 120 6 | 1920 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/QHD.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1440 4 | 5 | 120 6 | 2560 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/predefined_image_sizes/WUXGA.predefinedimage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1200 4 | 5 | 120 6 | 1920 7 | 7 8 | 7 9 | 10 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/kis_brushes_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | deevad-v8-2 6 | deevad-v8 7 | 8 | 9 | deevad-v8-2 10 | deevad-v8 11 | 12 | 13 | deevad-v8-2 14 | 15 | 16 | deevad-v8-2 17 | 18 | 19 | deevad-v8-2 20 | 21 | 22 | deevad-v8-2 23 | 24 | 25 | deevad-v8-2 26 | deevad-v8 27 | 28 | 29 | deevad-v8-2 30 | deevad-v8 31 | 32 | 33 | deevad-v8 34 | 35 | 36 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/kis_resourcebundles_tags.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frantic1048/Vanilla/fe237bc354090bb7bb6b41cab8d4272988aeb4ba/packages/krita/.local/share/krita/tags/kis_resourcebundles_tags.xml -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/kis_taskset_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/kis_workspaces_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/ko_gradients_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/ko_palettes_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/ko_patterns_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/krita/.local/share/krita/tags/psd_layer_style_collections_tags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/makepkg/.makepkg.conf: -------------------------------------------------------------------------------- 1 | #-- for building packages meta 2 | PACKAGER="frantic1048 " 3 | GPGKEY="22D8A46B2CDA6605A1C0CFD1E060B3E215CE49BB" 4 | 5 | MAKEFLAGS="-j32" 6 | 7 | PKGEXT='.pkg.tar.zst' 8 | COMPRESSXZ=(xz -c -z - --threads=0) 9 | COMPRESSZST=(zstd -c -z -q -T0 --ultra -21 -) 10 | -------------------------------------------------------------------------------- /packages/mako/mako/config: -------------------------------------------------------------------------------- 1 | # man 5 mako 2 | 3 | background-color=#00000060 4 | border-color=#0000003a 5 | 6 | # milliseconds 7 | default-timeout=4200 8 | -------------------------------------------------------------------------------- /packages/mise/mise/config.toml: -------------------------------------------------------------------------------- 1 | [settings] 2 | # Disable most of the core plugins 3 | # Only Ruby is supposed to be enabled 4 | # https://mise.jdx.dev/lang/bun.html 5 | disable_tools = [ 6 | 'node', 7 | 'bun', 8 | 'deno', 9 | 'python', 10 | 'rust', 11 | 'java', 12 | 'go', 13 | 'erlang', 14 | ] 15 | -------------------------------------------------------------------------------- /packages/nano/nano/nanorc: -------------------------------------------------------------------------------- 1 | # arch linux 2 | include "/usr/share/nano/*.nanorc" 3 | # macos 4 | include "~/repo/misc/nanorc/*.nanorc" 5 | 6 | unset breaklonglines 7 | set tabsize 4 8 | set tabstospaces 9 | set nohelp 10 | set quickblank 11 | set regexp 12 | set smarthome 13 | -------------------------------------------------------------------------------- /packages/ncdu/ncdu/config: -------------------------------------------------------------------------------- 1 | # https://dev.yorhel.nl/ncdu/man 2 | --color dark 3 | --disable-delete -------------------------------------------------------------------------------- /packages/neovim/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- https://neovim.io/doc/user/starting.html#config 2 | require("config.lazy") 3 | -------------------------------------------------------------------------------- /packages/neovim/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, 3 | "nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" }, 4 | "nvim-treesitter": { "branch": "master", "commit": "70d44dad700512460aa76e9299ed00e0f53f3164" }, 5 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" } 6 | } 7 | -------------------------------------------------------------------------------- /packages/neovim/nvim/lua/config/lazy.lua: -------------------------------------------------------------------------------- 1 | -- Bootstrap lazy.nvim 2 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 3 | if not (vim.uv or vim.loop).fs_stat(lazypath) then 4 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" 5 | local out = vim.fn.system({"git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath}) 6 | if vim.v.shell_error ~= 0 then 7 | vim.api.nvim_echo({{"Failed to clone lazy.nvim:\n", "ErrorMsg"}, {out, "WarningMsg"}, 8 | {"\nPress any key to exit..."}}, true, {}) 9 | vim.fn.getchar() 10 | os.exit(1) 11 | end 12 | end 13 | vim.opt.rtp:prepend(lazypath) 14 | 15 | -- Make sure to setup `mapleader` and `maplocalleader` before 16 | -- loading lazy.nvim so that mappings are correct. 17 | -- This is also a good place to setup other settings (vim.opt) 18 | vim.g.mapleader = " " 19 | vim.g.maplocalleader = "\\" 20 | 21 | -- Setup lazy.nvim 22 | require("lazy").setup({ 23 | spec = { -- import your plugins 24 | { 25 | import = "plugins" 26 | }}, 27 | -- Configure any other settings here. See the documentation for more details. 28 | -- colorscheme that will be used when installing plugins. 29 | install = { 30 | colorscheme = {"habamax"} 31 | }, 32 | -- automatically check for plugin updates 33 | checker = { 34 | enabled = true 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /packages/neovim/nvim/lua/plugins/00.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-treesitter/nvim-treesitter", 4 | build = function() 5 | require("nvim-treesitter.install").update({ with_sync = true })() 6 | end, 7 | }, 8 | { 9 | "nvim-treesitter/nvim-treesitter-textobjects", 10 | }, 11 | { 12 | "kylechui/nvim-surround", 13 | version = "*", -- Use for stability; omit to use `main` branch for the latest features 14 | event = "VeryLazy", 15 | config = function() 16 | require("nvim-surround").setup({ 17 | -- Configuration here, or leave empty to use defaults 18 | }) 19 | end 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/npm/.npmrc: -------------------------------------------------------------------------------- 1 | prefix=~/.local/share/npm 2 | save-exact=true 3 | save-prefix= 4 | -------------------------------------------------------------------------------- /packages/nushell/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | history\.txt 2 | -------------------------------------------------------------------------------- /packages/nushell/nushell/.gitignore: -------------------------------------------------------------------------------- 1 | history.txt 2 | -------------------------------------------------------------------------------- /packages/nushell/nushell/env.nu: -------------------------------------------------------------------------------- 1 | # Nushell Environment Config File 2 | # https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_env.nu 3 | 4 | $env.PROMPT_INDICATOR = {|| "> " } 5 | $env.PROMPT_INDICATOR_VI_INSERT = {|| ": " } 6 | $env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " } 7 | $env.PROMPT_MULTILINE_INDICATOR = {|| "::: " } 8 | 9 | # If you want previously entered commands to have a different prompt from the usual one, 10 | # you can uncomment one or more of the following lines. 11 | # This can be useful if you have a 2-line prompt and it's taking up a lot of space 12 | # because every command entered takes up 2 lines instead of 1. You can then uncomment 13 | # the line below so that previously entered commands show with a single `🚀`. 14 | # $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " } 15 | # $env.TRANSIENT_PROMPT_INDICATOR = {|| "" } 16 | # $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" } 17 | # $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" } 18 | # $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" } 19 | # $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" } 20 | 21 | # Specifies how environment variables are: 22 | # - converted from a string to a value on Nushell startup (from_string) 23 | # - converted from a value back to a string when running external commands (to_string) 24 | # Note: The conversions happen *after* config.nu is loaded 25 | $env.ENV_CONVERSIONS = { 26 | "PATH": { 27 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 28 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 29 | } 30 | "Path": { 31 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 32 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 33 | } 34 | } 35 | 36 | # To add entries to PATH (on Windows you might use Path), you can use the following pattern: 37 | # $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path') 38 | 39 | # DO NOT REMOVE THESES NU_*_DIRS DEFAULTS! 40 | # otherwise `config.nu` will not be able to use the default values 41 | 42 | # Directories to search for scripts when calling source or use 43 | # The default for this is $nu.default-config-dir/scripts 44 | $env.NU_LIB_DIRS = [ 45 | ($nu.default-config-dir | path join 'scripts') # add /scripts 46 | ] 47 | 48 | # Directories to search for plugin binaries when calling register 49 | # The default for this is $nu.default-config-dir/plugins 50 | $env.NU_PLUGIN_DIRS = [ 51 | ($nu.default-config-dir | path join 'plugins') # add /plugins 52 | ] 53 | 54 | mkdir ~/.cache/starship 55 | starship init nu | save -f ~/.cache/starship/init.nu 56 | -------------------------------------------------------------------------------- /packages/nushell/nushell/scripts/dhd.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | # Directory History Daemon 4 | -------------------------------------------------------------------------------- /packages/nushell/nushell/scripts/g.nu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | 4 | const date_relative = "--date=relative" 5 | const ff = "--ff-only" 6 | const oneline = "--pretty=oneline" 7 | 8 | const ref_format = '' 9 | + ' --format=%(HEAD)' 10 | + ' %(color:dim red)%(objectname:short)%(color:reset)' 11 | + ' %(color:bold italic brightblue)%(refname:short)%(color:reset)' 12 | + ' %(color:dim)-%(color:reset)' 13 | + ' %(authorname)' 14 | + ' %(color:dim)[%(color:reset)%(color:brightmagenta)%(committerdate:relative)%(color:reset)%(color:dim)]%(color:reset)' 15 | 16 | 17 | export def main [] { 18 | git status -u 19 | } -------------------------------------------------------------------------------- /packages/pam_env/.pam_environment: -------------------------------------------------------------------------------- 1 | SSH_AGENT_PID DEFAULT= 2 | SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" 3 | 4 | GTK_IM_MODULE DEFAULT=fcitx 5 | QT_IM_MODULE DEFAULT=fcitx 6 | XMODIFIERS DEFAULT="@im=fcitx" 7 | 8 | XDG_CURRENT_DESKTOP=KDE 9 | QT_STYLE_OVERRIDE DEFAULT=kvantum 10 | QT_WAYLAND_DISABLE_WINDOWDECORATION DEFAULT=1 11 | #QT_QPA_PLATFORM DEFAULT=wayland-egl 12 | QT_QPA_PLATFORMTHEME DEFAULT=qt5ct 13 | _JAVA_OPTIONS DEFAULT="-Dawt.useSystemAAFontSettings=on" 14 | 15 | MOZ_X11_EGL=1 16 | MOZ_WEBRENDER=1 17 | 18 | # hidpi stuff 19 | QT_AUTO_SCREEN_SCALE_FACTOR=1 20 | GDK_SCALE=1 21 | # 1.5 * 96 22 | QT_FONT_DPI=144 23 | 24 | # firefox on wayland 25 | # MOZ_ENABLE_WAYLAND=1 26 | -------------------------------------------------------------------------------- /packages/pipewire/.gitignore: -------------------------------------------------------------------------------- 1 | # pipewire 2 | /* 3 | !.gitignore 4 | !/pipewire 5 | /pipewire/* 6 | !/pipewire/pipewire.conf.d 7 | !/pipewire/client.conf.d 8 | -------------------------------------------------------------------------------- /packages/pipewire/pipewire/client.conf.d/10-chino.conf: -------------------------------------------------------------------------------- 1 | stream.properties = { 2 | } 3 | stream.rules = [ 4 | { 5 | # to find pipewire node for mpd: pw-cli ls Node 6 | matches = [ 7 | { 8 | application.name = "Music Player Daemon" 9 | } 10 | ] 11 | actions = { 12 | update-props = { 13 | # resample.disable = true 14 | 15 | # goal: suspend other streams when mpd starts playing 16 | # broken...is this the correct way ? 17 | #node.exclusive = true 18 | } 19 | } 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /packages/pipewire/pipewire/pipewire.conf.d/10-chino.conf: -------------------------------------------------------------------------------- 1 | context.properties = { 2 | # cat /proc/asound//stream0 3 | default.clock.rate = 48000 4 | default.clock.allowed-rates = [ 32000 44100 48000 88200 96000 176400 192000 352800 384000 705600 768000 1411200 ] 5 | } 6 | -------------------------------------------------------------------------------- /packages/proto/.proto/.prototools: -------------------------------------------------------------------------------- 1 | bun = "1.2.14" 2 | deno = "2.3.3" 3 | go = "1.24.3" 4 | node = "23.11.1" 5 | npm = "11.4.1" 6 | pnpm = "10.11.0" 7 | proto = "0.49.3" 8 | python = "3.13.3" 9 | rust = "1.87.0" 10 | uv = "0.7.8" 11 | yarn = "4.9.1" 12 | 13 | [tools.node] 14 | bundled-npm = true 15 | 16 | [tools.npm] 17 | shared-globals-dir = true 18 | 19 | [settings] 20 | auto-install = true 21 | -------------------------------------------------------------------------------- /packages/proto/.proto/tools/node/globals/bin/.gitkeep: -------------------------------------------------------------------------------- 1 | We need to manually create this folder to workaround the following issue: 2 | https://github.com/moonrepo/proto/issues/669 3 | -------------------------------------------------------------------------------- /packages/psd/.config/psd/.psd.conf: -------------------------------------------------------------------------------- 1 | # Automatically generated file; DO NOT EDIT! 2 | # The purpose is to snapshot the settings used when psd was activated. 3 | # Any edits to the live config: /home/chino/.config/psd/psd.conf 4 | # will be applied the _next_ time psd is activated. 5 | # 6 | USE_OVERLAYFS="yes" 7 | BROWSERS="chromium firefox" 8 | USE_BACKUPS="yes" 9 | -------------------------------------------------------------------------------- /packages/psd/.config/psd/psd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # $XDG_HOME_CONFIG/psd/psd.conf 3 | # 4 | # For documentation, refer to the psd man page or the wiki page 5 | # https://wiki.archlinux.org/index.php/Profile-sync-daemon 6 | 7 | ## NOTE the following: 8 | ## To protect data from corruption, in the event that you do make an edit while 9 | ## psd is active, any changes made will be applied the next time you start psd. 10 | 11 | # Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce 12 | # the memory costs and to improve sync/unsync operations. Note that your kernel 13 | # MUST have this module available in order to use this mode 14 | # 15 | # suduers 16 | # chino machine=(root) NOPASSWD: /usr/bin/psd-overlay-helper 17 | USE_OVERLAYFS="yes" 18 | 19 | # List browsers separated by spaces to include in the sync. Useful if you do not 20 | # wish to have all possible browser profiles sync'ed which is the default if 21 | # this variable is left commented. 22 | # 23 | # Possible values: 24 | # chromium 25 | # chromium-dev 26 | # conkeror.mozdev.org 27 | # epiphany 28 | # firefox 29 | # firefox-trunk 30 | # google-chrome 31 | # google-chrome-beta 32 | # google-chrome-unstable 33 | # heftig-aurora 34 | # icecat 35 | # inox 36 | # luakit 37 | # midori 38 | # opera 39 | # opera-beta 40 | # opera-developer 41 | # opera-legacy 42 | # otter-browser 43 | # qupzilla 44 | # qutebrowser 45 | # palemoon 46 | # rekonq 47 | # seamonkey 48 | # surf 49 | # vivaldi 50 | # vivaldi-snapshot 51 | # 52 | BROWSERS="chromium firefox" 53 | 54 | # Uncomment and set to "no" to completely disable the crash recovery feature. 55 | # 56 | # The default is to create crash recovery backups if the system is ungracefully 57 | # powered-down due to a kernel panic, hitting the reset switch, battery going 58 | # dead, etc. Some users keep very diligent backups and don't care to have this 59 | # feature enabled. 60 | #USE_BACKUPS="yes" 61 | 62 | # Uncomment and set to an integer that is the maximum number of crash recovery 63 | # snapshots to keep (the oldest ones are delete first). 64 | # 65 | # The default is to save the most recent 5 crash recovery snapshots. 66 | #BACKUP_LIMIT=5 67 | -------------------------------------------------------------------------------- /packages/pueue/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !/pueue 4 | /pueue/* 5 | !/pueue/pueue.yml -------------------------------------------------------------------------------- /packages/pueue/pueue/pueue.yml: -------------------------------------------------------------------------------- 1 | client: 2 | restart_in_place: false 3 | read_local_logs: true 4 | show_confirmation_questions: false 5 | show_expanded_aliases: false 6 | dark_mode: false 7 | max_status_lines: null 8 | status_time_format: '%H:%M:%S' 9 | status_datetime_format: |- 10 | %Y-%m-%d 11 | %H:%M:%S 12 | daemon: 13 | pause_group_on_failure: false 14 | pause_all_on_failure: false 15 | callback: null 16 | env_vars: {} 17 | callback_log_lines: 10 18 | shell_command: null 19 | shared: 20 | pueue_directory: null 21 | runtime_directory: null 22 | alias_file: null 23 | use_unix_socket: true 24 | unix_socket_path: null 25 | host: 127.0.0.1 26 | port: '6924' 27 | pid_path: null 28 | daemon_cert: null 29 | daemon_key: null 30 | shared_secret_path: null 31 | profiles: {} 32 | -------------------------------------------------------------------------------- /packages/pulseaudio/.gitignore: -------------------------------------------------------------------------------- 1 | # pulseaudio 2 | /* 3 | !.gitignore 4 | !/pulse 5 | /pulse/* 6 | !/pulse/default.pa 7 | !/pulse/daemon.conf 8 | -------------------------------------------------------------------------------- /packages/pulseaudio/pulse/daemon.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see . 15 | 16 | ## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for 17 | ## more information. Default values are commented out. Use either ; or # for 18 | ## commenting. 19 | 20 | ; daemonize = no 21 | ; fail = yes 22 | ; allow-module-loading = yes 23 | ; allow-exit = yes 24 | ; use-pid-file = yes 25 | ; system-instance = no 26 | ; local-server-type = user 27 | ; enable-shm = yes 28 | ; enable-memfd = yes 29 | ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB 30 | ; lock-memory = no 31 | ; cpu-limit = no 32 | 33 | ; high-priority = yes 34 | ; nice-level = -11 35 | 36 | ; realtime-scheduling = yes 37 | ; realtime-priority = 5 38 | 39 | ; exit-idle-time = 20 40 | ; scache-idle-time = 20 41 | 42 | ; dl-search-path = (depends on architecture) 43 | 44 | ; load-default-script-file = yes 45 | ; default-script-file = /etc/pulse/default.pa 46 | 47 | ; log-target = auto 48 | ; log-level = notice 49 | ; log-meta = no 50 | ; log-time = no 51 | ; log-backtrace = 0 52 | 53 | ; avoid-resampling = yes 54 | resample-method = soxr-vhq 55 | ; enable-remixing = yes 56 | ; enable-lfe-remixing = no 57 | ; lfe-crossover-freq = 0 58 | 59 | flat-volumes = no 60 | ; flat-volumes = yes 61 | 62 | ; rlimit-fsize = -1 63 | ; rlimit-data = -1 64 | ; rlimit-stack = -1 65 | ; rlimit-core = -1 66 | ; rlimit-as = -1 67 | ; rlimit-rss = -1 68 | ; rlimit-nproc = -1 69 | ; rlimit-nofile = 256 70 | ; rlimit-memlock = -1 71 | ; rlimit-locks = -1 72 | ; rlimit-sigpending = -1 73 | ; rlimit-msgqueue = -1 74 | ; rlimit-nice = 31 75 | ; rlimit-rtprio = 9 76 | ; rlimit-rttime = 200000 77 | 78 | default-sample-format = float32ne 79 | default-sample-rate = 48000 80 | ; alternate-sample-rate = 48000 81 | default-sample-channels = 2 82 | ; default-channel-map = front-left,front-right 83 | 84 | ; default-fragments = 4 85 | ; default-fragment-size-msec = 25 86 | 87 | ; enable-deferred-volume = yes 88 | ; deferred-volume-safety-margin-usec = 8000 89 | ; deferred-volume-extra-delay-usec = 0 90 | -------------------------------------------------------------------------------- /packages/root/etc/environment: -------------------------------------------------------------------------------- 1 | # 2 | # This file is parsed by pam_env module 3 | # 4 | # Syntax: simple "KEY=VAL" pairs on separate lines 5 | # 6 | 7 | export XDG_CURRENT_DESKTOP=KDE 8 | export QT_QPA_PLATFORMTHEME=kde 9 | -------------------------------------------------------------------------------- /packages/root/etc/modules-load.d/snd-seq-midi.conf: -------------------------------------------------------------------------------- 1 | snd-seq-midi -------------------------------------------------------------------------------- /packages/root/etc/modules-load.d/virtualbox.conf: -------------------------------------------------------------------------------- 1 | vboxdrv -------------------------------------------------------------------------------- /packages/root/etc/sysctl.d/10-ptrace.conf: -------------------------------------------------------------------------------- 1 | kernel.yama.ptrace_scope = 0 2 | -------------------------------------------------------------------------------- /packages/root/etc/udev/rules.d/99-writeintelbacklight.rules: -------------------------------------------------------------------------------- 1 | ACTION=="change", SUBSYSTEM=="backlight", RUN+="/usr/sbin/writeintelbacklight.sh" -------------------------------------------------------------------------------- /packages/root/usr/sbin/writeintelbacklight.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash intelmaxbrightness=`cat /sys/class/backlight/intel_backlight/max_brightness` acpimaxbrightness=`cat /sys/class/backlight/acpi_video0/max_brightness` scale=`expr $intelmaxbrightness / $acpimaxbrightness` acpibrightness=`cat /sys/class/backlight/acpi_video0/brightness` newintelbrightness=`expr $acpibrightness \* $scale` curintelbrightness=`cat /sys/class/backlight/intel_backlight/actual_brightness` if [ "$newintelbrightness" -ne "$curintelbrightness" ] then echo $newintelbrightness > /sys/class/backlight/intel_backlight/brightness fi exit 0 -------------------------------------------------------------------------------- /packages/sakura/sakura/sakura.conf: -------------------------------------------------------------------------------- 1 | [sakura] 2 | colorset1_fore=rgb(192,192,192) 3 | colorset1_back=rgba(0,0,0,0.6) 4 | colorset1_curs=rgb(255,255,255) 5 | colorset1_key=F1 6 | colorset2_fore=rgb(192,192,192) 7 | colorset2_back=rgba(0,0,0,0.6) 8 | colorset2_curs=rgb(255,255,255) 9 | colorset2_key=F2 10 | colorset3_fore=rgb(192,192,192) 11 | colorset3_back=rgba(0,0,0,0.99) 12 | colorset3_curs=rgb(255,255,255) 13 | colorset3_key=F3 14 | colorset4_fore=rgb(192,192,192) 15 | colorset4_back=rgb(0,0,0) 16 | colorset4_curs=rgb(255,255,255) 17 | colorset4_key=F4 18 | colorset5_fore=rgb(192,192,192) 19 | colorset5_back=rgb(0,0,0) 20 | colorset5_curs=rgb(255,255,255) 21 | colorset5_key=F5 22 | colorset6_fore=rgb(192,192,192) 23 | colorset6_back=rgb(0,0,0) 24 | colorset6_curs=rgb(255,255,255) 25 | colorset6_key=F6 26 | last_colorset=1 27 | scroll_lines=4096 28 | font=Fira Mono Medium 8 29 | show_always_first_tab=No 30 | scrollbar=false 31 | closebutton=true 32 | tabs_on_bottom=false 33 | less_questions=true 34 | disable_numbered_tabswitch=false 35 | urgent_bell=Yes 36 | audible_bell=Yes 37 | blinking_cursor=No 38 | allow_bold=Yes 39 | cursor_type=VTE_CURSOR_SHAPE_BLOCK 40 | palette=gruvbox 41 | add_tab_accelerator=5 42 | del_tab_accelerator=5 43 | switch_tab_accelerator=8 44 | move_tab_accelerator=5 45 | copy_accelerator=5 46 | scrollbar_accelerator=5 47 | open_url_accelerator=5 48 | font_size_accelerator=4 49 | set_tab_name_accelerator=5 50 | add_tab_key=T 51 | del_tab_key=W 52 | prev_tab_key=Left 53 | next_tab_key=Right 54 | copy_key=C 55 | paste_key=V 56 | scrollbar_key=S 57 | set_tab_name_key=N 58 | increase_font_size_key=plus 59 | decrease_font_size_key=minus 60 | fullscreen_key=F11 61 | set_colorset_accelerator=5 62 | icon_file=terminal-tango.svg 63 | use_fading=false 64 | scrollable_tabs=true 65 | stop_tab_cycling_at_end_tabs=No 66 | word_chars=-,./?%&#_~: 67 | -------------------------------------------------------------------------------- /packages/sapling/sapling/sapling.conf: -------------------------------------------------------------------------------- 1 | [ui] 2 | username = Jiahao Guo 3 | 4 | [gpg] 5 | key = 22D8A46B2CDA6605A1C0CFD1E060B3E215CE49BB 6 | enabled = false 7 | 8 | [isl] 9 | render-compact = false 10 | -------------------------------------------------------------------------------- /packages/sketchybar/sketchybar/plugins/battery.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1) 4 | CHARGING=$(pmset -g batt | grep 'AC Power') 5 | 6 | if [ "$PERCENTAGE" = "" ]; then 7 | exit 0 8 | fi 9 | 10 | case "${PERCENTAGE}" in 11 | 9[0-9]|100) ICON="" 12 | ;; 13 | [6-8][0-9]) ICON="" 14 | ;; 15 | [3-5][0-9]) ICON="" 16 | ;; 17 | [1-2][0-9]) ICON="" 18 | ;; 19 | *) ICON="" 20 | esac 21 | 22 | if [[ "$CHARGING" != "" ]]; then 23 | ICON="" 24 | fi 25 | 26 | sketchybar --set $NAME icon="$ICON" label="${PERCENTAGE}%" 27 | -------------------------------------------------------------------------------- /packages/sketchybar/sketchybar/plugins/clock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | sketchybar --set "$NAME" label="$(date '+%F %H:%M:%S | %A')" 4 | 5 | -------------------------------------------------------------------------------- /packages/sketchybar/sketchybar/plugins/space.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | sketchybar --set $NAME background.drawing=$SELECTED 4 | -------------------------------------------------------------------------------- /packages/sketchybar/sketchybar/plugins/window_title.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | sketchybar --set "$NAME" label="$INFO" 4 | -------------------------------------------------------------------------------- /packages/sketchybar/sketchybar/sketchybarrc: -------------------------------------------------------------------------------- 1 | # This is a demo config to show some of the most important commands more easily. 2 | # This is meant to be changed and configured, as it is intentionally kept sparse. 3 | # For a more advanced configuration example see my dotfiles: 4 | # https://github.com/FelixKratz/dotfiles 5 | 6 | PLUGIN_DIR="$HOME/.config/sketchybar/plugins" 7 | 8 | ##### Bar Appearance ##### 9 | # Configuring the general appearance of the bar, these are only some of the 10 | # options available. For all options see: 11 | # https://felixkratz.github.io/SketchyBar/config/bar 12 | # If you are looking for other colors, see the color picker: 13 | # https://felixkratz.github.io/SketchyBar/config/tricks#color-picker 14 | 15 | sketchybar --bar height=24 \ 16 | blur_radius=50 \ 17 | position=top \ 18 | padding_left=10 \ 19 | padding_right=10 \ 20 | color=0x15ffffff 21 | 22 | ##### Changing Defaults ##### 23 | # We now change some default values that are applied to all further items 24 | # For a full list of all available item properties see: 25 | # https://felixkratz.github.io/SketchyBar/config/items 26 | 27 | sketchybar --default updates=when_shown \ 28 | drawing=on \ 29 | icon.font="Hack Nerd Font:Bold:17.0" \ 30 | icon.color=0xff333333 \ 31 | label.font="Hack Nerd Font:Bold:14.0" \ 32 | label.color=0xff333333 \ 33 | label.padding_left=4 \ 34 | label.padding_right=4 \ 35 | icon.padding_left=4 \ 36 | icon.padding_right=4 37 | 38 | ##### Adding Mission Control Space Indicators ##### 39 | # Now we add some mission control spaces: 40 | # https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item 41 | # to indicate active and available mission control spaces 42 | 43 | ~/bin/yabaictl.elv --init-sketchybar-spaces 44 | 45 | ##### Adding Left Items ##### 46 | # We add some regular items to the left side of the bar 47 | # only the properties deviating from the current defaults need to be set 48 | 49 | sketchybar --add item space_separator left \ 50 | --set space_separator icon= \ 51 | background.padding_left=15 \ 52 | background.padding_right=15 \ 53 | label.drawing=off \ 54 | \ 55 | --add item window_title left \ 56 | --set window_title script="$PLUGIN_DIR/window_title.sh" \ 57 | icon.drawing=off \ 58 | --subscribe window_title front_app_switched 59 | 60 | ##### Adding Right Items ##### 61 | # In the same way as the left items we can add items to the right side. 62 | # Additional position (e.g. center) are available, see: 63 | # https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar 64 | 65 | sketchybar --add item clock right \ 66 | --set clock update_freq=1 \ 67 | script="$PLUGIN_DIR/clock.sh" \ 68 | \ 69 | --add item battery right \ 70 | --set battery script="$PLUGIN_DIR/battery.sh" \ 71 | update_freq=10 \ 72 | --subscribe battery system_woke 73 | 74 | ##### Finalizing Setup ##### 75 | # The below command is only needed at the end of the initial configuration and 76 | # should never be run in an item script. 77 | 78 | sketchybar --update 79 | 80 | echo "sketchybar configuration loaded.." 81 | -------------------------------------------------------------------------------- /packages/skhd/skhd/skhdrc: -------------------------------------------------------------------------------- 1 | # https://anuj-chandra.medium.com/using-i3-like-tiling-window-managers-in-macos-with-yabai-ebf0e002b992 2 | 3 | # apps 4 | # for keycode, run: skhd -o 5 | # 0x24: enter key 6 | # alt - 0x24: wezterm start 7 | alt - 0x24: kitty 8 | 9 | # https://github.com/koekeishiya/yabai/wiki/Commands#window-commands 10 | alt - n: yabai -m window --focus west 11 | alt - e: yabai -m window --focus south 12 | alt - i: yabai -m window --focus north 13 | alt - o: yabai -m window --focus east 14 | alt + shift - n: yabai -m window --swap west 15 | alt + shift - e: yabai -m window --swap south 16 | alt + shift - i: yabai -m window --swap north 17 | alt + shift - o: yabai -m window --swap east 18 | 19 | ctrl - z: yabai -m space --focus recent 20 | ctrl - 1: ~/bin/yabaictl.elv --switch-to-space 1 21 | ctrl - 2: ~/bin/yabaictl.elv --switch-to-space 2 22 | ctrl - 3: ~/bin/yabaictl.elv --switch-to-space 3 23 | ctrl - 4: ~/bin/yabaictl.elv --switch-to-space 4 24 | ctrl - 5: ~/bin/yabaictl.elv --switch-to-space 5 25 | 26 | # TODO: implement related feature with yabai-switch-space.elv 27 | ctrl + shift - 1: yabai -m window --space 1; yabai -m space --focus 1 28 | ctrl + shift - 2: yabai -m window --space 2; yabai -m space --focus 2 29 | ctrl + shift - 3: yabai -m window --space 3; yabai -m space --focus 3 30 | ctrl + shift - 4: yabai -m window --space 4; yabai -m space --focus 4 31 | ctrl + shift - 5: yabai -m window --space 5; yabai -m space --focus 5 32 | 33 | # toggle bsp/float 34 | alt + shift - space: yabai -m window --toggle float 35 | # toggle bsp/stack 36 | # ctrl + shift - space: yabai -m space --layout "$(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end')" 37 | -------------------------------------------------------------------------------- /packages/starship/starship.toml: -------------------------------------------------------------------------------- 1 | "$schema" = 'https://starship.rs/config-schema.json' 2 | 3 | command_timeout = 10000 4 | 5 | [git_branch] 6 | style = 'bold bright-green' 7 | 8 | [shell] 9 | disabled = false 10 | elvish_indicator = "~" 11 | format = '[$indicator]($style)' 12 | 13 | # Nerd Fonts 14 | # https://www.nerdfonts.com/cheat-sheet 15 | # MEMO: trailing space is required 16 | [bun] 17 | symbol = "\ue76f " 18 | 19 | [c] 20 | symbol = "\ue771 " 21 | 22 | [cmake] 23 | symbol = "\ue794 " 24 | 25 | [docker_context] 26 | symbol = "\ue7b0 " 27 | 28 | [deno] 29 | symbol = "\ue7c0 " 30 | detect_files = [ 31 | 'deno.json', 32 | 'deno.jsonc', 33 | 'deno.lock', 34 | 'mod.ts', 35 | 'mod.js', 36 | 'deps.ts', 37 | 'deps.js', 38 | '.dvmrc', 39 | ] 40 | 41 | [dotnet] 42 | symbol = "\U000f0aae " 43 | 44 | [elm] 45 | symbol = "\ue7ce " 46 | 47 | [golang] 48 | symbol = "\ue724 " 49 | 50 | [guix_shell] 51 | symbol = "\uf325 " 52 | 53 | [lua] 54 | symbol = "\ue826 " 55 | 56 | [nim] 57 | symbol = "\ue841 " 58 | 59 | [nix_shell] 60 | symbol = "\ue843 " 61 | 62 | [nodejs] 63 | symbol = "\ued0d " 64 | 65 | [ocaml] 66 | symbol = "\ue84e " 67 | 68 | [python] 69 | symbol = "\ue73c " 70 | 71 | [ruby] 72 | symbol = "\ue739 " 73 | 74 | [rust] 75 | symbol = "\uf323 " 76 | 77 | [terraform] 78 | symbol = "\ue8bd " 79 | 80 | [typst] 81 | symbol = "\uf37f " 82 | -------------------------------------------------------------------------------- /packages/stow/.stow-global-ignore: -------------------------------------------------------------------------------- 1 | # Comments and blank lines are allowed. 2 | 3 | RCS 4 | .+,v 5 | 6 | CVS 7 | \.\#.+ # CVS conflict files / emacs lock files 8 | \.cvsignore 9 | 10 | \.svn 11 | _darcs 12 | \.hg 13 | 14 | \.git 15 | 16 | .+~ # emacs backup files 17 | \#.*\# # emacs autosave files 18 | 19 | ^/README.* 20 | ^/LICENSE.* 21 | ^/COPYING 22 | -------------------------------------------------------------------------------- /packages/swayshot/swayshot.sh: -------------------------------------------------------------------------------- 1 | SWAYSHOT_SCREENSHOTS="$(realpath ~)/Pictures/screenshots/" 2 | -------------------------------------------------------------------------------- /packages/sxiv/sxiv/exec/image-info: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Example for $XDG_CONFIG_HOME/sxiv/exec/image-info 4 | # Called by sxiv(1) whenever an image gets loaded, 5 | # with the name of the image file as its first argument. 6 | # The output is displayed in sxiv's status bar. 7 | 8 | s=" | " # field separator 9 | 10 | filename=$(basename "$1") 11 | filesize=$(du -Hh "$1" | cut -f 1) 12 | 13 | geometry=$(identify -format '%wx%h' "$1[0]") 14 | 15 | tags=$(exiv2 -q -P v -g "Iptc.Application2.Keywords" "$1" | tr '\n' ',') 16 | tags=${tags%,} 17 | 18 | echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}" 19 | 20 | -------------------------------------------------------------------------------- /packages/tealdeer/tealdeer/config.toml: -------------------------------------------------------------------------------- 1 | [updates] 2 | auto_update = true 3 | -------------------------------------------------------------------------------- /packages/tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | set -g mouse on 2 | -------------------------------------------------------------------------------- /packages/vscode/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | ^/User/globalStorage 2 | ^/User/workspaceStorage 3 | ^/User/History 4 | ^/User/sync 5 | -------------------------------------------------------------------------------- /packages/vscode/User/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !/.gitignore 3 | !/keybindings.json 4 | !/settings.json 5 | -------------------------------------------------------------------------------- /packages/vscode/User/keybindings.json: -------------------------------------------------------------------------------- 1 | // Place your key bindings in this file to overwrite the defaults 2 | [ 3 | // Editor actions 4 | { 5 | "key": "ctrl+.", 6 | "command": "editor.action.quickFix", 7 | "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" 8 | }, 9 | { 10 | "key": "ctrl+,", 11 | "command": "editor.action.formatDocument" 12 | }, 13 | 14 | // Panels and sidebars 15 | { 16 | "key": "ctrl+e", 17 | "command": "-workbench.action.quickOpenNavigateNextInFilePicker" 18 | }, 19 | { 20 | "key": "shift+cmd+g", 21 | "command": "workbench.view.scm" 22 | }, 23 | { 24 | "key": "ctrl+shift+g", 25 | "command": "-workbench.view.scm" 26 | }, 27 | { 28 | "key": "shift+cmd+e", 29 | "command": "workbench.files.action.showActiveFileInExplorer" 30 | }, 31 | { 32 | "key": "ctrl+shift+m", 33 | "command": "-workbench.actions.view.problems", 34 | "when": "workbench.panel.markers.view.active" 35 | }, 36 | { 37 | "key": "ctrl+shift+m", 38 | "command": "-markdown.showPreviewToSide" 39 | }, 40 | { 41 | "key": "ctrl+shift+m", 42 | "command": "editor.action.selectToBracket" 43 | }, 44 | { 45 | "key": "ctrl+\\", 46 | "command": "workbench.action.toggleSidebarVisibility" 47 | }, 48 | { 49 | "key": "ctrl+shift+\\", 50 | "command": "workbench.action.toggleAuxiliaryBar" 51 | }, 52 | { 53 | "key": "cmd+shift+\\", 54 | "command": "workbench.action.toggleAuxiliaryBar" 55 | }, 56 | 57 | // Editor selection 58 | { 59 | "key": "cmd+y", 60 | "command": "editor.action.smartSelect.expand", 61 | "when": "editorTextFocus" 62 | }, 63 | { 64 | "key": "cmd+u", 65 | "command": "editor.action.smartSelect.shrink", 66 | "when": "editorTextFocus" 67 | }, 68 | // Editor split 69 | { 70 | "key": "cmd+k left", 71 | "command": "workbench.action.splitEditorLeft" 72 | }, 73 | { 74 | "key": "cmd+k right", 75 | "command": "workbench.action.splitEditorRight" 76 | }, 77 | { 78 | "key": "cmd+k up", 79 | "command": "workbench.action.splitEditorUp" 80 | }, 81 | { 82 | "key": "cmd+k down", 83 | "command": "workbench.action.splitEditorDown" 84 | }, 85 | 86 | // Disable Cursor's conflicting keybindings 87 | { 88 | "key": "shift+cmd+k", 89 | "command": "-aipopup.action.modal.generate", 90 | "when": "editorFocus && !composerBarIsVisible && !composerControlPanelIsVisible" 91 | }, 92 | { 93 | "key": "cmd+k", 94 | "command": "-aipopup.action.modal.generate", 95 | "when": "editorFocus && !composerBarIsVisible && !composerControlPanelIsVisible" 96 | }, 97 | { 98 | "key": "cmd+k", 99 | "command": "-composer.startComposerPrompt", 100 | "when": "composerIsEnabled" 101 | }, 102 | { 103 | "key": "cmd+i", 104 | "command": "composerMode.agent" 105 | } 106 | ] 107 | -------------------------------------------------------------------------------- /packages/waybar/waybar/config: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "bottom", 4 | "output": "!HEADLESS-1", 5 | "modules-left": ["sway/workspaces", "sway/mode"], 6 | "modules-center": [], 7 | "__BAD_APPLE__modules-right": ["mpd", "temperature", "custom/fan", "clock", "tray"], 8 | "modules-right": ["mpd", "temperature", "battery", "clock", "tray"], 9 | "custom/mpris": { 10 | "format": "\uf025 {}", 11 | "exec": "~/bin/fffplaying.elv" 12 | }, 13 | "custom/fan": { 14 | "format": "\uf72e {}", 15 | "exec": "~/bin/fffrpm.elv" 16 | }, 17 | "sway/window": { 18 | "max-length": 50 19 | }, 20 | "temperature": { 21 | "format": "\uf7e4 {temperatureC}°C", 22 | "thermal-zone": 7, 23 | "interval": 2, 24 | "hwmon-path": "/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input", 25 | "critical-threshold": 80 26 | }, 27 | "cpu": { 28 | "format": "\uf787 {usage}%", 29 | }, 30 | "memory": { 31 | "format": "\uf818 {used:0.1f}/{avail:0.1f}GiB", 32 | }, 33 | "clock": { 34 | "format": "\uf073 {:%a, %d. %b %H:%M}" 35 | }, 36 | "tray": { 37 | "icon-size": 18, 38 | "spacing": 5 39 | }, 40 | "mpd": { 41 | "format": "\uf001 {artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}", 42 | "format-disconnected": "\uf001 Disconnected", 43 | "format-stopped": "\uf001 {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped", 44 | "interval": 2, 45 | "consume-icons": { 46 | "on": " " 47 | }, 48 | "random-icons": { 49 | "on": " " 50 | }, 51 | "repeat-icons": { 52 | "on": " " 53 | }, 54 | "single-icons": { 55 | "on": "1 " 56 | }, 57 | "state-icons": { 58 | "paused": "", 59 | "playing": "" 60 | }, 61 | "tooltip-format": "MPD (connected)", 62 | "tooltip-format-disconnected": "MPD (disconnected)" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /packages/waybar/waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | border: none; 3 | border-radius: 0; 4 | font-family: 5 | "Noto Sans CJK SC", 6 | "Font Awesome 6 Free", /* `otf-font-awesome` */ 7 | sans-serif; 8 | font-weight: 400; 9 | font-size: 12px; 10 | min-height: 0; 11 | } 12 | 13 | window#waybar { 14 | background-color: rgba(0, 0, 0, 0.75); 15 | border-bottom: 3px solid rgba(117, 107, 168, 0.5); 16 | color: #ffffff; 17 | transition-property: background-color; 18 | transition-duration: .5s; 19 | } 20 | 21 | window#waybar.hidden { 22 | opacity: 0.2; 23 | } 24 | 25 | /* 26 | window#waybar.empty { 27 | background-color: transparent; 28 | } 29 | window#waybar.solo { 30 | background-color: #FFFFFF; 31 | } 32 | */ 33 | 34 | window#waybar.termite { 35 | background-color: #3F3F3F; 36 | } 37 | 38 | window#waybar.chromium { 39 | background-color: #000000; 40 | border: none; 41 | } 42 | 43 | /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ 44 | #workspaces button { 45 | padding: 0 5px; 46 | background-color: transparent; 47 | color:#eef; 48 | border-bottom: 3px solid transparent; 49 | } 50 | 51 | #workspaces button.focused {} 52 | 53 | #workspaces button.urgent { 54 | background-color: #eb4e4b; 55 | } 56 | 57 | #mode {} 58 | 59 | #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #tray, #mode, #idle_inhibitor, #mpd, 60 | #custom-fan, #custom-mpris, 61 | #workspaces button.focused { 62 | padding: 0 10px; 63 | margin: 0 5px; 64 | color: #ffffff; 65 | background: linear-gradient(to top, 66 | rgba(107,100,125,0.6) 0%, 67 | rgba(107,100,125,0.3) 30%, 68 | rgba(107,100,125,0) 100% 69 | ); 70 | border-bottom: 3px solid rgba(182, 152, 238, 0.75); 71 | } 72 | 73 | #clock {} 74 | 75 | /* 76 | #battery { 77 | background-color: #ffffff; 78 | color: #000000; 79 | } 80 | 81 | #battery.charging { 82 | color: #ffffff; 83 | background-color: #26A65B; 84 | } 85 | */ 86 | 87 | @keyframes blink { 88 | to { 89 | background-color: #ffffff; 90 | color: #000000; 91 | } 92 | } 93 | 94 | #battery.critical:not(.charging) { 95 | background-color: #f53c3c; 96 | color: #ffffff; 97 | animation-name: blink; 98 | animation-duration: 0.5s; 99 | animation-timing-function: linear; 100 | animation-iteration-count: infinite; 101 | animation-direction: alternate; 102 | } 103 | 104 | label:focus { 105 | background-color: #000000; 106 | } 107 | 108 | #cpu { 109 | /* background-color: #2ecc71; */ 110 | /* color: #000000; */ 111 | } 112 | 113 | #memory { 114 | /* background-color: #9b59b6; */ 115 | } 116 | 117 | #backlight { 118 | background-color: #90b1b1; 119 | } 120 | 121 | #network { 122 | background-color: #2980b9; 123 | } 124 | 125 | #network.disconnected { 126 | background-color: #f53c3c; 127 | } 128 | 129 | #pulseaudio { 130 | background-color: #f1c40f; 131 | color: #000000; 132 | } 133 | 134 | #pulseaudio.muted { 135 | background-color: #90b1b1; 136 | color: #2a5c45; 137 | } 138 | 139 | #custom-media { 140 | background-color: #66cc99; 141 | color: #2a5c45; 142 | min-width: 100px; 143 | } 144 | 145 | #custom-media.custom-spotify { 146 | background-color: #66cc99; 147 | } 148 | 149 | #custom-media.custom-vlc { 150 | background-color: #ffa000; 151 | } 152 | 153 | #temperature {} 154 | 155 | #temperature.critical { 156 | background-color: #eb4d4b; 157 | } 158 | 159 | #tray {} 160 | 161 | #idle_inhibitor { 162 | background-color: #2d3436; 163 | } 164 | 165 | #idle_inhibitor.activated { 166 | background-color: #ecf0f1; 167 | color: #2d3436; 168 | } 169 | 170 | #mpd { 171 | } 172 | 173 | #mpd.disconnected { 174 | } 175 | 176 | #mpd.stopped { 177 | } 178 | 179 | #mpd.paused { 180 | } 181 | -------------------------------------------------------------------------------- /packages/wezterm/program.home.nix: -------------------------------------------------------------------------------- 1 | let 2 | extraConfig = builtins.readFile ./.wezterm.lua; 3 | in 4 | { 5 | programs.wezterm = { 6 | enable = true; 7 | inherit extraConfig; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/wezterm/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | -- See https://wezfurlong.org/wezterm/ 2 | -- Add config folder to watchlist for config reloads. 3 | local wezterm = require 'wezterm'; 4 | wezterm.add_to_config_reload_watch_list(wezterm.config_dir) 5 | 6 | local wezterm = require 'wezterm' 7 | 8 | return { 9 | -- FIXME: macOS homebrew x86_64 and aarch64 have different paths 10 | -- /usr/local/bin/elvish -- x86_64 11 | -- /opt/homebrew/bin/elvish -- aarch64 12 | -- default_prog = {'/usr/local/bin/elvish'}, 13 | 14 | -- light 15 | -- color_scheme = 'Spring', 16 | -- color_scheme = 'Tango', 17 | colors = { 18 | -- GitHub colors 19 | -- https://www.npmjs.com/package/@primer/primitives?activeTab=code 20 | -- find proper `ansi` key 21 | 22 | -- dark 23 | background = '#0a0a0a', 24 | foreground = '#cecfcf', 25 | ansi = {'#24292f', '#ff8182', '#4ac26b', "#d4a72c", "#54aeff", "#c297ff", "#76e3ea", '#d0d7de'}, 26 | brights = {'#32383f', '#ffaba8', '#6fdd8b', "#eac54f", "#80ccff", "#d8b9ff", "#b3f0ff", '#d0d7de'} 27 | 28 | -- light 29 | -- background = '#fafbf9', 30 | -- foreground = '#3a3a3a', 31 | -- ansi = {"#24292f", "#cf222e", "#116329", "#4d2d00", "#0969da", "#8250df", "#1b7c83", "#6e7781"}, 32 | -- brights = {"#57606a", "#a40e26", "#1a7f37", "#633c01", "#218bff", "#a475f9", "#3192aa", "#8c959f"} 33 | }, 34 | 35 | font = wezterm.font 'JetBrains Mono', 36 | window_background_opacity = 0.64, 37 | -- enable_tab_bar = false, 38 | hide_tab_bar_if_only_one_tab = true 39 | } 40 | -------------------------------------------------------------------------------- /packages/yabai/yabai/yabairc: -------------------------------------------------------------------------------- 1 | # minimal config to work with AeroSpace 2 | 3 | yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" 4 | sudo yabai --load-sa 5 | 6 | defaults write .GlobalPreferences com.apple.mouse.scaling -1 7 | 8 | # set mouse interaction modifier key (default: fn) 9 | yabai -m config mouse_modifier cmd 10 | 11 | # set modifier + left-click drag to move window (default: move) 12 | yabai -m config mouse_action1 move 13 | 14 | # set modifier + right-click drag to resize window (default: resize) 15 | yabai -m config mouse_action2 resize 16 | 17 | # rules 18 | # https://github.com/koekeishiya/yabai/wiki/Commands#querying-information 19 | yabai -m rule --add app=".*" manage=off 20 | -------------------------------------------------------------------------------- /packages/yabai/yabai/yabairc.yabai: -------------------------------------------------------------------------------- 1 | yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" 2 | sudo yabai --load-sa 3 | 4 | defaults write .GlobalPreferences com.apple.mouse.scaling -1 5 | 6 | ~/bin/yabaictl.elv --init-space-labels 7 | 8 | # yabai -m config external_bar all:24:0 9 | yabai -m config layout bsp 10 | yabai -m config top_padding 2 11 | yabai -m config bottom_padding 2 12 | yabai -m config left_padding 2 13 | yabai -m config right_padding 2 14 | yabai -m config window_gap 2 15 | 16 | # set mouse interaction modifier key (default: fn) 17 | yabai -m config mouse_modifier cmd 18 | 19 | # set modifier + left-click drag to move window (default: move) 20 | yabai -m config mouse_action1 move 21 | 22 | # set modifier + right-click drag to resize window (default: resize) 23 | yabai -m config mouse_action2 resize 24 | 25 | yabai -m config focus_follows_mouse on 26 | yabai -m config mouse_follows_focus off 27 | 28 | # FIXME: deprecated feature 29 | # floating windows are always on top (default: off) 30 | # yabai -m config window_topmost on 31 | 32 | # modify window shadows (default: on, options: on, off, float) 33 | # example: show shadows only for floating windows 34 | yabai -m config window_shadow float 35 | 36 | # rules 37 | # https://github.com/koekeishiya/yabai/wiki/Commands#querying-information 38 | 39 | # MacOS builtin apps 40 | # MacOS < 13.0 (Monterey and older) 41 | yabai -m rule --add app="^System Preferences$" manage=off 42 | # MacOS >= 13.0(Ventura) 43 | yabai -m rule --add app="^System Settings$" manage=off 44 | 45 | yabai -m rule --add app="^System Information$" manage=off 46 | yabai -m rule --add app="^Weather$" manage=off 47 | 48 | # other apps 49 | yabai -m rule --add app="^Raycast$" manage=off 50 | yabai -m rule --add app="^Preview$" manage=off 51 | yabai -m rule --add app="^Music$" manage=off 52 | yabai -m rule --add app="^Rancher Desktop$" manage=off 53 | yabai -m rule --add app="^calibrite PROFILER$" manage=off 54 | -------------------------------------------------------------------------------- /packages/zsh/.zshenv: -------------------------------------------------------------------------------- 1 | # https://zsh.sourceforge.io/Intro/intro_3.html 2 | # `.zshenv` is sourced on all invocations of the shell, unless the -f option is set. 3 | # It should contain commands to set the command search path, plus other important environment variables. 4 | # `.zshenv` should not contain commands that produce output or assume the shell is attached to a tty. 5 | 6 | eval "$(~/bin/shellenv)" 7 | -------------------------------------------------------------------------------- /packages/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # shellcheck shell=zsh 2 | # interactive shell 3 | eval "$(starship init zsh)" 4 | -------------------------------------------------------------------------------- /raycast-and-finder.md: -------------------------------------------------------------------------------- 1 | - Disable Spotlight indexing: `sudo mdutil -a -i off` (it does not work well with massive files, e.g. node_modules) 2 | 3 | see: https://apple.stackexchange.com/questions/144474/mds-and-mds-stores-constantly-consuming-cpu 4 | 5 | - Replace Finder hotkey with Raycast: https://manual.raycast.com/hotkey 6 | -------------------------------------------------------------------------------- /screenshots/amausaan_2022-04-05-232523.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:06066e42ffc214faba6f27b32316dda65f0ef9516e4eaf66202ecd2eeabe54eb 3 | size 2630159 4 | -------------------------------------------------------------------------------- /screenshots/macbook_2024-12-19.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:dfb110f49d2d73f9c75a97d765441a8d325e22ac7a16afb409ffca26127c6397 3 | size 6639400 4 | -------------------------------------------------------------------------------- /screenshots/toastx900_2021-07-30_13-00.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:271e9e323bdaa5eb7229add2803c2f8bc7a3c82e9dd8e9a90f296f2ebd72667c 3 | size 1371120 4 | -------------------------------------------------------------------------------- /screenshots/toastx900_2021-07-30_13-14.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8e5e24b9b16e563e32cdca4759db0cfb2565a800ec3e571a3d60f48048b2b2d7 3 | size 1183650 4 | --------------------------------------------------------------------------------