diff --git a/README.md b/README.md index f80d7c0..75c191b 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,8 @@ $ cd dotfiles $ ./install.sh ``` -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`: - -```sh -$ sudo ln -s $(which sudo) /usr/bin/doas -``` - ### Notes -- You need to make `doas`/`sudo` rules that allow you to execute, +- You need to make `sudo` rules that allow you to execute, `poweroff` and `reboot` without a password, otherwise the keybindings and scripts for those won't work. - The installation script requires GNU Stow to work. diff --git a/install.sh b/install.sh index f599950..22ac702 100755 --- a/install.sh +++ b/install.sh @@ -13,7 +13,7 @@ if [ "$(lsb_release -si)" = "Fedora" ]; then INSTALL="pkg install" elif [ "$(lsb_release -si)" = "Artix" ]; then set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh" - INSTALL="doas pacman -S" + INSTALL="sudo pacman -S" else echo "OS not supported!" exit 1 @@ -66,12 +66,6 @@ if [ -n "$DASH" ] && ! command -v dash >/dev/null 2>&1; then $INSTALL dash fi -if [ "$(lsb_release -si)" = "Artix" ]; then - sleep 0.5 - echo "=> Installing custom PKGBUILD opendoas-sudo" - (cd pkg/opendoas-sudo && makepkg -si) -fi - sleep 0.5 echo "=> Done!" diff --git a/pkg/README.md b/pkg/README.md deleted file mode 100644 index 82e2abc..0000000 --- a/pkg/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Custom packages - -These are my custom PKGBUILDs. diff --git a/pkg/opendoas-sudo/PKGBUILD b/pkg/opendoas-sudo/PKGBUILD deleted file mode 100644 index f864eb9..0000000 --- a/pkg/opendoas-sudo/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Original author: Ultracoolguy -# Quick thanks to deuill, creator of rofi-dmenu -# The AUR didn't want this package, so I'm adding it here -pkgname=opendoas-sudo -pkgver=1 -pkgrel=1 -pkgdesc="A symlink for using Doas as a drop-in replacement for sudo" -arch=('any') -url="https://github.com/Duncaen/OpenDoas" -license=('MIT') -depends=('opendoas') -provides=('sudo') -conflicts=('sudo') - -package() { - install -d "$pkgdir"/usr/bin - ln -s $(which doas) "$pkgdir"/usr/bin/sudo -} diff --git a/sway/.config/sway/config.d/01_keybinds b/sway/.config/sway/config.d/01_keybinds index 66d435c..cd0fc8c 100644 --- a/sway/.config/sway/config.d/01_keybinds +++ b/sway/.config/sway/config.d/01_keybinds @@ -25,8 +25,8 @@ bindsym $mod+l exec swaylock # Session and power management bindsym $mod+Shift+e exec swaynag -t logout -m 'Log out?' -b 'Yes' 'swaymsg exit' -bindsym $mod+Shift+r exec swaynag -t reboot -m 'Reboot?' -b 'Yes' 'doas reboot' -bindsym $mod+Shift+q exec swaynag -t shutdown -m 'Shut down?' -b 'Yes' 'doas poweroff' +bindsym $mod+Shift+r exec swaynag -t reboot -m 'Reboot?' -b 'Yes' 'sudo reboot' +bindsym $mod+Shift+q exec swaynag -t shutdown -m 'Shut down?' -b 'Yes' 'sudo poweroff' # Screenshotting bindsym Print exec --no-startup-id grimshot --notify save output diff --git a/zsh/.config/zsh/aliases.zsh b/zsh/.config/zsh/aliases.zsh index 02b3393..4aed2cd 100644 --- a/zsh/.config/zsh/aliases.zsh +++ b/zsh/.config/zsh/aliases.zsh @@ -53,20 +53,21 @@ alias cl="clear" alias -g e="\$EDITOR" alias ls="ls --color=always" alias q="exit 0" +alias visudo="sudo EDITOR='rvim -n' visudo" # Platform specific if [[ $(lsb_release -si) == "Artix" ]]; then alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland" - alias pacin="doas pacman -S" + alias pacin="sudo pacman -S" alias pacls="pacman -Qkl" alias pacown="pacman -Qo" alias pacqi="pacman -Qi" alias pacqs="pacman -Qs" - alias pacrm="doas pacman -Rcnsu" + alias pacrm="sudo pacman -Rcnsu" alias pacsi="pacman -Si" alias pacss="pacman -Ss" - alias poweroff="doas poweroff" - alias reboot="doas reboot" + alias poweroff="sudo poweroff" + alias reboot="sudo reboot" elif [[ $(lsb_release -si) == "Fedora" ]]; then alias code="codium" alias dnfin="sudo dnf install" diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 19290b2..2d02741 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -14,23 +14,6 @@ bt() { fi } -doasedit() { - (( ${+commands[doas]} )) || return 2 - [[ $# -eq 0 ]] || return 1 - - doas -L - doas -u root sh -c "cp /etc/doas.conf /tmp/doas.conf && - rvim -n /tmp/doas.conf && - doas -C /tmp/doas.conf && - mv /tmp/doas.conf /etc/doas.conf && - echo 'ok' || - echo >&2 'error'" - local STATUS=$? - doas -L - - return $STATUS -} - get_ip() { (( ${+commands[curl]} )) || return 2 local ARGS=()