doas-sudo etc
This commit is contained in:
parent
2a3c820810
commit
437ec2716e
17
dotfiles-old/scripts/PKGBUILD_doas-sudo
Normal file
17
dotfiles-old/scripts/PKGBUILD_doas-sudo
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Maintainer: deven <trinity at trinitydotmoe>
|
||||||
|
# VERY LIGHTLY modified version of the AUR package opendoas-sudo
|
||||||
|
pkgname=doas-sudo
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A symlink for using the port of BSD's doas(1) as a drop-in replacement to sudo"
|
||||||
|
arch=('any')
|
||||||
|
url="https://github.com/slicer69/doas"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('doas')
|
||||||
|
provides=('sudo')
|
||||||
|
conflicts=('sudo')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -d "$pkgdir"/usr/bin
|
||||||
|
ln -s $(which doas) "$pkgdir"/usr/bin/sudo
|
||||||
|
}
|
@ -7,15 +7,22 @@ set -e
|
|||||||
# Usage:
|
# Usage:
|
||||||
# bash README.txt arch
|
# bash README.txt arch
|
||||||
|
|
||||||
# bootstrap.txt - bare minimum programs. Necessary for system use.
|
# packages/bootstrap - bare minimum programs. Necessary for system use.
|
||||||
# Install these before running this script.
|
# Install these before running this script.
|
||||||
# packages.txt - packages available in most package managers.
|
|
||||||
# packages-distro-manager.txt - packages not available in every manager.
|
mkdir -p $HOME/bin # executables
|
||||||
|
mkdir -p $HOME/src # source code
|
||||||
|
|
||||||
if [ $1 = "arch" ]; then
|
if [ $1 = "arch" ]; then
|
||||||
sudo pacman -S $(cat packages.txt packages-arch-pacman.txt)
|
# this enables the multilib repo. may fuck shit up.
|
||||||
bash yay.sh # builds yay for use with Arch Linux.
|
sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >/etc/pacman.conf
|
||||||
yay -S $(cat packages-arch-yay)
|
|
||||||
|
sudo pacman -S $(cat packages/all packages/arch_pacman)
|
||||||
|
bash arch_yay.sh # builds yay for use with Arch Linux.
|
||||||
|
yay -S $(cat packages/arch_yay)
|
||||||
|
|
||||||
|
# PKGBUILD to symlink sudo to doas
|
||||||
|
bash arch_doas-sudo.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash dotfiles.sh
|
bash dotfiles.sh
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# ABHORRENT hack. DO NOT USE IN IMPORTANT PLACES.
|
|
||||||
# probably linux-only, definitely POSIX(-like)-only
|
|
||||||
# PUBLIC DOMAIN (why would i copyright this?)
|
|
||||||
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# breaks if dmenu isn't installed
|
|
||||||
if os.system("which dmenu >/dev/null"):
|
|
||||||
print("Error: dmenu not available?", file=sys.stderr)
|
|
||||||
sys.exit(2) # 2 - missing dependency
|
|
||||||
|
|
||||||
# for me this becomes /home/trinity/apps/
|
|
||||||
app_path = os.path.expanduser("~") + "/apps/"
|
|
||||||
|
|
||||||
names = {}
|
|
||||||
namekeys = ""
|
|
||||||
if not(os.isatty(0)): file_object = sys.stdin
|
|
||||||
else: file_object = open(app_path + "names.txt")
|
|
||||||
while True:
|
|
||||||
line = file_object.readline()
|
|
||||||
if line == '': break
|
|
||||||
line = line.rstrip().split("\t")
|
|
||||||
key = line[(len(line) > 1)]
|
|
||||||
names[key] = line[0]
|
|
||||||
namekeys += key + "\\n"
|
|
||||||
if not(os.isatty(0)): file_object.close()
|
|
||||||
|
|
||||||
# get user input through dmenu
|
|
||||||
p = subprocess.Popen(("printf", namekeys), stdout=subprocess.PIPE)
|
|
||||||
output = subprocess.check_output(("dmenu"), stdin=p.stdout).strip().decode()
|
|
||||||
p.wait()
|
|
||||||
|
|
||||||
# run program
|
|
||||||
sys.exit(os.system(app_path + names[output]))
|
|
10
dotfiles-old/scripts/arch_doas-sudo.sh
Normal file
10
dotfiles-old/scripts/arch_doas-sudo.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
source ./cdecho.sh
|
||||||
|
|
||||||
|
mkdir -p $HOME/src/doas-sudo
|
||||||
|
cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD
|
||||||
|
|
||||||
|
cde $HOME/src/doas-sudo
|
||||||
|
makepkg -si
|
@ -9,19 +9,33 @@ source ./cdecho.sh
|
|||||||
mkdir -p $HOME/bin/oneliners || exit
|
mkdir -p $HOME/bin/oneliners || exit
|
||||||
cde $HOME/bin/oneliners
|
cde $HOME/bin/oneliners
|
||||||
|
|
||||||
|
SHABANG="#!/bin/sh\n"
|
||||||
|
|
||||||
|
# music stuff
|
||||||
|
printf "selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album
|
||||||
|
printf "selection=\"\$(find /mnt/audio -type f | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song
|
||||||
|
|
||||||
|
# private bookmarks
|
||||||
|
printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks
|
||||||
|
|
||||||
# deemix
|
# deemix
|
||||||
printf "python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix
|
printf $SHABANG"python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix
|
||||||
|
|
||||||
|
# firefox (launches firefox-developer-edition)
|
||||||
|
printf $SHABANG"firefox-developer-edition \"\$@\"\n" >firefox
|
||||||
|
|
||||||
# settings for specific monitors
|
# settings for specific monitors
|
||||||
printf "xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702
|
printf $SHABANG"xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702
|
||||||
printf "xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720
|
printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720
|
||||||
|
|
||||||
# more monitor settings
|
# more monitor settings
|
||||||
printf "xrandr --output HDMI-1 --off\n" >hdmioff
|
printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff
|
||||||
printf "xrandr --output VGA-1 --off\n" >vgaoff
|
printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff
|
||||||
|
|
||||||
# youtube-dl stuff
|
# youtube-dl stuff
|
||||||
printf "youtube-dl -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive
|
printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo
|
||||||
printf "youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv
|
printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp
|
||||||
|
printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive
|
||||||
|
printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv
|
||||||
|
|
||||||
ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x *
|
ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x *
|
||||||
|
@ -10,6 +10,7 @@ gparted
|
|||||||
gperf
|
gperf
|
||||||
gwenview
|
gwenview
|
||||||
htop
|
htop
|
||||||
|
inetutils
|
||||||
iptables
|
iptables
|
||||||
k3b
|
k3b
|
||||||
kate
|
kate
|
||||||
@ -21,6 +22,7 @@ moc
|
|||||||
moreutils
|
moreutils
|
||||||
mpv
|
mpv
|
||||||
neofetch
|
neofetch
|
||||||
|
net-tools
|
||||||
nmap
|
nmap
|
||||||
progress
|
progress
|
||||||
pulseaudio
|
pulseaudio
|
||||||
@ -29,6 +31,7 @@ python3
|
|||||||
qbittorrent
|
qbittorrent
|
||||||
rsync
|
rsync
|
||||||
s-tui
|
s-tui
|
||||||
|
screen
|
||||||
scrot
|
scrot
|
||||||
sed
|
sed
|
||||||
thunar
|
thunar
|
||||||
|
@ -15,6 +15,7 @@ lastpass-cli
|
|||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
light
|
light
|
||||||
ntfs-3g
|
ntfs-3g
|
||||||
|
otf-ipafont
|
||||||
pulseaudio-alsa
|
pulseaudio-alsa
|
||||||
pulseaudio-bluetooth
|
pulseaudio-bluetooth
|
||||||
python-pip
|
python-pip
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
aic94xx-firmware
|
||||||
discord_arch_electron
|
discord_arch_electron
|
||||||
doas
|
doas
|
||||||
|
wd719x-firmware
|
||||||
google-chrome
|
google-chrome
|
||||||
gzdoom
|
gzdoom
|
||||||
i3-gaps
|
i3-gaps
|
||||||
@ -8,7 +10,9 @@ instagram-scraper
|
|||||||
iwgtk
|
iwgtk
|
||||||
minecraft-launcher
|
minecraft-launcher
|
||||||
moon-buggy
|
moon-buggy
|
||||||
|
mullvad-vpn-beta
|
||||||
ne
|
ne
|
||||||
spotify
|
spotify
|
||||||
|
steam
|
||||||
tor-browser
|
tor-browser
|
||||||
zoom
|
zoom
|
||||||
|
Loading…
Reference in New Issue
Block a user