Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update .bin/updates
Update .bin/upload
Update .zshrc
Update .config/fontconfig/conf.d/01-emoji.conf
Update .config/nvim/lazy-lock.json
Update .config/rofi/config.rasi
  • Loading branch information
AndreasBackx committed Jun 7, 2024
1 parent db67b9f commit c94e17c
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 136 deletions.
151 changes: 100 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,45 @@

This repository contains most if not all of the changes made to my machines that run Arch Linux, Fedora, Ubuntu, or CentOS, but primarily Fedora as it's what I use on my personal computers. It should support both Hyprland primarily, though past versions used Sway and i3.


## Unstaged File Templates

`.config/.secrets`
```zsh
# borg backup
export BORG_PASSPHRASE=""

# spotifatius
export RSPOTIFY_CLIENT_ID=""
export RSPOTIFY_CLIENT_SECRET=""

# spotifycl
export SPOTIPY_CLIENT_ID=""
export SPOTIPY_CLIENT_SECRET=""
export SPOTIPY_REDIRECT_URI="http://localhost"

# GitHub
export GITHUB_TOKEN=""
```

## Installation

```zsh
# Packages
## Arch Linux
paru -S \
fzf \
git-delta \
bat \
eza \
duf \
ripgrep \
choose-rust-git \
hyperfine
touch ~/.config/.secrets

## Fedora
sudo dnf copr enable atim/choose
sudo dnf install -y \
fzf \
git-delta \
bat \
eza \
# duf \
ripgrep \
choose \
hyperfine
# Homebrew
git clone https://github.com/Homebrew/brew ~/.homebrew
brew update

# fzf
## Arch Linux
paru -S fzf
## Fedora
sudo dnf install fzf
## Debian
sudo apt-get install fzf
## MacOS
brew install -y \
fzf \
git-delta \
bat \
eza \
duf \
ripgrep \
choose-rust \
hyperfine

## Ubuntu
sudo apt-get install -y \
fzf \
# git-delta \
rust-bat \
# eza \
# duf \
ripgrep \
choose-rust-git
# hyperfine

## Other
# https://github.com/dandavison/delta#installation
# https://github.com/sharkdp/bat#installation
# https://github.com/eza-community/eza
# https://github.com/muesli/duf#installation
# https://github.com/BurntSushi/ripgrep#installation
# https://github.com/theryangeary/choose#compilation-and-installation
# https://github.com/sharkdp/hyperfine#installation
brew install fzf

# ddcutil i2c
sudo groupadd --system i2c
Expand All @@ -71,4 +53,71 @@ sudo cp /usr/share/ddcutil/data/45-ddcutil-i2c.rules /etc/udev/rules.d
sudo chmod a+rw /dev/i2c-*
# Or after quick logout
sudo chgrp i2c /dev/i2c-*

# delta
## Arch Linux
paru -S git-delta
## Fedora
sudo dnf install git-delta
## MacOS
brew install git-delta
## Other: https://github.com/dandavison/delta#installation

# bat
## Arch linux
paru -S bat
## Fedora
sudo dnf install bat
## Debian
sudo apt-get install rust-bat
## MacOS
brew install bat
## Other: https://github.com/sharkdp/bat#installation

# eza
## Arch linux
paru -S eza
## Fedora
sudo dnf install eza
## MacOS
brew install eza
## Other: https://github.com/eza-community/eza

# duf
## Arch Linux
paru -S duf
## MacOS
brew install duf
## Other: https://github.com/muesli/duf#installation

# ripgrep
## Arch Linux
paru -S ripgrep
## Fedora
sudo dnf install ripgrep
## Debian
sudo apt-get install ripgrep
## MacOS
brew install ripgrep
## Other: https://github.com/BurntSushi/ripgrep#installation

# choose
## Arch Linux
paru -S choose-rust-git
## Fedora
sudo dnf copr enable atim/choose
sudo dnf install choose
## MacOS
brew install choose-rust
## Other: https://github.com/theryangeary/choose#compilation-and-installation


# hyperfine
## Arch Linux
paru -S hyperfine
## Fedora
sudo dnf install hyperfine
## MacOS
brew install hyperfine
## Other: https://github.com/sharkdp/hyperfine#installation
```
35 changes: 4 additions & 31 deletions dot_bin/executable_updates
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,9 @@ set -e

source ~/.bin/utils.zsh

function has_dnf5() {
type "dnf5" >/dev/null
}

function the_dnf() {
if has_dnf5; then
dnf5 $@
else
dnf $@
fi
}

function dnf_update_amount() {
the_dnf check-update --quiet --disablerepo="cpe-yum*" $@ |
# Make sure we only get the first part as that's the updates,
# the rest is less accurate. This makes it take the first paragraph.
sed "s/Obsoleting Packages//g" |
awk -v RS= 'NR==1' |
# Count
wc -l
}

function check_cache() {
if is_fedora; then
amount=$(dnf_update_amount --cacheonly)
amount=$(dnf check-update --cacheonly --quiet --disablerepo="cpe-yum*" | wc -l)
else
amount=$(paru -Qu | wc -l)
fi
Expand All @@ -43,7 +21,7 @@ function check_cache() {

function check_live() {
if is_fedora; then
amount=$(dnf_update_amount || echo "-1")
amount=$(dnf check-update --refresh --quiet --disablerepo="cpe-yum*" | wc -l || echo "-1")
else
amount=$(
paru -Syy &>/dev/null
Expand All @@ -64,12 +42,7 @@ function check_live() {

function update_package_manager() {
if is_fedora; then
# We have to inline the_dnf because of sudo.
if has_dnf5; then
sudo dnf5 $@ upgrade --refresh --assumeyes --disablerepo="cpe-yum*"
else
sudo dnf $@ upgrade --refresh --assumeyes --disablerepo="cpe-yum*"
fi
sudo dnf upgrade --refresh --assumeyes
else
paru -Syu --noconfirm
fi
Expand All @@ -80,7 +53,7 @@ function update_flatpak() {
}

function update_snap() {
snap &>/dev/null && sudo snap refresh
snap &> /dev/null && sudo snap refresh
}

case "$1" in
Expand Down
28 changes: 25 additions & 3 deletions dot_bin/executable_upload
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,30 @@ if [[ $types == *image* ]]; then
wl-paste > $tmpfile
link=$(px upload "$tmpfile")
else
link=$(wl-paste | imgur.sh)
imgur_output=$(wl-paste | imgur.sh)
echo "BEFORE"
echo "$imgur_output"
echo "AFTER"
link=$(echo "$imgur_output" | head -1)
delete_link=$(echo "$imgur_output" | tail -1)
fi

notify-send "🎉 Uploaded to $service_name" "$link copied to clipboard!" --replace-id=$notification_id --category transfer.complete
echo $link | wl-copy --trim-newline
notify_output_lines=($(notify-send "🎉 Uploaded to $service_name" "Link copied to clipboard, click here to delete." --print-id --replace-id=$notification_id --category transfer.complete --action=default=delete --expire-time 15000 ))
notification_id=$notify_output_lines[1]
action=$notify_output_lines[2]

if [[ $action == "default" ]]; then
# It means it was clicked.
if [[ $CHEZMOI_DATA_ENVIRONMENT == "work" ]]; then
notify-send "😫 You cannot delete pixelcloud images." --category transfer.error --replace-id=$notification_id
else
(
xdg-open "$delete_link" && \
notify-send "🗑 Opened the delete link!" "Confirm the deletion on Imgur." --replace-id=$notification_id --category transfer.complete
) || notify-send "😫 Could not delete Imgur image!" "The delete link is in your clipboard." --replace-id=$notification_id --category transfer.error
fi
fi
else
if [[ $CHEZMOI_DATA_ENVIRONMENT == "work" ]]; then
service_name="Pastry"
Expand Down Expand Up @@ -63,7 +82,10 @@ else
if [[ $CHEZMOI_DATA_ENVIRONMENT == "work" ]]; then
notify-send "😫 You cannot delete pastries." --category transfer.error --replace-id=$notification_id
else
(gh gist delete $to_copy && notify-send "🗑 Deleted GitHub Gist!" "The original link remains in the clipboard." --replace-id=$notification_id --category transfer.complete) || notify-send "😫 Could not delete GitHub Gist!" "Try to delete it manually, it's still in your clipboard." --replace-id=$notification_id --category transfer.complete
(
gh gist delete $to_copy && \
notify-send "🗑 Deleted GitHub Gist!" "The original link remains in the clipboard." --replace-id=$notification_id --category transfer.complete
) || notify-send "😫 Could not delete GitHub Gist!" "Try to delete it manually, it's still in your clipboard." --replace-id=$notification_id --category transfer.error
fi
fi
fi
5 changes: 0 additions & 5 deletions dot_zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ SPACESHIP_RPROMPT_ORDER+=(

source $HOME/.oh-my-zsh/oh-my-zsh.sh
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
autoload -Uz compinit
for dump in ~/.zcompdump(N.mh+24); do
compinit
done
compinit -C

if type "eza" >/dev/null; then
alias ls="eza"
Expand Down
6 changes: 3 additions & 3 deletions private_dot_config/fontconfig/conf.d/01-emoji.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
<alias>
<family>sans-serif</family>
<prefer>
<family>Apple Color Emoji</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>

<alias>
<family>serif</family>
<prefer>
<family>Apple Color Emoji</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>

<alias>
<family>monospace</family>
<prefer>
<family>Apple Color Emoji</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>
Expand Down
Loading

0 comments on commit c94e17c

Please sign in to comment.