From 3d7208853d0f7dfdee4c0aa26a65557414aea96f Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Thu, 9 May 2024 21:23:28 -0500 Subject: Shell update --- hooks/post-up/installations | 3 +-- hooks/pre-up/1-oksh | 6 ++++++ hooks/pre-up/2-nix | 8 ++++++++ hooks/pre-up/3-void | 15 +++++++++++++++ hooks/pre-up/4-mbsync | 3 +++ hooks/pre-up/mbsync | 3 --- hooks/pre-up/nix | 6 ------ hooks/pre-up/void | 15 --------------- kshrc | 6 +++--- profile | 5 +++-- repository.list | 21 +++++++++++++-------- 11 files changed, 52 insertions(+), 39 deletions(-) create mode 100755 hooks/pre-up/1-oksh create mode 100755 hooks/pre-up/2-nix create mode 100755 hooks/pre-up/3-void create mode 100755 hooks/pre-up/4-mbsync delete mode 100755 hooks/pre-up/mbsync delete mode 100755 hooks/pre-up/nix delete mode 100755 hooks/pre-up/void diff --git a/hooks/post-up/installations b/hooks/post-up/installations index 562bfe2..320f86d 100644 --- a/hooks/post-up/installations +++ b/hooks/post-up/installations @@ -1,3 +1,2 @@ -#!/bin/bash -set -e +#!/bin/sh xsync diff --git a/hooks/pre-up/1-oksh b/hooks/pre-up/1-oksh new file mode 100755 index 0000000..7cff998 --- /dev/null +++ b/hooks/pre-up/1-oksh @@ -0,0 +1,6 @@ +#!/bin/sh + +if ! [ -x "$(command -v mksh)" ]; then + sudo xbps-install -y mksh + chsh -s /bin/mksh +fi diff --git a/hooks/pre-up/2-nix b/hooks/pre-up/2-nix new file mode 100755 index 0000000..cfba81f --- /dev/null +++ b/hooks/pre-up/2-nix @@ -0,0 +1,8 @@ +#!/bin/mksh + +if ! [ -x "$(command -v nix)" ]; then + echo "Installing Nix" + sudo install -d -m755 -o $(id -u) -g $(id -g) /nix + curl -L https://nixos.org/nix/install | sh +fi + diff --git a/hooks/pre-up/3-void b/hooks/pre-up/3-void new file mode 100755 index 0000000..e0824c2 --- /dev/null +++ b/hooks/pre-up/3-void @@ -0,0 +1,15 @@ +#!/bin/sh + +# We'll use xpkg from xtools to find installable packages +if ! [ -x "$(command -v xpkg)" ]; then + sudo xbps-install xtools +fi + +# Set up file sync +if [ ! -f ~/repository.list ]; then + xpkg -m > ~/repository.list +fi + +if [ ! "$(cat ~/repository.list | grep 'void-repo-nonfree')" ]; then + sudo xbps-install -Sy void-repo-nonfree +fi diff --git a/hooks/pre-up/4-mbsync b/hooks/pre-up/4-mbsync new file mode 100755 index 0000000..6d58bb1 --- /dev/null +++ b/hooks/pre-up/4-mbsync @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p ~/mail-home +mkdir -p ~/mail-work \ No newline at end of file diff --git a/hooks/pre-up/mbsync b/hooks/pre-up/mbsync deleted file mode 100755 index 6d58bb1..0000000 --- a/hooks/pre-up/mbsync +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -mkdir -p ~/mail-home -mkdir -p ~/mail-work \ No newline at end of file diff --git a/hooks/pre-up/nix b/hooks/pre-up/nix deleted file mode 100755 index 84c077e..0000000 --- a/hooks/pre-up/nix +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -if ! [ -x "$(command -v nix)" ]; then - sh <(curl -L https://nixos.org/nix/install) --no-daemon -fi - diff --git a/hooks/pre-up/void b/hooks/pre-up/void deleted file mode 100755 index 01de807..0000000 --- a/hooks/pre-up/void +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# We'll use xpkg from xtools to find installable packages -if ! [ -x "$(command -v xpkg)" ]; then - sudo xbps-install xtools -fi - -# Set up file sync -if [ ! -f ~/repository.list ]; then - xpkg -m > ~/repository.list -fi - -if [ ! "$(cat ~/repository.list | grep 'void-repo-nonfree')" ]; then - sudo xbps-install -Sy void-repo-nonfree -fi \ No newline at end of file diff --git a/kshrc b/kshrc index 7c24731..5f06246 100644 --- a/kshrc +++ b/kshrc @@ -1,5 +1,4 @@ eval "$(zoxide init posix --hook prompt)" -export PATH=${PATH}:~/.local/bin export GPG_TTY=/dev/pts/0 gpg-connect-agent updatestartuptty /bye >/dev/null alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" @@ -11,5 +10,6 @@ alias rcdn="rcdn -d ~/rcm" alias mkrc="mkrc -d ~/rcm" alias infols="inxi -S -c 0" alias f-commit="fossil commit && fossil git export" -PS1=' $(git branch 2> /dev/null | grep "^\*" | colrm 1 2 | sed -e "s/$/./")${PWD##*/} ' -export SHELL='oksh' +PS1='$(git branch 2> /dev/null | grep "^\*" | colrm 1 2 | sed -e "s/$/./")${PWD##*/} ' +eval "$(direnv export bash)" +export SHELL='ksh' diff --git a/profile b/profile index 8238f8c..6fffd5b 100644 --- a/profile +++ b/profile @@ -11,10 +11,11 @@ export MOZ_ENABLE_WAYLAND="1" export XCURSOR_SIZE="32" export XDG_CURRENT_DESKTOP="wlroots" export XDG_SESSION_TYPE="wayland" -export PF_INFO="ascii title os pkgs shell" +export PF_INFO="ascii title os de shell" export PF_ALIGN="7" export PF_COLOR="0" - +export PATH=${PATH}:~/.local/bin export ENV=$HOME/.kshrc +eval "$(direnv export bash)" emacs --daemon if [ "$(tty)" == "/dev/tty1" ]; then exec dbus-run-session hikari; fi diff --git a/repository.list b/repository.list index 8a9ddf3..baef194 100644 --- a/repository.list +++ b/repository.list @@ -1,8 +1,11 @@ +ImageMagick +NetworkManager Thunar aspell aspell-en base-system bemenu +bluez chrony cryptsetup direnv @@ -12,6 +15,7 @@ fd firefox foot fossil +gimp git github-cli grim @@ -29,15 +33,21 @@ lvm2 mdadm mesa-dri msmtp +mksh pamixer pass +pinentry-tty polkit pulseaudio +qt6-wayland +qutebrowser rcm ripgrep +slurp swappy terraform terraform-ls +texinfo thunar-archive-plugin thunar-media-tags-plugin tldr @@ -54,12 +64,7 @@ xdg-desktop-portal-wlr xorg-server-xwayland xtools xz -zoxide -mg -bluez -pinentry-tty -texinfo -slurp -ImageMagick -gimp zathura +zile +zoxide +pam-gnupg -- cgit v1.2.3