Update formatting.

This commit is contained in:
CronyAkatsuki 2023-11-04 22:03:43 +01:00
parent 41754e8ad1
commit e1c508c53b
16 changed files with 287 additions and 278 deletions

View File

@ -6,6 +6,6 @@
[ "$1" = "open" ] && buku --nostdin -p -f5 | sed 's/\t/;/g' | column -t -s ';' | $DMENU -p "Open bookmark: " -i -l 10 | cut -d' ' -f1 | xargs -r buku --nostdin -o
[ "$1" = "edit" ] && buku --nostdin -p -f5 | sed 's/\t/;/g' | column -t -s ';' | $DMENU -p "Edit bookmark: " -i -l 10 | cut -d' ' -f1 | xargs -r $TERMINAL -e buku -w
[ "$1" = "edit" ] && buku --nostdin -p -f5 | sed 's/\t/;/g' | column -t -s ';' | $DMENU -p "Edit bookmark: " -i -l 10 | cut -d' ' -f1 | xargs -r "$TERMINAL" -e buku -w
[ "$1" = "delete" ] && buku --nostdin -p -f5 | sed 's/\t/;/g' | column -t -s ';' | $DMENU -p "Edit bookmark: " -i -l 10 | cut -d' ' -f1 | xargs -r -I % buku --nostdin -d % --tacit && notify-send "Deleted bookmark"
[ "$1" = "delete" ] && buku --nostdin -p -f5 | sed 's/\t/;/g' | column -t -s ';' | $DMENU -p "Delete bookmark: " -i -l 10 | cut -d' ' -f1 | xargs -r -I % buku --nostdin -d % --tacit

View File

@ -12,8 +12,7 @@ get_category () {
}
menu() {
while [ -z "$game" ]
do
while [ -z "$game" ]; do
[ -z "$1" ] && game=$(game-run list "$category" | sed '/-18+/d' | $DMENU -p "Choose game to run:")
[ "$1" = "-a" ] && game=$(game-run list "$category" | $DMENU -p "Choose game to run:")
@ -35,7 +34,7 @@ main () {
get_category
menu
menu $@
launch_game
}

View File

@ -9,7 +9,7 @@ db=$(grep database ~/.config/dmenu-keepassxc/config | cut -d: -f 2)
kf=$(grep keyfile ~/.config/dmenu-keepassxc/config | cut -d: -f 2)
if [ "$2" = copy ]; then
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1" | xclip -sel c
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1" | xclip -sel c && quick-notify "Dmenu-KeePassXC" "Password Copied"
else
$DMENU -P -p "Enter KeePassXC database password" | keepassxc-cli show -sa password -k $kf $db "$1"
fi

View File

@ -1,7 +1,7 @@
#!/bin/sh
convert_sizes() {
printf '%s\n' "$@" | \
printf '%s\n' "$@" |
while read size; do
numfmt --to iec --format "%.2f" $size
done
@ -9,7 +9,7 @@ convert_sizes () {
list() {
num=1
printf '%s\n' "$1" | \
printf '%s\n' "$1" |
while read line in; do
category=$(printf '%s' "$2" | sed -n "${num}p")
seeder=$(printf '%s' "$3" | sed -n "${num}p")

View File

@ -16,8 +16,7 @@ get_current_profile () {
}
menu() {
while [ -z "$profile" ]
do
while [ -z "$profile" ]; do
profile=$(sudo ryzenset list $category | $DMENU -i -p "Current: $current_mode:")
[ -z "$profile" ] && get_category

View File

@ -8,8 +8,14 @@ load_config () {
menu() {
case "$(printf "a selected area\\nfull screen" | $DMENU -l 6 -p "Screenshot which area?")" in
"a selected area") sleep 0.5; maim -m 2 -s $dir/pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
"full screen") sleep 0.5; maim -m 2 $dir/pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
"a selected area")
sleep 0.5
maim -m 2 -s $dir/pic-selected-"$(date '+%y%m%d-%H%M-%S').png"
;;
"full screen")
sleep 0.5
maim -m 2 $dir/pic-full-"$(date '+%y%m%d-%H%M-%S').png"
;;
esac
}

View File

@ -16,7 +16,7 @@ move () {
current=$(transmission-remote -t $1 -i | grep -i location | awk '{print $2}')
choice=$(printf '%s\n' "${paths[@]}" | $DMENU -p "Current: $current")
choice=$(printf '%s\n' "${paths[@]}" | $DMENU -i -p "Current: $current")
[ -z "$choice" ] && quick-notify "Transmission" "No path chosen" && exit
@ -30,19 +30,24 @@ move () {
}
menu() {
case "$(printf "Start\\nStop\\nMove\\nRemove" | $DMENU -p "Torrent Action: ")" in
Remove) transmission-remote -t $id -rad
case "$(printf "Start\\nStop\\nMove\\nRemove" | $DMENU -i -p "Torrent Action: ")" in
Remove)
transmission-remote -t $id -rad
quick-notify "Transmission" "Removed $id"
;;
Start) transmission-remote -t $id -s
Start)
transmission-remote -t $id -s
quick-notify "Transmission" "Started $id"
;;
Stop) transmission-remote -t $id -S
Stop)
transmission-remote -t $id -S
quick-notify "Transmission" "Stoped $id"
;;
Move) move $id
Move)
move $id
;;
*) quick-notify "Transmission" "No action chosen"
*)
quick-notify "Transmission" "No action chosen"
;;
esac
}
@ -50,7 +55,7 @@ menu () {
main() {
load_config
id=$(transmission-remote -l | $DMENU -l 10 | awk '{print $1}'| sed 's/*//')
id=$(transmission-remote -l | $DMENU -i -l 10 | awk '{print $1}' | sed 's/*//')
[ -z "$id" ] && exit 0