Compatible with Ubuntu
This commit is contained in:
parent
85e4f08c2d
commit
9e83e5f24a
11
README.md
11
README.md
|
@ -1,17 +1,20 @@
|
||||||
# My dotfiles
|
# My dotfiles
|
||||||
|
|
||||||
This is a collection of some of my dotfiles for my Linux systems. I personally use these on Artix Linux and Fedora Workstation.
|
This is a collection of some of my dotfiles for my Linux systems. I personally use these on Artix, Fedora, Ubuntu and Termux (Android).
|
||||||
|
|
||||||
If you're on Artix Linux, you can install these dotfiles by cloning this repository and executing `artix-install.sh`:
|
To install:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/theanonymousexyz/dotfiles.git
|
$ git clone https://github.com/theanonymousexyz/dotfiles.git
|
||||||
$ cd dotfiles
|
$ cd dotfiles
|
||||||
$ chmod +x artix-install.sh
|
$ chmod +x artix-install.sh
|
||||||
$ ./artix-install.sh
|
$ ./artix-install.sh # For Artix
|
||||||
|
$ ./fedora-install.sh # For Fedora
|
||||||
|
$ ./termux-install # For Termux
|
||||||
|
$ ./ubuntu-install.sh # For Ubuntu
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that I use `doas` instead of `sudo`. If you prefer `sudo`, then change all instances of `doas` to `sudo`, or simply create a symlink `doas` pointing to `sudo`:
|
Note that I use `doas` instead of `sudo` (only on Artix). If you prefer `sudo`, then change all instances of `doas` to `sudo`, or simply create a symlink `doas` pointing to `sudo`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo ln -s $(which sudo) /usr/bin/doas
|
sudo ln -s $(which sudo) /usr/bin/doas
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$(lsb_release -si)" != "Artix" ]; then
|
if [ "$(lsb_release -si)" != "Artix" ]; then
|
||||||
echo "This script is only intended to be used for a full setup on Artix Linux. Quitting..."
|
echo "This script is only intended to be used for a full setup on Artix. Quitting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$(lsb_release -si)" != "Fedora" ]; then
|
if [ "$(lsb_release -si)" != "Fedora" ]; then
|
||||||
echo "This script is only intended to be used for a full setup on Fedora Workstation. Quitting..."
|
echo "This script is only intended to be used for a full setup on Fedora. Quitting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
26
ubuntu-install.sh
Executable file
26
ubuntu-install.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$(lsb_release -si)" != "Ubuntu" ]; then
|
||||||
|
echo "This script is only intended to be used for a full setup on Ubuntu. Quitting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Configuring directories..."
|
||||||
|
|
||||||
|
cd -- "$(dirname -- $0)"
|
||||||
|
set -- "zsh"
|
||||||
|
mkdir -p "$HOME/.config/zsh" # Symlink only the individual files instead of the entire directory
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
echo "Creating the symlinks with stow..."
|
||||||
|
|
||||||
|
for pkg in "$@"; do
|
||||||
|
echo "* Stowing $pkg"
|
||||||
|
stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
sleep 0.4
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
echo "Done!"
|
|
@ -1,34 +1,46 @@
|
||||||
alias cl="clear"
|
alias cl="clear"
|
||||||
alias cp="cp -i"
|
alias cp="cp -i"
|
||||||
alias exa="exa -Fh --color=always --git --icons"
|
|
||||||
alias grep="grep --color=always"
|
alias grep="grep --color=always"
|
||||||
alias ls="ls --color=always"
|
alias ls="ls --color=always"
|
||||||
alias mkdir="mkdir -p"
|
alias mkdir="mkdir -p"
|
||||||
alias mv="mv -i"
|
alias mv="mv -i"
|
||||||
alias q="exit"
|
alias q="exit"
|
||||||
alias rm="rm -i"
|
alias rm="rm -i"
|
||||||
alias srm="srm -i"
|
|
||||||
alias t="exa -a --tree -I '.git'"
|
|
||||||
alias tl="t -l"
|
|
||||||
alias tmux="tmux -2u"
|
|
||||||
alias u="update.sh"
|
alias u="update.sh"
|
||||||
alias wl-copy="wl-copy -n"
|
|
||||||
alias zgrep="zgrep --color=always"
|
alias zgrep="zgrep --color=always"
|
||||||
|
|
||||||
|
(( ${+commands[srm]} )) && alias srm="srm -i"
|
||||||
|
(( ${+commands[tmux]} )) && alias tmux="tmux -2u"
|
||||||
|
|
||||||
|
if (( ${+commands[exa]} )); then
|
||||||
|
alias exa="exa -Fh --color=always --git --icons"
|
||||||
|
alias t="exa -a --tree -I '.git'"
|
||||||
|
alias tl="t -l"
|
||||||
|
else
|
||||||
|
alias t="tree -aCI '.git'"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(uname -o) == "Android" ]]; then
|
if [[ $(uname -o) == "Android" ]]; then
|
||||||
alias l="exa -al"
|
alias l="exa -al"
|
||||||
alias la="exa -l"
|
alias la="exa -l"
|
||||||
alias ll="exa -aagl"
|
alias ll="exa -aagl"
|
||||||
elif [[ $(uname -o) == "GNU/Linux" ]]; then
|
elif [[ $(uname -o) == "GNU/Linux" ]]; then
|
||||||
alias btctl="bluetoothctl"
|
|
||||||
alias l="lsd -hlA --color=always"
|
|
||||||
alias la="lsd -hl --color=always"
|
|
||||||
alias ll="lsd -hlaF --color=always"
|
|
||||||
alias x="exa -al"
|
|
||||||
|
|
||||||
if [[ $(lsb_release -si) == "Artix" ]]; then
|
if [[ $(lsb_release -si) == "Artix" ]]; then
|
||||||
alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||||
alias poweroff="doas poweroff"
|
alias poweroff="doas poweroff"
|
||||||
alias reboot="doas reboot"
|
alias reboot="doas reboot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $(lsb_release -si) == "Ubuntu" ]]; then
|
||||||
|
alias l="ls -Ahl"
|
||||||
|
alias la="ls -hl"
|
||||||
|
alias ll="ls -aFhl"
|
||||||
|
else
|
||||||
|
alias btctl="bluetoothctl"
|
||||||
|
alias l="lsd -Ahl --color=always"
|
||||||
|
alias la="lsd -hl --color=always"
|
||||||
|
alias ll="lsd -ahlF --color=always"
|
||||||
|
alias wl-copy="wl-copy -n"
|
||||||
|
alias x="exa -al"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if [[ $(uname -o) == "GNU/Linux" ]]; then
|
if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then
|
||||||
export GPG_TTY=$TTY
|
export GPG_TTY=$TTY
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
|
|
Loading…
Reference in a new issue