From 6d2306e3f7af4efe4d41a6b69fcfacfc4cbd9ac4 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sat, 25 Jul 2026 16:43:05 +0200 Subject: [PATCH] feat: script to count pdf pages --- scripts/pdf-page-count | 16 ++++++++++++++++ scripts/toggle-swapescape | 10 ---------- scripts/update-nvim | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100755 scripts/pdf-page-count delete mode 100755 scripts/toggle-swapescape diff --git a/scripts/pdf-page-count b/scripts/pdf-page-count new file mode 100755 index 0000000..06ecfae --- /dev/null +++ b/scripts/pdf-page-count @@ -0,0 +1,16 @@ +#!/bin/sh + +if [[ -n $1 ]]; then + echo "File contains $(pdfinfo $1 | awk '/^Pages:/ {print $2}') pages" +else + total=0 + for file in *.pdf; do + count=$(pdfinfo $file | awk '/^Pages:/ {print $2}') + echo "$count pages in $file" + total=$(($total + count)) + done + + echo " +Total page count is $total +" +fi diff --git a/scripts/toggle-swapescape b/scripts/toggle-swapescape deleted file mode 100755 index e20f3d4..0000000 --- a/scripts/toggle-swapescape +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -enabled=$(hyprctl getoption input:kb_options | grep "caps:swapescape") -if [[ $enabled == "" ]]; then - hyprctl keyword input:kb_options "caps:swapescape" - notify-send "Swapescape enabled" -else - hyprctl keyword input:kb_options "" - notify-send "Swapescape disabled" -fi diff --git a/scripts/update-nvim b/scripts/update-nvim index 4d6302b..e502dc0 100755 --- a/scripts/update-nvim +++ b/scripts/update-nvim @@ -1,5 +1,5 @@ #!/bin/sh -cd ~/projects/nvim/ +cd ~/projects/system/nvim/ git pull ./nvim-install.sh