From 42208d00296499cea1c46279a45a41b06f051981 Mon Sep 17 00:00:00 2001 From: MoritzBoehme Date: Wed, 6 Oct 2021 17:37:15 +0200 Subject: [PATCH] added bin to path and fixed scripts --- bin/aursync | 16 ---------------- bin/cheat | 5 ++--- bin/lock | 36 ------------------------------------ bin/remove_orphans | 2 -- bin/sup | 9 +++++++++ bin/sxhkd-help | 2 +- modules/default.nix | 6 ++++++ 7 files changed, 18 insertions(+), 58 deletions(-) delete mode 100755 bin/aursync delete mode 100755 bin/lock delete mode 100755 bin/remove_orphans create mode 100755 bin/sup diff --git a/bin/aursync b/bin/aursync deleted file mode 100755 index b46fc45..0000000 --- a/bin/aursync +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -if [ -d "$HOME/aur/" ]; then - cd "$HOME/aur/custom-repo/x64_86" || exit - repo-add -q custom.db.tar.gz ./*.pkg.* - if [[ "$#" -eq 1 ]]; then - aur sync --repo custom --root "$(pwd)" --no-view -u "$1" >/dev/null - else - aur sync --repo custom --root "$(pwd)" --no-view -u >/dev/null - fi - mv custom.db.tar.gz custom.db - mv custom.files.tar.gz custom.files - git add . - git commit -a -q -m "$(date +"%F %T")" - git push -q -fi diff --git a/bin/cheat b/bin/cheat index e896c21..3f72475 100755 --- a/bin/cheat +++ b/bin/cheat @@ -1,3 +1,2 @@ -#!/bin/bash -cat="$(which bat 2>/dev/null || which cat)" -curl -s "cheat.sh/$1" | eval "$cat" +#!/usr/bin/env zsh +curl -s "cheat.sh/$1" | bat diff --git a/bin/lock b/bin/lock deleted file mode 100755 index a1162b5..0000000 --- a/bin/lock +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -B='#00000000' # blank -C='#FFFFFF22' # clear ish -D='#bd93f9' # default -T='#ff79c6' # text -W='#ff5555' # wrong -V='#50fa7b' # verifying - -/usr/bin/i3lock \ - --insidever-color=$C \ - --ringver-color=$V \ - \ - --insidewrong-color=$C \ - --ringwrong-color=$W \ - \ - --inside-color=$B \ - --ring-color=$D \ - --line-color=$B \ - --separator-color=$D \ - \ - --verif-color=$T \ - --wrong-color=$T \ - --time-color=$T \ - --date-color=$T \ - --layout-color=$T \ - --keyhl-color=$W \ - --bshl-color=$W \ - \ - --screen 1 \ - --blur 5 \ - --clock \ - --indicator \ - --time-str="%H:%M:%S" \ - --date-str="%A, %m %Y" \ - --keylayout 1 diff --git a/bin/remove_orphans b/bin/remove_orphans deleted file mode 100755 index c86ca08..0000000 --- a/bin/remove_orphans +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo pacman -Qtdq | sudo pacman -Rns - diff --git a/bin/sup b/bin/sup new file mode 100755 index 0000000..462ca30 --- /dev/null +++ b/bin/sup @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +pushd ~/.dotfiles +if [[ $1 =~ (update) ]]; then + sudo nixos-rebuild switch --flake .# --recreate-lock-file +fi +if [[ $1 =~ (apply) ]]; then + sudo nixos-rebuild switch --flake .# +fi +popd diff --git a/bin/sxhkd-help b/bin/sxhkd-help index 6c7f8cb..74926db 100755 --- a/bin/sxhkd-help +++ b/bin/sxhkd-help @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash awk '/^[a-z]/ && last {print "",$0,"\t",last,""} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc | column -t -s $'\t' | diff --git a/modules/default.nix b/modules/default.nix index 0682f0e..e85e974 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -32,6 +32,12 @@ home.username = "moritz"; home.homeDirectory = "/home/moritz"; + home.sessionPath = [ "/home/moritz/bin" ]; + home.file."bin" = { + recursive = true; + source = ../bin; + }; + xdg.userDirs = { enable = true; createDirectories = true;