fix: remove old config, update dependencies

This commit is contained in:
AngeD 2023-09-18 14:45:31 +02:00
parent 0225077d38
commit 4e7cc23e42
18 changed files with 87 additions and 84 deletions

@ -1 +1 @@
Subproject commit d177ad277a638f262edb73c75ffe33e377b95dc5
Subproject commit cc388d3f6b9c7c943ae2b2dcd46ad470fd257f91

@ -1 +1 @@
Subproject commit 0232372b906f275f76ac42029eba25eaf95e76b9
Subproject commit 9ce85b0f7dcfe5358c0be937ad23e456907d410b

@ -1 +1 @@
Subproject commit a19770625aed49ad2a9f591a5e3946707f7359f6
Subproject commit b543aaa2c9cf8123ed2fe7dbb6c211a9cd415124

@ -1 +1 @@
Subproject commit 96a50241987531fdb8a516998b72c19f563ccd6c
Subproject commit f9034812d8335356ef3ede49110d1569624033fa

@ -1 +1 @@
Subproject commit 0a0a3b1a819626969f7e39a664d24ebf82e06245
Subproject commit f4d4ada805a642bf599baf86f32aa60ee7e5cacd

View File

@ -1,7 +1,7 @@
alias docker='sudo docker'
alias docker-compose='sudo docker-compose'
# podman
alias docker='podman'
alias docker-compose='podman-compose'
# docker
alias dk='docker'
## container
@ -22,12 +22,17 @@ alias dkr='docker run -i -t'
alias dktop='docker top'
## image
alias dkb='docker build .'
alias dkb='docker build . -t'
alias dki='docker image'
alias dkic='docker image create'
alias dkii='docker image inspect'
alias dkil='docker pull'
alias dkila="docker image ls | grep -v none | awk '{print \"docker pull \" \$1 \":\" \$2}' | $SHELL"
function dkila() {
readarray -t IMG \
<<< "$(docker image ls | grep -v localhost | awk '{print $1 ":" $2}')"
docker pull "${IMG[@]}"
}
alias dkils='docker image ls'
alias dkilsa='docker image ls -a'
alias dkilsaq='docker image ls -a -q'

View File

@ -17,14 +17,9 @@ function kxn() {
local ctx="$(echo - "$1" | awk '{print $1}')"; ctx="${ctx:l}"
local ns="${2-$(echo - "$1" | awk '{print $2}')}"; ns="${ns:l}"
[ "$ctx" = hrmn ] \
&& ln -sf /usr/local/bin/k1.18 /var/tmp/kubectl \
|| ln -sf /usr/bin/kubectl /var/tmp/kubectl
kubectx "$ctx"
[ -n "$ns" ] && kubens "$ns"
}
alias kubectl='/var/tmp/kubectl'
alias kns='kubens'
alias k='kubectl'

View File

@ -1,6 +1,3 @@
ln -sf "$(mktemp -d chromiumconfigXXX)" "$XDG_CACHE_HOME/chromium"
ln -sf "$(mktemp -d chromiumcacheXXXX)" "$XDG_CONFIG_HOME/chromium"
if [ "$XDG_VTNR" = 1 ]; then
GUILOG="$HOME/.local/share/gui.log"

View File

@ -1,5 +1,4 @@
# system
alias tmp='cd "$(mktemp -d)"'
alias update='sudo pacman -Syu && config submodule update --remote --recursive --init'
alias pac='sudo pacman'
alias vi='$EDITOR'
@ -38,4 +37,8 @@ function j() {
cd "$dest"
}
function tmp() {
cd "$(mktemp -dt "$1"XXX)"
}
# vim: ft=zsh

@ -1 +1 @@
Subproject commit cd18bce53e01d0f614ffcbb7429053fb508cb095
Subproject commit cdd7dab5db4c668b962f908b57e244aa1ff4b574

View File

@ -4,6 +4,7 @@
#(i3status | while read line; do xsetroot -name "$line"; done) &
# startup
. <(ssh-agent)
wallpaper &
xss-lock -n screensaver -- lock &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 || # arch
@ -12,5 +13,6 @@ xss-lock -n screensaver -- lock &
picom &
gammastep 2> /dev/null &
sbar &
./keepass/start.sh &
exec dbus-launch dwm

View File

@ -1,7 +1,6 @@
#!/bin/bash -e
# shellcheck disable=SC2034
DBUS_SESSION_BUS_ADDRESS= # https://wiki.archlinux.org/title/Podman#Permission_denied:_OCI_permission_denied
CRI=(podman)
IMG=ghcr.io/epitech/coding-style-checker

View File

@ -1,9 +1,5 @@
#!/bin/bash -e
if grep -q 'Arch' /etc/os-release; then
unset DBUS_SESSION_BUS_ADDRESS
fi
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
--network host

View File

@ -1,9 +1,5 @@
#!/bin/bash -e
if grep -q 'Arch' /etc/os-release; then
unset DBUS_SESSION_BUS_ADDRESS
fi
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
--network host

View File

@ -1,9 +1,5 @@
#!/bin/bash -e
if grep -q 'Arch' /etc/os-release; then
unset DBUS_SESSION_BUS_ADDRESS
fi
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
--network host

5
bin/keepassxc Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
KEEPASS="$HOME/keepass"
/usr/bin/keepassxc --config "$KEEPASS/keepassxc.ini" "$KEEPASS/Passwords.kdbx"

View File

@ -1,17 +0,0 @@
#!/bin/bash
set -e
usage() {
echo "USAGE: $0 FILE.pdf"
exit
}
if [[ "$1" != *.pdf ]]; then
usage
fi
DEVICE='pixma:04A9178A_31A16C'
FORMAT='png'
RES=300
scanimage -d "$DEVICE" --format="$FORMAT" --resolution "$RES" | convert - "$1"

94
bin/wlp
View File

@ -1,50 +1,76 @@
#!/bin/bash -e
NMCLI=(nmcli -f 'SSID,RATE,BARS,SECURITY' dev wifi)
CON=("${NMCLI[@]}" connect)
RESCAN=0
function rescan() {
if [ "$RESCAN" = 1 ]; then
return 1
fi
RESCAN=1
"${NMCLI[@]}" list --rescan yes > /dev/null
readarray -t NET <<< "$("${NMCLI[@]}" list | awk '!w[$1]++' | tail -n+2)"
function ask_pass() {
local net="$1" p
while [ "${#p}" -lt 8 ]; do
p="$(zenity --entry --entry-text="$pass" --text "Enter password for $net")"
if [ "$?" -ne 0 ]; then
return 1
fi
pass="$p"
done
echo "$p"
}
function get_net() {
local cmd=("${NMCLI[@]}" list)
[ "$1" = '-r' ] && cmd+=(--rescan yes)
readarray -t NET <<< "$("${cmd[@]}" | awk '!w[$1]++' | tail +2)"
}
function connect() {
local cmd=("${NMCLI[@]}" connect "$1")
local pass
if ! "${CON[@]}" "$1"; then
case "$?" in
4)
pass="$(zenity --entry --text "Enter password for $1")"
"${CON[@]}" "$1" password "$pass"
;;
10)
rescan && connect "$@"
;;
esac
fi
[[ "$2" -ge 2 ]] && return 1
"${cmd[@]}"
case "$?" in
0)
;;
4) # Connection activation failed.
while [ "$?" = 4 ]; do
pass="$(ask_pass "$1")"
if [ -z "$pass" ]; then
exit
fi
"${cmd[@]}" password "$pass"
done
;;
10) # Connection, device, or access point does not exist.
get_net -r && connect "$@" "$(($2 + 1))"
;;
*)
return 1
;;
esac
kill -36 "$(cat "$HOME/.cache/pidofbar")"
exit
}
if [ -n "$1" ]; then
connect "$1"
fi
readarray -t NET <<< "$("${NMCLI[@]}" list | awk '!w[$1]++' | tail -n+2)"
while true; do
n="$(printf '%s\n' "${NET[@]}" rescan | dmenu -i -l 10)"
if [ -z "$n" ]; then
function readopt() {
if ! printf '%s\n' "${NET[@]}" rescan | dmenu -i -l 10; then
exit
fi
if [ "$n" = rescan ]; then
RESCAN=0
rescan
else
connect "$(awk '{print $1}' <<< "$n")"
fi
}
if [ -n "$1" ]; then
connect "$1"
exit
fi
get_net
while true; do
opt="$(readopt)"
case "$opt" in
rescan)
get_net -r
;;
*)
connect "$(awk '{print $1}' <<< "$opt")"
;;
esac
done