Skip to content

Commit

Permalink
add eog webp support
Browse files Browse the repository at this point in the history
improve discord install
add envycontrol install
  • Loading branch information
MaxWolf-01 committed Mar 14, 2024
1 parent d571f75 commit 0dc4ee1
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ desktop() {
if [ -f "/usr/share/sounds/freedesktop/stereo/camera-shutter.oga" ]; then
sudo mv /usr/share/sounds/freedesktop/stereo/camera-shutter.oga /usr/share/sounds/freedesktop/stereo/camera-shutter-disabled.oga
fi

# webp support for eye of gnome image viewer
sudo add-apt-repository ppa:helkaluin/webp-pixbuf-loader
sudo apt-get update
sudo apt install webp-pixbuf-loader
xdg-mime default org.gnome.eog.desktop image/webp
}

docker() {
Expand Down Expand Up @@ -221,10 +227,11 @@ obsidian() {
}

discord() { # will setup discord and betterdiscord on first run, update both on subsequent runs
wget -O discord.deb "https://discord.com/api/download?platform=linux&format=deb" && sudo dpkg -i discord.deb && rm discord.deb
if [ "$EUID" -eq 0 ]; then echo "Don't run as root!"; return; fi
if ! command -v npm &> /dev/null || ! command -v pnpm &> /dev/null; then echo "npm or pnpm not found. Run './setup install_nodejs'"; return; fi
cd ~/repos/tools
if [ -d ~/repos/tools/BetterDiscord ]; then cd BetterDiscord && git pull; else git clone https://github.com/BetterDiscord/BetterDiscord.git && cd BetterDiscord; fi;
cd ~/repos/tools || echo "Error: $HOME/repos/tools does not exist" || exit 1
if [ -d ~/repos/tools/BetterDiscord ]; then cd BetterDiscord && git pull; else git clone https://github.com/BetterDiscord/BetterDiscord.git && cd BetterDiscord; fi; # get latest betterdiscord
wget -O discord.deb "https://discord.com/api/download?platform=linux&format=deb" && sudo dpkg -i discord.deb && rm discord.deb # get latest discord
pnpm install && pnpm build && pnpm inject
find ~/.dotfiles/desktop/discord/themes -type f -exec ln -sf {} ~/.config/BetterDiscord/themes/ \;
wget https://discordstyles.github.io/DarkMatter/DarkMatter.theme.css -O ~/.config/BetterDiscord/themes/DarkMatter.theme.css
Expand Down Expand Up @@ -255,6 +262,18 @@ spg_vpn() {
sudo apt-get install virt-viewer
}

nvidia_optimus() {
# TODO iGPU not used / display not working if hybrid / off
cd ~/repos/tools
if [ -d "envycontrol" ]; then cd envycontrol && git pull; else git clone https://github.com/bayasdev/envycontrol.git && cd envycontrol; fi;
sudo pip install .
# https://github.com/bayasdev/envycontrol/wiki/Frequently-Asked-Questions#instructions-for-ubuntu-and-its-derivatives
sudo prime-select on-demand
sudo systemctl mask gpu-manager.service
sudo apt-get install -y gnome-tweaks
echo "Install the gui manager according to gnome version @ https://github.com/LorenzoMorelli/GPU_profile_selector?tab=readme-ov-file#manual"
}

# Check if the first argument is the name of a function
if declare -f "$1" > /dev/null; then
# Call the function with the rest of the arguments
Expand Down

0 comments on commit 0dc4ee1

Please sign in to comment.