1
0
Fork 0
This commit is contained in:
Luca Bilke 2023-03-28 09:45:16 +02:00
parent 0496d4ecc9
commit cc5e93bee0
5 changed files with 10 additions and 12 deletions

View File

@ -1,3 +0,0 @@
local mpv_config_dir_path = require("mp").command_native({"expand-path", "~~/"})
function load(relative_path) dofile(mpv_config_dir_path .. "/script_modules/" .. relative_path) end
load("mpvSockets/mpvSockets.lua")

View File

@ -2,9 +2,9 @@
# profile file. Runs on login. Environmental variables are set here. # profile file. Runs on login. Environmental variables are set here.
# Adds `~/.local/bin` to $PATH
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
export PATH="$PATH:~/.local/share/npm-global/bin:$localpath" export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath"
export FPATH="$FPATH:$HOME/.local/share/zsh/functions:$HOME/.local/share/zsh/site-functions"
# Default programs: # Default programs:
export EDITOR="nvim" export EDITOR="nvim"

View File

@ -3,13 +3,14 @@
# this script provides a menu of screenshot options, using maim # this script provides a menu of screenshot options, using maim
# variables # variables
dir=$XDG_PICTURES_DIR
output="$(date '+%y%m%d-%H%M-%S').png" output="$(date '+%y%m%d-%H%M-%S').png"
xclip_cmd="xclip -sel clip -t image/png" xclip_cmd="xclip -sel clip -t image/png"
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
"a selected area") maim -s pic-selected-"${output}" ;; "a selected area") maim -s "$dir/pic-selected-${output}" ;;
"current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;; "current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" "$dir/pic-window-${output}" ;;
"full screen") maim -q -d 0.2 pic-full-"${output}" ;; "full screen") maim -q -d 0.2 "$dir/pic-full-${output}" ;;
"a selected area (copy)") maim -s | ${xclip_cmd} ;; "a selected area (copy)") maim -s | ${xclip_cmd} ;;
"current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
"full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;; "full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;

View File

@ -13,7 +13,7 @@ fi
if ls /sys/class/net/e*/operstate 1>/dev/null 2>&1; then if ls /sys/class/net/e*/operstate 1>/dev/null 2>&1; then
for e in /sys/class/net/e*/operstate; do for e in /sys/class/net/e*/operstate; do
if_icon="$(sed "s/down//;s/up//" $e)" if_icon="$(sed "s/down//;s/up//" $e)"
printf "$shift\033[10m%s\033[10m" "$if_icon" printf "$shift\033[11m%s\033[10m" "$if_icon"
shift=" " shift=" "
done done
fi fi

View File

@ -4,10 +4,10 @@ big="\033[11m"
reset="\033[10m" reset="\033[10m"
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 & pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
[ "$(playerctl status 2>&1)" = "No players found" ] && echo -e "$bigﱙ$reset" && exit 1 [ "$(playerctl status 2>&1)" = "No players found" ] && echo "$bigﱙ$reset" && exit 1
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)" # song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)" song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)"
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…" [ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
icon="$(playerctl status | sed "s/Playing//;s/Paused//;")" icon="$(playerctl status | sed "s/Playing//;s/Paused//;s/Stopped/ﱙ/;")"
echo -e "$big$icon$reset $song" echo "$big$icon$reset $song"