Adding lolcate and associated pieces for it

This commit is contained in:
Chris Cochrun 2021-04-12 20:12:55 -05:00
parent ae72f8222c
commit ac56e431b6
14 changed files with 105 additions and 10 deletions

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/bin/bash
awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \
<(rg 'cpu ' /proc/stat) <(sleep 1;rg 'cpu ' /proc/stat)

View file

@ -42,7 +42,7 @@ histlist=$(printf '%s\n' "$(sqlite3 "$HISTDB" "${SQL}")" | awk -F "|" '{print
# Piping the above lists into dmenu.
# We use "printf '%s\n'" to format the array one item to a line.
# The urls are listed quickmarks first, then the SEPARATOR, and then bookmarks.
choice=$(printf '%s\n' "$qmlist" "$SEPARATOR" "$bmlist" "$SEPARATOR" "$histlist" | rofi -font "VictorMono Nerd Font 30.0" -dmenu -p 'Qutebrowser open:') "$@" || exit
choice=$(printf '%s\n' "$qmlist" "$SEPARATOR" "$bmlist" "$SEPARATOR" "$histlist" | rofi -dmenu -p 'Qutebrowser open:' -config "/home/chris/.dotfiles/rofi/launchers-git/$style.rasi") "$@" || exit
# What to do if the separator is chosen from the list.
# We simply launch qutebrowser without any url arguments.

11
scripts/filesearch Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
if [ $(hostname) = "syl" ]; then
style="laptop"
#echo "this is hidpi"
else
style="desktop"
#echo "this is not hidpi"
fi
lolcate | rofi -dmenu -p "File Search:" -i -config ~/.dotfiles/rofi/launchers-git/$style.rasi -matching regex | xargs -r0 xdg-open

View file

@ -1,5 +1,6 @@
#!/usr/bin/sh
exec 3>&2
exec 2> /dev/null
btrfs fi usage / | rg Free | awk '{print $3}'

View file

@ -1,4 +1,4 @@
#!/usr/bin/sh
#!/bin/sh
mbsync --all
mu index

5
scripts/mutemic Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
pactl set-source-mute @DEFAULT_SOURCE@ toggle
paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
notify-send "mic muted toggled"

View file

@ -1,2 +1,2 @@
#!/usr/bin/sh
#!/bin/sh
pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'