move distro/de-specific stuff to its own folder

This commit is contained in:
askiiart 2024-07-10 14:38:12 -05:00
parent 3110da2e40
commit 6bd1edfd47
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30
5 changed files with 23 additions and 19 deletions

View file

@ -61,23 +61,10 @@ cp $GIT_DIR/claws-mail/matcherrc $HOME/.claws-mail/matcherrc
rm -rf $HOME/.config/rofi/ rm -rf $HOME/.config/rofi/
cp -r $GIT_DIR/rofi $HOME/.config/rofi/ cp -r $GIT_DIR/rofi $HOME/.config/rofi/
# Install catppuccin GTK theme # GTK dark theme
# TODO: Add automatic catppuccin GTK updates - would be easy, but no version numbering once install, need to figure that out
ctp_version="v0.7.1"
variant="Catppuccin-Mocha-Standard-Mauve-Dark"
if [ ! -e ~/.themes/$variant ] && ! command_exists "nixos-rebuild"; then
mkdir -p ~/.themes &&
curl -L https://github.com/catppuccin/gtk/releases/download/$ctp_version/$variant.zip -o ~/.themes/catppuccin.zip &&
unzip ~/.themes/catppuccin.zip -d ~/.themes/ &&
rm -rf ~/.themes/catppuccin.zip
# gtk 4
rm -rf $HOME/.config/gtk-4.0
ln -sf "${HOME}/.themes/${variant}/gtk-4.0/" "${HOME}/.config/gtk-4.0"
export GTK_THEME="Catppuccin-Mocha-Standard-Mauve-Dark:dark"
mkdir ~/.config/gtk-3.0 mkdir ~/.config/gtk-3.0
echo -e "[Settings]\n${variant}" >~/.config/gtk-3.0/settings.ini echo -e "[settings]\ngtk-application-prefer-dark-theme = true" > ~/.config/gtk-3.0/settings.ini
fi gsettings set org.gnome.desktop.interface color-scheme prefer-dark
# fix-gamepad.service # fix-gamepad.service
if ! command_exists "nixos-rebuild" && command_exists "systemctl"; then if ! command_exists "nixos-rebuild" && command_exists "systemctl"; then
@ -112,5 +99,7 @@ echo "restore.sh done!"
# sway-runner # sway-runner
# TODO: make this work on nix too # TODO: make this work on nix too
if command_exists "xbps-install"; then
sudo cp $GIT_DIR/sway-runner /usr/bin/sway-runner sudo cp $GIT_DIR/sway-runner /usr/bin/sway-runner
sudo chown root /usr/bin/sway-runner sudo chown root /usr/bin/sway-runner
fi

15
run-distro-de-script.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
command_exists() { type "$1" &>/dev/null; }
cd distro-specific-scripts/
distro=""
if command_exists "pacman"; then
distro="arch"
elif command_exists "dnf" || command_exists "rpm-ostree"; then
distro="fedora"
elif command_exists "xbps-install"; then
distro="void"
fi
./${distro}-${XDG_CURRENT_DESKTOP}.sh