initial commit
This commit is contained in:
commit
0eec9e1064
|
@ -0,0 +1,5 @@
|
|||
Tracks files in /usr/local/bin
|
||||
|
||||
Initialised with:
|
||||
|
||||
git --git-dir=/home/ray/.config/bin --work-tree=/usr/local/bin init
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
PULSE_SERVER=192.168.0.90 pavucontrol
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
signal() {
|
||||
xsetroot -name "fsignal:$*"
|
||||
}
|
||||
|
||||
case $# in
|
||||
1)
|
||||
case $1 in
|
||||
setlayout | view | viewall | togglebar | togglefloating | zoom | killclient | quit)
|
||||
signal $1
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command or missing one argument."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
2)
|
||||
case $1 in
|
||||
view)
|
||||
signal $1 ui $2
|
||||
;;
|
||||
viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon)
|
||||
signal $1 i $2
|
||||
;;
|
||||
setmfact)
|
||||
signal $1 f $2
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command or one too many arguments."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Too many arguments."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/bspc rule -a firefox -o state=fullscreen && /usr/bin/firefox -url $@
|
|
@ -0,0 +1,4 @@
|
|||
!/bin/sh
|
||||
|
||||
/usr/local/bin/ff-fullscreen https://www.figma.com/files
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -f "$1" ] ; then
|
||||
echo "Error: file exists: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "#!/bin/bash" > "$1"
|
||||
echo "" >> "$1"
|
||||
echo "$2" >> "$1"
|
||||
|
||||
chmod +x "$1"
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -f "$1" ] ; then
|
||||
echo "Error: file exists: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "#!/bin/sh" > "$1"
|
||||
echo "" >> "$1"
|
||||
echo "$2" >> "$1"
|
||||
|
||||
chmod +x "$1"
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
_target_file="/tmp/pacman-update-count"
|
||||
# if set to 1 then also notify if no updates available
|
||||
_notify_none=0
|
||||
_error_code=0
|
||||
_show_help=0
|
||||
_hostname=$(hostname)
|
||||
_config_file="$HOME/.config/notify-updates/notify-updates.config"
|
||||
|
||||
if ! [ -f "$_target_file" ] ;
|
||||
then
|
||||
echo "notify-updates: cannot access '$_target_file': File not found"
|
||||
echo "notify-updates: try executing 'pacman-update-count.sh'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for _arg in "$@" ; do
|
||||
if [ "$_arg" = "-h" ] || [ "$_arg" = "--help" ] ; then
|
||||
_show_help=1
|
||||
elif [ "$_arg" = "-n" ] || [ "$_arg" = "--notify-none" ] ; then
|
||||
_notify_none=1
|
||||
else
|
||||
_error_code="5"
|
||||
_show_help=1
|
||||
echo "notify-updates: invalid option -- $_arg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$_show_help" -eq 1 ] ; then
|
||||
echo "Options:"
|
||||
echo " -h, --help show this message and exit"
|
||||
echo " -n, --notify-none notify if no updates available"
|
||||
exit "$_error_code"
|
||||
fi
|
||||
|
||||
if [ "$_error_code" -gt 0 ] ; then
|
||||
exit "$_error_code"
|
||||
fi
|
||||
|
||||
# TODO use $XDG_CONFIG_HOME
|
||||
if [ -f "$_config_file" ] ; then
|
||||
# shellcheck source=notify-updates.config
|
||||
. "$_config_file"
|
||||
else
|
||||
echo "notify-updates: warning - config file not found: $_config_file"
|
||||
fi
|
||||
|
||||
if [ "$notify_if_none" = "true" ] ; then
|
||||
_notify_none=1
|
||||
elif [ "$notify_if_none" = "false" ] ; then
|
||||
_notify_none=0
|
||||
fi
|
||||
|
||||
_updates_available=$(cat $_target_file)
|
||||
|
||||
if [ "$_updates_available" -gt 0 ] ; then
|
||||
_plural="s"
|
||||
if [ "$_updates_available" -lt 2 ] ; then
|
||||
_plural=""
|
||||
fi
|
||||
echo "Attention please: Update required for $_hostname: $_updates_available package$_plural" | festival --tts
|
||||
notify-send "Update Notifier" "Update required: $_updates_available package$_plural"
|
||||
elif [ "$_notify_none" -eq 1 ] ; then
|
||||
echo "Attention please: No package updates required for $_hostname" | festival --tts
|
||||
notify-send -u low "Update Notifier" "No updates required"
|
||||
fi
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
_updates_available="-1"
|
||||
_target_file="/tmp/pacman-update-count"
|
||||
_user="ray"
|
||||
_user_id=$(id -u)
|
||||
|
||||
if ! [ "$_user_id" -eq 0 ] ; then
|
||||
echo "pacman-update-count.sh: insufficient priviliges: must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch "$_target_file"
|
||||
chown root: "$_target_file"
|
||||
echo "$_updates_available" > "$_target_file"
|
||||
|
||||
pacman -Sy
|
||||
_updates_available=$(pacman -Qu | wc -l)
|
||||
|
||||
echo "Adding $_updates_available available updates to $_target_file"
|
||||
echo "$_updates_available" > "$_target_file"
|
||||
chown "$_user": "$_target_file"
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
_command="echo ""$*"" | festival --tts"
|
||||
ssh pamela "$_command"
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/firefox http://omv.home:8080/admin/ http://pihole.home/admin/
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
_session_dir="$HOME/.local/share/qutebrowser/sessions"
|
||||
_dmenu_config="$HOME/.config/dmenu/dmenurc"
|
||||
|
||||
if [ -f "$_dmenu_config" ] ; then
|
||||
# dmenu options will now be stored in $DMENU_OPTIONS
|
||||
. "$_dmenu_config"
|
||||
fi
|
||||
|
||||
_session_list=$(ls -t "$_session_dir" | sed 's/\.yml//')
|
||||
_session=$(printf "NONE\n%s" "$_session_list" | dmenu $DMENU_OPTIONS -i -p "Session :")
|
||||
[ -z "$_session" ] && exit 5;
|
||||
|
||||
if [ "$_session" = 'NONE' ] ; then
|
||||
qutebrowser -R
|
||||
else
|
||||
qutebrowser -r "$_session_dir/$_session.yml"
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
alacritty -e "$@"
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
_dmenu_config="$HOME/.config/dmenu/dmenurc"
|
||||
_sessions="$(tmux ls | cut -d: -f1)"
|
||||
|
||||
if [ -f "$_dmenu_config" ] ; then
|
||||
# dmenu options will now be stored in $DMENU_OPTIONS
|
||||
. "$_dmenu_config"
|
||||
fi
|
||||
|
||||
_session=$(echo "$_sessions" | dmenu $DMENU_OPTIONS -i -p "Tmux session:")
|
||||
|
||||
[ -z "$_session" ] || terminal-dev tmux attach -t $_session
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/local/bin/ff-fullscreen gollum.docker.home
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
# dependency - xtitle
|
||||
|
||||
# arguments:
|
||||
# none - select from windows on current desktop
|
||||
# 'monitor' - select from all windows.
|
||||
# 'all' - select from all windows.
|
||||
|
||||
. "$HOME/.config/dmenu/dmenurc"
|
||||
|
||||
if command -v bspc ; then
|
||||
# adapted from: https://www.reddit.com/r/bspwm/comments/er2olp/dmenu_window_picker/ff16ff0/
|
||||
# NOTE: query can be '.window', '.local.window', '.local.tiled' (to only have tiled windows
|
||||
# as options) or '.local.window.!fullscreen.!floating' (to only have tiled and pseudo_tiled windows as options).
|
||||
if [ "$1" = all ] ; then
|
||||
ids=($(bspc query -N -n ".window"))
|
||||
elif [ "$1" = monitor ] ; then
|
||||
ids=($(bspc query -N -m "focused"))
|
||||
else
|
||||
# current desktop
|
||||
ids=($(bspc query -N -n ".local.window"))
|
||||
fi
|
||||
options="$(xtitle "${ids[@]}" | awk '{ print ++i": "$0 }')"
|
||||
|
||||
[[ -n "$options" ]] || exit
|
||||
|
||||
id_index="$(<<< "$options" dmenu $DMENU_OPTIONS -l 20 | cut -d: -f1)"
|
||||
[[ -n "$id_index" ]] || exit
|
||||
bspc node "${ids[$((id_index - 1))]}" -f
|
||||
|
||||
fi
|
Binary file not shown.
Loading…
Reference in New Issue