From c3314d6ebefbb3badefd7fe243f4d1ff3bb9c5ec Mon Sep 17 00:00:00 2001 From: hexdev Date: Tue, 7 Jul 2026 13:24:21 +0700 Subject: [PATCH] first commit --- .gitignore | 11 ++ README.md | 54 ++++++++++ config/dolphinrc | 10 ++ config/filetypesrc | 3 + config/fish/config.fish | 7 ++ config/hypr/hypr | 1 + config/hypr/hyprland | 1 + config/hypr/hyprland.conf | 1 + config/hypr/hyprland.lua | 6 ++ config/hypr/hyprlock.conf | 1 + config/hypr/hyprpaper.conf | 1 + config/kitty/kitty.conf | 1 + config/mimeapps.list | 8 ++ config/nvim | 1 + config/pavucontrol.ini | 9 ++ config/rofi | 1 + config/swaync | 1 + config/user-dirs.dirs | 16 +++ config/user-dirs.locale | 1 + config/waybar | 1 + install-pkg.sh | 66 ++++++++++++ packages-aur.txt | 4 + packages-official.txt | 205 +++++++++++++++++++++++++++++++++++++ restore.sh | 48 +++++++++ 24 files changed, 458 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 config/dolphinrc create mode 100644 config/filetypesrc create mode 100644 config/fish/config.fish create mode 120000 config/hypr/hypr create mode 120000 config/hypr/hyprland create mode 120000 config/hypr/hyprland.conf create mode 100644 config/hypr/hyprland.lua create mode 120000 config/hypr/hyprlock.conf create mode 120000 config/hypr/hyprpaper.conf create mode 120000 config/kitty/kitty.conf create mode 100644 config/mimeapps.list create mode 120000 config/nvim create mode 100644 config/pavucontrol.ini create mode 120000 config/rofi create mode 120000 config/swaync create mode 100644 config/user-dirs.dirs create mode 100644 config/user-dirs.locale create mode 120000 config/waybar create mode 100755 install-pkg.sh create mode 100644 packages-aur.txt create mode 100644 packages-official.txt create mode 100755 restore.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16ba053 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +*.log +*.tmp +*.bak +*.swp +*.swo +restore.local.sh + +# Runtime state that should never be committed +config/fish/fish_variables +config/**/.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..2fb4f9d --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# dotfiles + +Curated public-friendly dotfiles extracted from `~/.config`. + +## Layout + +- `config/`: files that belong under `~/.config` +- `home/`: files that belong under `$HOME` +- `restore.sh`: creates backups, then installs symlinks +- `install-pkg.sh`: installs official and AUR packages from list files +- `packages-official.txt`: explicitly installed repository packages +- `packages-aur.txt`: explicitly installed AUR packages + +## Restore + +```bash +./restore.sh +./install-pkg.sh +``` + +By default the script: + +- creates timestamped backups for existing non-symlink targets +- creates symlinks from this repository into `~/.config` +- skips targets that already point to this repo + +## Package Install + +```bash +./install-pkg.sh +./install-pkg.sh --official-only +./install-pkg.sh --aur-only +``` + +The installer uses: + +- `pacman` for `packages-official.txt` +- `yay` or `paru` for `packages-aur.txt` + +## Excluded on purpose + +These were intentionally not pulled in because they usually contain secrets, device-specific state, caches, databases, logs, or personal browsing/session data: + +- `gh/` +- `mozilla/` +- `pulse/` +- `go/telemetry/` +- `obs-studio/` +- `Throne/` +- `dconf/user` +- `session/` +- `fish/fish_variables` + +Review everything once more before publishing. diff --git a/config/dolphinrc b/config/dolphinrc new file mode 100644 index 0000000..f3486a1 --- /dev/null +++ b/config/dolphinrc @@ -0,0 +1,10 @@ +[General] +Version=202 +ViewPropsTimestamp=2026,6,18,11,12,27.447 + +[KFileDialog Settings] +Places Icons Auto-resize=false +Places Icons Static Size=22 + +[MainWindow] +MenuBar=Disabled diff --git a/config/filetypesrc b/config/filetypesrc new file mode 100644 index 0000000..1011392 --- /dev/null +++ b/config/filetypesrc @@ -0,0 +1,3 @@ +[EmbedSettings] +embed-image/x-canon-cr2=false +embed-video/mp4=false diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..6519211 --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,7 @@ +source /usr/share/cachyos-fish-config/cachyos-config.fish + +# overwrite greeting +# potentially disabling fastfetch +#function fish_greeting +# # smth smth +#end diff --git a/config/hypr/hypr b/config/hypr/hypr new file mode 120000 index 0000000..2fff4a2 --- /dev/null +++ b/config/hypr/hypr @@ -0,0 +1 @@ +/home/hexdev/hexdots/hypr \ No newline at end of file diff --git a/config/hypr/hyprland b/config/hypr/hyprland new file mode 120000 index 0000000..5462ae4 --- /dev/null +++ b/config/hypr/hyprland @@ -0,0 +1 @@ +/home/hexdev/hexdots/hypr/hyprland \ No newline at end of file diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf new file mode 120000 index 0000000..1e84932 --- /dev/null +++ b/config/hypr/hyprland.conf @@ -0,0 +1 @@ +/home/hexdev/hexdots/hypr/hyprland.conf \ No newline at end of file diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua new file mode 100644 index 0000000..5e40c95 --- /dev/null +++ b/config/hypr/hyprland.lua @@ -0,0 +1,6 @@ +require("hyprland.monitors") +require("hyprland.inputs") +require("hyprland.keybinds") +require("hyprland.autostart") +require("hyprland.appearance") +require("hyprland.window-rules") diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf new file mode 120000 index 0000000..00a3b97 --- /dev/null +++ b/config/hypr/hyprlock.conf @@ -0,0 +1 @@ +/home/hexdev/hexdots/hypr/hyprlock.conf \ No newline at end of file diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf new file mode 120000 index 0000000..d7323e1 --- /dev/null +++ b/config/hypr/hyprpaper.conf @@ -0,0 +1 @@ +/home/hexdev/hexdots/hypr/hyprpaper.conf \ No newline at end of file diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf new file mode 120000 index 0000000..781b6e4 --- /dev/null +++ b/config/kitty/kitty.conf @@ -0,0 +1 @@ +/home/hexdev/hexdots/kitty/kitty.conf \ No newline at end of file diff --git a/config/mimeapps.list b/config/mimeapps.list new file mode 100644 index 0000000..4dc525c --- /dev/null +++ b/config/mimeapps.list @@ -0,0 +1,8 @@ +[Added Associations] +image/x-canon-cr2=nomacs.desktop; +video/mp4=vlc-2.desktop; + +[Default Applications] +image/x-canon-cr2=nomacs.desktop; +video/mp4=vlc-2.desktop; +x-scheme-handler/throne=throne-url-handler.desktop diff --git a/config/nvim b/config/nvim new file mode 120000 index 0000000..11af77f --- /dev/null +++ b/config/nvim @@ -0,0 +1 @@ +/home/hexdev/hexdots/nvim \ No newline at end of file diff --git a/config/pavucontrol.ini b/config/pavucontrol.ini new file mode 100644 index 0000000..01899b2 --- /dev/null +++ b/config/pavucontrol.ini @@ -0,0 +1,9 @@ +[window] +width=500 +height=400 +sinkInputType=1 +sourceOutputType=1 +sinkType=0 +sourceType=1 +showVolumeMeters=1 +hideUnavailableCardProfiles=0 diff --git a/config/rofi b/config/rofi new file mode 120000 index 0000000..8304764 --- /dev/null +++ b/config/rofi @@ -0,0 +1 @@ +/home/hexdev/hexdots/rofi \ No newline at end of file diff --git a/config/swaync b/config/swaync new file mode 120000 index 0000000..0a0e281 --- /dev/null +++ b/config/swaync @@ -0,0 +1 @@ +/home/hexdev/hexdots/swaync \ No newline at end of file diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs new file mode 100644 index 0000000..c0560d5 --- /dev/null +++ b/config/user-dirs.dirs @@ -0,0 +1,16 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Desktop" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_MUSIC_DIR="$HOME/Music" +XDG_PICTURES_DIR="$HOME/Pictures" +XDG_VIDEOS_DIR="$HOME/Videos" +XDG_PROJECTS_DIR="$HOME/Projects" diff --git a/config/user-dirs.locale b/config/user-dirs.locale new file mode 100644 index 0000000..3e0b419 --- /dev/null +++ b/config/user-dirs.locale @@ -0,0 +1 @@ +en_US \ No newline at end of file diff --git a/config/waybar b/config/waybar new file mode 120000 index 0000000..12a213f --- /dev/null +++ b/config/waybar @@ -0,0 +1 @@ +/home/hexdev/hexdots/waybar \ No newline at end of file diff --git a/install-pkg.sh b/install-pkg.sh new file mode 100755 index 0000000..7f87199 --- /dev/null +++ b/install-pkg.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +official_file="$repo_root/packages-official.txt" +aur_file="$repo_root/packages-aur.txt" + +install_official=true +install_aur=true + +for arg in "$@"; do + case "$arg" in + --official-only) + install_official=true + install_aur=false + ;; + --aur-only) + install_official=false + install_aur=true + ;; + --help|-h) + cat <<'EOF' +Usage: ./install-pkg.sh [--official-only | --aur-only] + +Installs packages listed in: + - packages-official.txt via pacman + - packages-aur.txt via yay or paru +EOF + exit 0 + ;; + *) + printf 'Unknown argument: %s\n' "$arg" >&2 + exit 1 + ;; + esac +done + +read_packages() { + local file=$1 + mapfile -t packages < <(grep -vE '^\s*($|#)' "$file") +} + +if [[ "$install_official" == true ]]; then + read_packages "$official_file" + if (( ${#packages[@]} > 0 )); then + sudo pacman -S --needed --noconfirm -- "${packages[@]}" + fi +fi + +if [[ "$install_aur" == true ]]; then + helper= + if command -v yay >/dev/null 2>&1; then + helper=yay + elif command -v paru >/dev/null 2>&1; then + helper=paru + else + printf 'AUR helper not found. Install yay or paru first.\n' >&2 + exit 1 + fi + + read_packages "$aur_file" + if (( ${#packages[@]} > 0 )); then + "$helper" -S --needed --noconfirm -- "${packages[@]}" + fi +fi diff --git a/packages-aur.txt b/packages-aur.txt new file mode 100644 index 0000000..f4c59d8 --- /dev/null +++ b/packages-aur.txt @@ -0,0 +1,4 @@ +lazyssh-bin +nomacs +throne-bin +ttf-league-spartan diff --git a/packages-official.txt b/packages-official.txt new file mode 100644 index 0000000..13bf2e8 --- /dev/null +++ b/packages-official.txt @@ -0,0 +1,205 @@ +accountsservice +alacritty +alsa-firmware +alsa-plugins +alsa-utils +awesome-terminal-fonts +base +base-devel +bash-completion +bind +bluez +bluez-hid2hci +bluez-libs +bluez-obex +bluez-utils +btop +btrfs-assistant +btrfs-progs +cachyos-fish-config +cachyos-hello +cachyos-hooks +cachyos-kernel-manager +cachyos-keyring +cachyos-micro-settings +cachyos-mirrorlist +cachyos-packageinstaller +cachyos-plymouth-bootanimation +cachyos-plymouth-theme +cachyos-rate-mirrors +cachyos-settings +cachyos-snapper-support +cachyos-v3-mirrorlist +cachyos-v4-mirrorlist +cachyos-wallpapers +cachyos-zsh-config +cantarell-fonts +chwd +code +cpupower +cryptsetup +device-mapper +diffutils +dmidecode +dmraid +dnsmasq +dolphin +dosfstools +duf +e2fsprogs +efibootmgr +efitools +egl-wayland +ethtool +exfatprogs +f2fs-tools +fastfetch +ffmpegthumbnailer +firefox +flatpak +fsarchiver +geeqie +git +github-cli +glances +gst-libav +gst-plugin-pipewire +gst-plugins-bad +gst-plugins-ugly +gst-plugin-va +hdparm +hwdetect +hwinfo +hyprland +hyprlock +hyprpaper +hyprpicker +hyprshot +hyprshutdown +inetutils +intel-media-driver +intel-media-sdk +intel-ucode +iwd +jfsutils +kitty +less +lib32-nvidia-utils +lib32-opencl-nvidia +lib32-vulkan-icd-loader +lib32-vulkan-intel +libdvdcss +libgsf +libopenraw +libva-nvidia-driver +limine +limine-mkinitcpio-hook +limine-snapper-sync +linux-cachyos +linux-cachyos-headers +linux-cachyos-lts +linux-cachyos-lts-headers +linux-cachyos-lts-nvidia-open +linux-cachyos-nvidia-open +linux-firmware +logrotate +lsb-release +lsscsi +lvm2 +man-db +man-pages +mdadm +meld +mesa-utils +micro +mkinitcpio +modemmanager +mtools +nano +nano-syntax-highlighting +neovim +netctl +networkmanager +networkmanager-openvpn +nfs-utils +nilfs-utils +noto-fonts +noto-fonts-cjk +noto-fonts-emoji +nss-mdns +nvidia-settings +nvidia-utils +obs-studio +opencl-nvidia +opencode +openssh +os-prober +pacman-contrib +paru +pavucontrol +perl +pipewire-alsa +pipewire-pulse +pkgfile +playerctl +plocate +plymouth +polkit-kde-agent +poppler-glib +power-profiles-daemon +prismlauncher +pv +pyenv +python +python-defusedxml +python-packaging +rebuild-detector +reflector +ripgrep +rofi +rsync +sddm +sg3_utils +shelly +smartmontools +s-nail +snapper +sof-firmware +sudo +swaync +sysfsutils +texinfo +ttf-bitstream-vera +ttf-dejavu +ttf-go-nerd +ttf-jetbrains-mono-nerd +ttf-liberation +ttf-meslo-nerd +ttf-opensans +ufw +ufw-extras +unrar +unzip +upower +usb_modeswitch +usbutils +uwsm +vim +vlc +vlc-plugins-all +vulkan-icd-loader +vulkan-intel +waybar +wget +which +wireplumber +wl-clipboard +wofi +wpa_supplicant +xdg-desktop-portal-hyprland +xdg-user-dirs +xfsprogs +xl2tpd +xorg-xinput +xorg-xwayland +yay diff --git a/restore.sh b/restore.sh new file mode 100755 index 0000000..8f3970a --- /dev/null +++ b/restore.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +backup_root=${XDG_STATE_HOME:-"$HOME/.local/state"}/dotfiles-backups/$(date +%Y%m%d-%H%M%S) + +link_path() { + local source_path=$1 + local target_path=$2 + + mkdir -p "$(dirname "$target_path")" + + if [[ -L "$target_path" ]]; then + local resolved + resolved=$(readlink -f "$target_path") + if [[ "$resolved" == "$source_path" ]]; then + printf 'skip %s\n' "$target_path" + return 0 + fi + fi + + if [[ -e "$target_path" && ! -L "$target_path" ]]; then + local backup_path="$backup_root/${target_path#$HOME/}" + mkdir -p "$(dirname "$backup_path")" + mv "$target_path" "$backup_path" + printf 'backup %s -> %s\n' "$target_path" "$backup_path" + elif [[ -L "$target_path" ]]; then + rm "$target_path" + fi + + ln -s "$source_path" "$target_path" + printf 'link %s -> %s\n' "$target_path" "$source_path" +} + +while IFS= read -r entry; do + [[ -z "$entry" ]] && continue + link_path "$repo_root/config/$entry" "$HOME/.config/$entry" +done < <(cd "$repo_root/config" && printf '%s\n' *) + +if [[ -d "$repo_root/home" ]]; then + while IFS= read -r entry; do + [[ -z "$entry" ]] && continue + link_path "$repo_root/home/$entry" "$HOME/$entry" + done < <(cd "$repo_root/home" && printf '%s\n' .[^.]* *) +fi + +printf '\nDone. Backups, if any, are in %s\n' "$backup_root"