378 current 2025-05-03 19:07:08 25.05.20250424.f771eb4 6.12.24 *

This commit is contained in:
2025-05-03 19:07:41 -04:00
parent 8e5f77b963
commit aa642e180f
4 changed files with 51 additions and 30 deletions

View File

@@ -191,11 +191,12 @@ super + {shift} + {o}
super + {ctrl} + {o}
sh nf search
# super + {ctrl} + {p}
# sh /home/synchronous/.scripts/papers/paper-search-cached.sh
# sh /home/synchronous/.scripts/papers/paper-search-cached.sh
super + {ctrl} + {p}
sh paper-search-cached
super + {ctrl} + {l}
sh /home/synchronous/.scripts/papers/paper-search.sh
sh paper-search
#super + {ctrl} + {l}
# sh /home/synchronous/.scripts/document-scripts/document-search-fast.sh
@@ -210,9 +211,9 @@ super + {ctrl} + {c}
super + {alt} + {c}
find /home/synchronous/current-semester -follow -maxdepth 1 | cut -c36- | sed '/^[[:space:]]*$/d' | rofi -dmenu | read rsem; yq ".url" "/home/synchronous/current-semester/$rsem/info.yaml" | xargs firefox
# sh /home/synchronous/.scripts/vimwiki/open_todo.sh
super + {p}
# sh /home/synchronous/.scripts/vimwiki/open_todo.sh
nf todo
sh nf todo
super + {m}
sh /home/synchronous/.scripts/vimwiki/open-learning.sh

View File

@@ -0,0 +1,11 @@
#!/bin/bash
paper_dir="/home/synchronous/Zotero/storage"
papers=$(cat "/home/synchronous/.paper-cache")
selected_file=$(echo "$papers" | rofi -dmenu -i -p "Select a paper" -theme /home/synchronous/.config/rofi/styles/prompt-papers.rasi)
if [ -n "$selected_file" ]; then
full_path=$(find $paper_dir -name "$selected_file")
echo "$full_path"
/etc/profiles/per-user/synchronous/bin/zathura --fork "$full_path"
fi

View File

@@ -0,0 +1,28 @@
paper_dir="/home/synchronous/Zotero"
OIFS="$IFS"
IFS=$'\n'
paperall=""
papers=$(find $paper_dir -name "*.pdf")
for file in $papers
do
prefix=$(echo "$file" | grep -o -E "[0-9][0-9]\.[0-9][0-9]")
name=$(echo "$file" | awk -F/ '{print $NF}')
entry="[${prefix}] ${name}"
# https://unix.stackexchange.com/questions/20035/how-to-add-newlines-into-variables-in-bash-script
paperall=${paperall}${entry}'
'
done
paperall=$(echo "$paperall" | grep -v '^$')
selected_file=$(echo "$paperall" | rofi -dmenu -i -p "Select a paper" -theme /home/synchronous/.config/rofi/styles/prompt-search.rasi)
echo "$selected_file"
if [ -n "$selected_file" ]; then
selected_file=$(echo "$selected_file" | cut -c10-)
echo "$selected_file"
full_path=$(find $paper_dir -name "$selected_file")
# Open the selected file with zathura
zathura "$full_path"
fi

View File

@@ -1,30 +1,11 @@
#!/bin/bash
paper_dir="/home/synchronous/documents/10-19-papers"
OIFS="$IFS"
IFS=$'\n'
paperall=""
papers=$(find $paper_dir -name "*.pdf")
for file in $papers
do
prefix=$(echo "$file" | grep -o -E "[0-9][0-9]\.[0-9][0-9]")
name=$(echo "$file" | awk -F/ '{print $NF}')
entry="[${prefix}] ${name}"
# https://unix.stackexchange.com/questions/20035/how-to-add-newlines-into-variables-in-bash-script
paperall=${paperall}${entry}'
'
done
paperall=$(echo "$paperall" | grep -v '^$')
selected_file=$(echo "$paperall" | rofi -dmenu -i -p "Select a paper" -theme /home/synchronous/.config/rofi/styles/prompt-papers.rasi)
echo "$selected_file"
paper_dir="/home/synchronous/Zotero/storage"
papers=$(find $paper_dir -name "*.pdf" -exec basename {} \;)
echo "$papers" > /home/synchronous/.paper-cache
selected_file=$(echo "$papers" | rofi -dmenu -i -p "Select a paper" -theme /home/synchronous/.config/rofi/styles/prompt-papers.rasi)
if [ -n "$selected_file" ]; then
selected_file=$(echo "$selected_file" | cut -c10-)
echo "$selected_file"
full_path=$(find $paper_dir -name "$selected_file")
echo "$full_path"
# Open the selected file with zathura
zathura "$full_path"
/etc/profiles/per-user/synchronous/bin/zathura --fork "$full_path"
fi