mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Merge branch 'master' into patch-7
This commit is contained in:
commit
e74b813bec
@ -1,152 +1,27 @@
|
|||||||
[global]
|
[global]
|
||||||
monitor = 0
|
monitor = 0
|
||||||
follow = keyboard
|
follow = keyboard
|
||||||
geometry = "350x5-0+24"
|
width = 370
|
||||||
indicate_hidden = yes
|
height = 350
|
||||||
shrink = yes
|
offset = 0x19
|
||||||
transparency = 20
|
padding = 2
|
||||||
notification_height = 0
|
horizontal_padding = 2
|
||||||
separator_height = 2
|
transparency = 25
|
||||||
padding = 0
|
font = Monospace 12
|
||||||
horizontal_padding = 8
|
|
||||||
frame_width = 3
|
|
||||||
frame_color = "#282828"
|
|
||||||
|
|
||||||
# Define a color for the separator.
|
|
||||||
# possible values are:
|
|
||||||
# * auto: dunst tries to find a color fitting to the background;
|
|
||||||
# * foreground: use the same color as the foreground;
|
|
||||||
# * frame: use the same color as the frame;
|
|
||||||
# * anything else will be interpreted as a X color.
|
|
||||||
separator_color = frame
|
|
||||||
|
|
||||||
# Sort messages by urgency.
|
|
||||||
sort = yes
|
|
||||||
|
|
||||||
idle_threshold = 120
|
|
||||||
font = Monospace 14
|
|
||||||
line_height = 0
|
|
||||||
markup = full
|
|
||||||
|
|
||||||
# The format of the message. Possible variables are:
|
|
||||||
# %a appname
|
|
||||||
# %s summary
|
|
||||||
# %b body
|
|
||||||
# %i iconname (including its path)
|
|
||||||
# %I iconname (without its path)
|
|
||||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
|
||||||
# %n progress value if set without any extra characters
|
|
||||||
# %% Literal %
|
|
||||||
# Markup is allowed
|
|
||||||
format = "<b>%s</b>\n%b"
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
alignment = left
|
|
||||||
show_age_threshold = 60
|
|
||||||
word_wrap = yes
|
|
||||||
ellipsize = middle
|
|
||||||
ignore_newline = no
|
|
||||||
stack_duplicates = true
|
|
||||||
hide_duplicate_count = true
|
|
||||||
show_indicators = yes
|
|
||||||
icon_position = left
|
|
||||||
max_icon_size = 40
|
|
||||||
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/
|
|
||||||
sticky_history = yes
|
|
||||||
history_length = 20
|
|
||||||
dmenu = /usr/bin/dmenu -p dunst:
|
|
||||||
browser = /usr/bin/firefox -new-tab
|
|
||||||
|
|
||||||
# Always run rule-defined scripts, even if the notification is suppressed
|
|
||||||
always_run_script = true
|
|
||||||
|
|
||||||
title = Dunst
|
|
||||||
class = Dunst
|
|
||||||
startup_notification = false
|
|
||||||
force_xinerama = false
|
|
||||||
[experimental]
|
|
||||||
per_monitor_dpi = false
|
|
||||||
|
|
||||||
[shortcuts]
|
|
||||||
close = ctrl+space
|
|
||||||
close_all = ctrl+shift+space
|
|
||||||
history = ctrl+grave
|
|
||||||
context = ctrl+shift+period
|
|
||||||
|
|
||||||
[urgency_low]
|
[urgency_low]
|
||||||
# IMPORTANT: colors have to be defined in quotation marks.
|
background = "#1d2021"
|
||||||
# Otherwise the "#" and following would be interpreted as a comment.
|
|
||||||
background = "#282828"
|
|
||||||
foreground = "#928374"
|
foreground = "#928374"
|
||||||
timeout = 5
|
timeout = 3
|
||||||
# Icon for notifications with low urgency, uncomment to enable
|
|
||||||
#icon = /path/to/icon
|
|
||||||
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
background = "#458588"
|
|
||||||
foreground = "#ebdbb2"
|
foreground = "#ebdbb2"
|
||||||
|
background = "#458588"
|
||||||
timeout = 5
|
timeout = 5
|
||||||
|
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "#cc2421"
|
background = "#1cc24d"
|
||||||
foreground = "#ebdbb2"
|
foreground = "#ebdbb2"
|
||||||
frame_color = "#fabd2f"
|
frame_color = "#fabd2f"
|
||||||
timeout = 0
|
timeout = 10
|
||||||
|
|
||||||
# Every section that isn't one of the above is interpreted as a rules to
|
|
||||||
# override settings for certain messages.
|
|
||||||
# Messages can be matched by "appname", "summary", "body", "icon", "category",
|
|
||||||
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
|
|
||||||
# "background", "new_icon" and "format".
|
|
||||||
# Shell-like globbing will get expanded.
|
|
||||||
#
|
|
||||||
# SCRIPTING
|
|
||||||
# You can specify a script that gets run when the rule matches by
|
|
||||||
# setting the "script" option.
|
|
||||||
# The script will be called as follows:
|
|
||||||
# script appname summary body icon urgency
|
|
||||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
|
||||||
#
|
|
||||||
# NOTE: if you don't want a notification to be displayed, set the format
|
|
||||||
# to "".
|
|
||||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
|
||||||
# to find fitting options for rules.
|
|
||||||
|
|
||||||
#[espeak]
|
|
||||||
# summary = "*"
|
|
||||||
# script = dunst_espeak.sh
|
|
||||||
|
|
||||||
#[script-test]
|
|
||||||
# summary = "*script*"
|
|
||||||
# script = dunst_test.sh
|
|
||||||
|
|
||||||
#[ignore]
|
|
||||||
# # This notification will not be displayed
|
|
||||||
# summary = "foobar"
|
|
||||||
# format = ""
|
|
||||||
|
|
||||||
#[history-ignore]
|
|
||||||
# # This notification will not be saved in history
|
|
||||||
# summary = "foobar"
|
|
||||||
# history_ignore = yes
|
|
||||||
|
|
||||||
#[signed_on]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = "*signed on*"
|
|
||||||
# urgency = low
|
|
||||||
#
|
|
||||||
#[signed_off]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *signed off*
|
|
||||||
# urgency = low
|
|
||||||
#
|
|
||||||
#[says]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *says*
|
|
||||||
# urgency = critical
|
|
||||||
#
|
|
||||||
#[twitter]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *twitter.com*
|
|
||||||
# urgency = normal
|
|
||||||
#
|
|
||||||
# vim: ft=cfg
|
|
||||||
|
|||||||
4
.config/lf/cleaner
Executable file
4
.config/lf/cleaner
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ -n "$FIFO_UEBERZUG" ]; then
|
||||||
|
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||||
|
fi
|
||||||
@ -1,25 +1,45 @@
|
|||||||
# Luke's lf settings
|
# Luke's lf settings
|
||||||
|
|
||||||
|
|
||||||
|
# Note on Image Previews
|
||||||
|
# For those wanting image previews, like this system, there are four steps to
|
||||||
|
# set it up. These are done automatically for LARBS users, but I will state
|
||||||
|
# them here for others doing it manually.
|
||||||
|
#
|
||||||
|
# 1. ueberzug must be installed.
|
||||||
|
# 2. The scope file (~/.config/lf/scope for me), must have a command similar to
|
||||||
|
# mine to generate ueberzug images.
|
||||||
|
# 3. A `set cleaner` line as below is a cleaner script.
|
||||||
|
# 4. lf should be started through a wrapper script (~/.local/bin/lfub for me)
|
||||||
|
# that creates the environment for ueberzug. This command can be be aliased
|
||||||
|
# in your shellrc (`alias lf="lfub") or if set to a binding, should be
|
||||||
|
# called directly instead of normal lf.
|
||||||
|
|
||||||
# Basic vars
|
# Basic vars
|
||||||
set shell bash
|
|
||||||
set shellopts '-eu'
|
set shellopts '-eu'
|
||||||
set ifs "\n"
|
set ifs "\n"
|
||||||
set scrolloff 10
|
set scrolloff 10
|
||||||
set icons
|
set icons
|
||||||
set period 1
|
set period 1
|
||||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||||
|
set cleaner '~/.config/lf/cleaner'
|
||||||
# Vars that depend on environmental variables
|
set previewer '~/.config/lf/scope'
|
||||||
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
|
|
||||||
|
|
||||||
# cmds/functions
|
# cmds/functions
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
case $(file --mime-type $f -b) in
|
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||||
image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||||
text/*) $EDITOR $fx;;
|
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||||
|
text/*|application/json|inode/x-empty) $EDITOR $fx;;
|
||||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||||
image/svg+xml) display -- $f ;;
|
image/svg+xml) display -- $f ;;
|
||||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | setsid -f sxiv -aio 2>/dev/null | lf-select & ;;
|
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
|
||||||
|
setsid -f sxiv -aio 2>/dev/null | while read -r file; do
|
||||||
|
[ -z "$file" ] && continue
|
||||||
|
lf -remote "send select \"$file\""
|
||||||
|
lf -remote "send toggle"
|
||||||
|
done &
|
||||||
|
;;
|
||||||
audio/*) mpv --audio-display=no $f ;;
|
audio/*) mpv --audio-display=no $f ;;
|
||||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||||
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||||
@ -36,7 +56,7 @@ cmd extract ${{
|
|||||||
printf "%s\n\t" "$fx"
|
printf "%s\n\t" "$fx"
|
||||||
printf "extract?[y/N]"
|
printf "extract?[y/N]"
|
||||||
read ans
|
read ans
|
||||||
[ $ans = "y" ] && ext $fx
|
[ $ans = "y" ] && aunpack $fx
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd delete ${{
|
cmd delete ${{
|
||||||
@ -52,7 +72,7 @@ cmd moveto ${{
|
|||||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||||
set -f
|
set -f
|
||||||
clear; echo "Move to where?"
|
clear; echo "Move to where?"
|
||||||
dest="$(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||||
for x in $fx; do
|
for x in $fx; do
|
||||||
eval mv -iv \"$x\" \"$dest\"
|
eval mv -iv \"$x\" \"$dest\"
|
||||||
done &&
|
done &&
|
||||||
@ -63,7 +83,7 @@ cmd copyto ${{
|
|||||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||||
set -f
|
set -f
|
||||||
clear; echo "Copy to where?"
|
clear; echo "Copy to where?"
|
||||||
dest="$(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||||
for x in $fx; do
|
for x in $fx; do
|
||||||
eval cp -ivr \"$x\" \"$dest\"
|
eval cp -ivr \"$x\" \"$dest\"
|
||||||
done &&
|
done &&
|
||||||
@ -75,7 +95,7 @@ cmd bulkrename $vidir
|
|||||||
|
|
||||||
# Bindings
|
# Bindings
|
||||||
map <c-f> $lf -remote "send $id select '$(fzf)'"
|
map <c-f> $lf -remote "send $id select '$(fzf)'"
|
||||||
map J $lf -remote "send $id cd $(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
|
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
|
||||||
map gh
|
map gh
|
||||||
map g top
|
map g top
|
||||||
map D delete
|
map D delete
|
||||||
@ -105,5 +125,7 @@ map V push :!nvim<space>
|
|||||||
|
|
||||||
map W $setsid -f $TERMINAL >/dev/null 2>&1
|
map W $setsid -f $TERMINAL >/dev/null 2>&1
|
||||||
|
|
||||||
|
map Y $printf "%s" "$fx" | xclip -selection clipboard
|
||||||
|
|
||||||
# Source Bookmarks
|
# Source Bookmarks
|
||||||
source "~/.config/lf/shortcutrc"
|
source "~/.config/lf/shortcutrc"
|
||||||
|
|||||||
@ -1,58 +1,44 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -C -f -u
|
# File preview handler for lf.
|
||||||
#IFS=$'\n'
|
|
||||||
|
set -C -f
|
||||||
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
|
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
|
||||||
|
|
||||||
# ANSI color codes are supported.
|
image() {
|
||||||
# STDIN is disabled, so interactive scripts won't work properly
|
if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
|
||||||
|
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
|
||||||
# This script is considered a configuration file and must be updated manually.
|
else
|
||||||
|
mediainfo "$1"
|
||||||
# Meanings of exit codes:
|
fi
|
||||||
# code | meaning | action of ranger
|
|
||||||
# -----+------------+-------------------------------------------
|
|
||||||
# 0 | success | Display stdout as preview
|
|
||||||
# 1 | no preview | Display no preview at all
|
|
||||||
# 2 | plain text | Display the plain content of the file
|
|
||||||
|
|
||||||
# Script arguments
|
|
||||||
FILE_PATH="${1}" # Full path of the highlighted file
|
|
||||||
HEIGHT="${2}"
|
|
||||||
|
|
||||||
#FILE_EXTENSION="${FILE_PATH##*.}"
|
|
||||||
#FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
|
|
||||||
|
|
||||||
# Settings
|
|
||||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
|
||||||
HIGHLIGHT_TABWIDTH=8
|
|
||||||
HIGHLIGHT_STYLE='pablo'
|
|
||||||
|
|
||||||
|
|
||||||
handle_mime() {
|
|
||||||
local mimetype="${1}"
|
|
||||||
case "${mimetype}" in
|
|
||||||
text/html) w3m -dump "${FILE_PATH}" ;;
|
|
||||||
text/troff) man ./ "${FILE_PATH}" | col -b ;;
|
|
||||||
text/* | */xml)
|
|
||||||
if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
if [ "$( tput colors )" -ge 256 ]; then
|
|
||||||
local highlight_format='xterm256'
|
|
||||||
else
|
|
||||||
local highlight_format='ansi'
|
|
||||||
fi
|
|
||||||
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
|
|
||||||
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
|
|
||||||
application/zip) atool --list -- "${FILE_PATH}" ;;
|
|
||||||
image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
|
|
||||||
video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
|
|
||||||
*/pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
|
|
||||||
*opendocument*) odt2txt "${FILE_PATH}" ;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
ifub() {
|
||||||
handle_mime "${MIMETYPE}"
|
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Note that the cache file name is a function of file information, meaning if
|
||||||
|
# an image appears in multiple places across the machine, it will not have to
|
||||||
|
# be regenerated once seen.
|
||||||
|
|
||||||
|
case "$(file --dereference --brief --mime-type -- "$1")" in
|
||||||
|
image/*) image "$1" "$2" "$3" "$4" "$5" ;;
|
||||||
|
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
|
||||||
|
text/troff) man ./ "$1" | col -b ;;
|
||||||
|
text/* | */xml | application/json) bat --terminal-width "$4" -f "$1" ;;
|
||||||
|
application/zip) atool --list -- "$1" ;;
|
||||||
|
audio/* | application/octet-stream) mediainfo "$1" || exit 1;;
|
||||||
|
video/* )
|
||||||
|
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
|
||||||
|
[ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
|
||||||
|
image "$CACHE" "$2" "$3" "$4" "$5"
|
||||||
|
;;
|
||||||
|
*/pdf)
|
||||||
|
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
|
||||||
|
[ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
||||||
|
image "$CACHE.jpg" "$2" "$3" "$4" "$5"
|
||||||
|
;;
|
||||||
|
*opendocument*) odt2txt "$1" ;;
|
||||||
|
application/pgp-encrypted) gpg -d -- "$1" ;;
|
||||||
|
esac
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -96,8 +96,8 @@ set noshowcmd
|
|||||||
|
|
||||||
" Ensure files are read as what I want:
|
" Ensure files are read as what I want:
|
||||||
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
||||||
map <leader>v :VimwikiIndex
|
map <leader>v :VimwikiIndex<CR>
|
||||||
let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
|
let g:vimwiki_list = [{'path': '~/.local/share/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
|
||||||
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
|
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
|
||||||
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
|
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
|
||||||
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
||||||
@ -111,10 +111,12 @@ set noshowcmd
|
|||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
||||||
|
|
||||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
|
||||||
|
autocmd BufWritePre * let currPos = getpos(".")
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
autocmd BufWritePre * %s/\n\+\%$//e
|
autocmd BufWritePre * %s/\n\+\%$//e
|
||||||
autocmd BufWritePre *.[ch] %s/\%$/\r/e
|
autocmd BufWritePre *.[ch] %s/\%$/\r/e
|
||||||
|
autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
|
||||||
|
|
||||||
" When shortcut files are updated, renew bash and ranger configs with new material:
|
" When shortcut files are updated, renew bash and ranger configs with new material:
|
||||||
autocmd BufWritePost bm-files,bm-dirs !shortcuts
|
autocmd BufWritePost bm-files,bm-dirs !shortcuts
|
||||||
@ -130,7 +132,7 @@ if &diff
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Function for toggling the bottom statusbar:
|
" Function for toggling the bottom statusbar:
|
||||||
let s:hidden_all = 1
|
let s:hidden_all = 0
|
||||||
function! ToggleHiddenAll()
|
function! ToggleHiddenAll()
|
||||||
if s:hidden_all == 0
|
if s:hidden_all == 0
|
||||||
let s:hidden_all = 1
|
let s:hidden_all = 1
|
||||||
@ -147,3 +149,8 @@ function! ToggleHiddenAll()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
||||||
|
" Load command shortcuts generated from bm-dirs and bm-files via shortcuts script.
|
||||||
|
" Here leader is ";".
|
||||||
|
" So ":vs ;cfz" will expand into ":vs /home/<user>/.config/zsh/.zshrc"
|
||||||
|
" if typed fast without the timeout.
|
||||||
|
source ~/.config/nvim/shortcuts.vim
|
||||||
|
|||||||
247
.config/pipewire/pipewire.conf
Normal file
247
.config/pipewire/pipewire.conf
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
# Daemon config file for PipeWire version "0.3.40" #
|
||||||
|
#
|
||||||
|
# Copy and edit this file in /etc/pipewire for system-wide changes
|
||||||
|
# or in ~/.config/pipewire for local changes.
|
||||||
|
|
||||||
|
context.properties = {
|
||||||
|
## Configure properties in the system.
|
||||||
|
#library.name.system = support/libspa-support
|
||||||
|
#context.data-loop.library.name.system = support/libspa-support
|
||||||
|
#support.dbus = true
|
||||||
|
#link.max-buffers = 64
|
||||||
|
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||||
|
#mem.warn-mlock = false
|
||||||
|
#mem.allow-mlock = true
|
||||||
|
#mem.mlock-all = false
|
||||||
|
#clock.power-of-two-quantum = true
|
||||||
|
#log.level = 2
|
||||||
|
#cpu.zero.denormals = true
|
||||||
|
|
||||||
|
core.daemon = true # listening for socket connections
|
||||||
|
core.name = pipewire-0 # core name and socket name
|
||||||
|
|
||||||
|
## Properties for the DSP configuration.
|
||||||
|
#default.clock.rate = 48000
|
||||||
|
#default.clock.allowed-rates = [ 48000 ]
|
||||||
|
#default.clock.quantum = 1024
|
||||||
|
#default.clock.min-quantum = 32
|
||||||
|
#default.clock.max-quantum = 8192
|
||||||
|
#default.video.width = 640
|
||||||
|
#default.video.height = 480
|
||||||
|
#default.video.rate.num = 25
|
||||||
|
#default.video.rate.denom = 1
|
||||||
|
#
|
||||||
|
# These overrides are only applied when running in a vm.
|
||||||
|
vm.overrides = {
|
||||||
|
default.clock.min-quantum = 1024
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.spa-libs = {
|
||||||
|
#<factory-name regex> = <library-name>
|
||||||
|
#
|
||||||
|
# Used to find spa factory names. It maps an spa factory name
|
||||||
|
# regular expression to a library name that should contain
|
||||||
|
# that factory.
|
||||||
|
#
|
||||||
|
audio.convert.* = audioconvert/libspa-audioconvert
|
||||||
|
api.alsa.* = alsa/libspa-alsa
|
||||||
|
api.v4l2.* = v4l2/libspa-v4l2
|
||||||
|
api.libcamera.* = libcamera/libspa-libcamera
|
||||||
|
api.bluez5.* = bluez5/libspa-bluez5
|
||||||
|
api.vulkan.* = vulkan/libspa-vulkan
|
||||||
|
api.jack.* = jack/libspa-jack
|
||||||
|
support.* = support/libspa-support
|
||||||
|
#videotestsrc = videotestsrc/libspa-videotestsrc
|
||||||
|
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
|
||||||
|
}
|
||||||
|
|
||||||
|
context.modules = [
|
||||||
|
#{ name = <module-name>
|
||||||
|
# [ args = { <key> = <value> ... } ]
|
||||||
|
# [ flags = [ [ ifexists ] [ nofail ] ]
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# Loads a module with the given parameters.
|
||||||
|
# If ifexists is given, the module is ignored when it is not found.
|
||||||
|
# If nofail is given, module initialization failures are ignored.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Uses RTKit to boost the data thread priority.
|
||||||
|
{ name = libpipewire-module-rtkit
|
||||||
|
args = {
|
||||||
|
#nice.level = -11
|
||||||
|
#rt.prio = 88
|
||||||
|
#rt.time.soft = 2000000
|
||||||
|
#rt.time.hard = 2000000
|
||||||
|
}
|
||||||
|
flags = [ ifexists nofail ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set thread priorities without using RTKit.
|
||||||
|
#{ name = libpipewire-module-rt
|
||||||
|
# args = {
|
||||||
|
# nice.level = -11
|
||||||
|
# rt.prio = 88
|
||||||
|
# rt.time.soft = 2000000
|
||||||
|
# rt.time.hard = 2000000
|
||||||
|
# }
|
||||||
|
# flags = [ ifexists nofail ]
|
||||||
|
#}
|
||||||
|
|
||||||
|
# The native communication protocol.
|
||||||
|
{ name = libpipewire-module-protocol-native }
|
||||||
|
|
||||||
|
# The profile module. Allows application to access profiler
|
||||||
|
# and performance data. It provides an interface that is used
|
||||||
|
# by pw-top and pw-profiler.
|
||||||
|
{ name = libpipewire-module-profiler }
|
||||||
|
|
||||||
|
# Allows applications to create metadata objects. It creates
|
||||||
|
# a factory for Metadata objects.
|
||||||
|
{ name = libpipewire-module-metadata }
|
||||||
|
|
||||||
|
# Creates a factory for making devices that run in the
|
||||||
|
# context of the PipeWire server.
|
||||||
|
{ name = libpipewire-module-spa-device-factory }
|
||||||
|
|
||||||
|
# Creates a factory for making nodes that run in the
|
||||||
|
# context of the PipeWire server.
|
||||||
|
{ name = libpipewire-module-spa-node-factory }
|
||||||
|
|
||||||
|
# Allows creating nodes that run in the context of the
|
||||||
|
# client. Is used by all clients that want to provide
|
||||||
|
# data to PipeWire.
|
||||||
|
{ name = libpipewire-module-client-node }
|
||||||
|
|
||||||
|
# Allows creating devices that run in the context of the
|
||||||
|
# client. Is used by the session manager.
|
||||||
|
{ name = libpipewire-module-client-device }
|
||||||
|
|
||||||
|
# The portal module monitors the PID of the portal process
|
||||||
|
# and tags connections with the same PID as portal
|
||||||
|
# connections.
|
||||||
|
{ name = libpipewire-module-portal
|
||||||
|
flags = [ ifexists nofail ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# The access module can perform access checks and block
|
||||||
|
# new clients.
|
||||||
|
{ name = libpipewire-module-access
|
||||||
|
args = {
|
||||||
|
# access.allowed to list an array of paths of allowed
|
||||||
|
# apps.
|
||||||
|
#access.allowed = [
|
||||||
|
# /usr/bin/pipewire-media-session
|
||||||
|
#]
|
||||||
|
|
||||||
|
# An array of rejected paths.
|
||||||
|
#access.rejected = [ ]
|
||||||
|
|
||||||
|
# An array of paths with restricted access.
|
||||||
|
#access.restricted = [ ]
|
||||||
|
|
||||||
|
# Anything not in the above lists gets assigned the
|
||||||
|
# access.force permission.
|
||||||
|
#access.force = flatpak
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Makes a factory for wrapping nodes in an adapter with a
|
||||||
|
# converter and resampler.
|
||||||
|
{ name = libpipewire-module-adapter }
|
||||||
|
|
||||||
|
# Makes a factory for creating links between ports.
|
||||||
|
{ name = libpipewire-module-link-factory }
|
||||||
|
|
||||||
|
# Provides factories to make session manager objects.
|
||||||
|
{ name = libpipewire-module-session-manager }
|
||||||
|
]
|
||||||
|
|
||||||
|
context.objects = [
|
||||||
|
#{ factory = <factory-name>
|
||||||
|
# [ args = { <key> = <value> ... } ]
|
||||||
|
# [ flags = [ [ nofail ] ]
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# Creates an object from a PipeWire factory with the given parameters.
|
||||||
|
# If nofail is given, errors are ignored (and no object is created).
|
||||||
|
#
|
||||||
|
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
|
||||||
|
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
|
||||||
|
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
|
||||||
|
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
|
||||||
|
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } }
|
||||||
|
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
|
||||||
|
|
||||||
|
# A default dummy driver. This handles nodes marked with the "node.always-driver"
|
||||||
|
# property when no other driver is currently active. JACK clients need this.
|
||||||
|
{ factory = spa-node-factory
|
||||||
|
args = {
|
||||||
|
factory.name = support.node.driver
|
||||||
|
node.name = Dummy-Driver
|
||||||
|
node.group = pipewire.dummy
|
||||||
|
priority.driver = 20000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{ factory = spa-node-factory
|
||||||
|
args = {
|
||||||
|
factory.name = support.node.driver
|
||||||
|
node.name = Freewheel-Driver
|
||||||
|
priority.driver = 19000
|
||||||
|
node.group = pipewire.freewheel
|
||||||
|
node.freewheel = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# This creates a new Source node. It will have input ports
|
||||||
|
# that you can link, to provide audio for this source.
|
||||||
|
#{ factory = adapter
|
||||||
|
# args = {
|
||||||
|
# factory.name = support.null-audio-sink
|
||||||
|
# node.name = "my-mic"
|
||||||
|
# node.description = "Microphone"
|
||||||
|
# media.class = "Audio/Source/Virtual"
|
||||||
|
# audio.position = "FL,FR"
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
|
||||||
|
# This creates a single PCM source device for the given
|
||||||
|
# alsa device path hw:0. You can change source to sink
|
||||||
|
# to make a sink in the same way.
|
||||||
|
#{ factory = adapter
|
||||||
|
# args = {
|
||||||
|
# factory.name = api.alsa.pcm.source
|
||||||
|
# node.name = "alsa-source"
|
||||||
|
# node.description = "PCM Source"
|
||||||
|
# media.class = "Audio/Source"
|
||||||
|
# api.alsa.path = "hw:0"
|
||||||
|
# api.alsa.period-size = 1024
|
||||||
|
# api.alsa.headroom = 0
|
||||||
|
# api.alsa.disable-mmap = false
|
||||||
|
# api.alsa.disable-batch = false
|
||||||
|
# audio.format = "S16LE"
|
||||||
|
# audio.rate = 48000
|
||||||
|
# audio.channels = 2
|
||||||
|
# audio.position = "FL,FR"
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
]
|
||||||
|
|
||||||
|
context.exec = [
|
||||||
|
#{ path = <program-name> [ args = "<arguments>" ] }
|
||||||
|
#
|
||||||
|
# Execute the given program with arguments.
|
||||||
|
#
|
||||||
|
# You can optionally start the session manager here,
|
||||||
|
# but it is better to start it as a systemd service.
|
||||||
|
# Run the session manager with -h for options.
|
||||||
|
#
|
||||||
|
{ path = "/usr/bin/pipewire-media-session" args = "" }
|
||||||
|
#
|
||||||
|
# You can optionally start the pulseaudio-server here as well
|
||||||
|
# but it is better to start it as a systemd service.
|
||||||
|
# It can be interesting to start another daemon here that listens
|
||||||
|
# on another address with the -a option (eg. -a tcp:4713).
|
||||||
|
#
|
||||||
|
{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
|
||||||
|
]
|
||||||
@ -27,7 +27,8 @@ alias \
|
|||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi"
|
ccat="highlight --out-format=ansi" \
|
||||||
|
ip="ip -color=auto"
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
@ -45,6 +46,7 @@ alias \
|
|||||||
z="zathura"
|
z="zathura"
|
||||||
|
|
||||||
alias \
|
alias \
|
||||||
|
lf="lfub" \
|
||||||
magit="nvim -c MagitOnly" \
|
magit="nvim -c MagitOnly" \
|
||||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||||
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
|
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
|
||||||
|
|||||||
@ -148,7 +148,7 @@ if pacman -Qs libxft-bgra >/dev/null 2>&1; then
|
|||||||
else
|
else
|
||||||
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
|
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
|
||||||
Please run:
|
Please run:
|
||||||
\033[32mparu -S libxft-bgra-git\033[0m
|
\033[32myay -S libxft-bgra-git\033[0m
|
||||||
and replace \`libxft\`. Afterwards, you may start the graphical server by running \`startx\`."
|
and replace \`libxft\`. Afterwards, you may start the graphical server by running \`startx\`."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${HOME}/.cache/wal/colors.sh"
|
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||||
|
zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
||||||
|
|
||||||
mkdir -p "${HOME}/.config/dunst"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh"
|
||||||
mkdir -p "${HOME}/.config/zathura"
|
|
||||||
mv -n "${HOME}/.config/dunst/dunstrc" "${HOME}/.config/dunst/dunstrc.bak"
|
mkdir -p "${dunstconf%/*}" "${zathuraconf%/*}"
|
||||||
mv -n "${HOME}/.config/zathura/zathurarc" "${HOME}/.config/zathura/zathurarc.bak"
|
|
||||||
ln -sf "${HOME}/.cache/wal/dunstrc" "${HOME}/.config/dunst/dunstrc"
|
mv -n "$dunstconf" "$dunstconf.bak"
|
||||||
ln -sf "${HOME}/.cache/wal/zathurarc" "${HOME}/.config/zathura/zathurarc"
|
mv -n "$zathuraconf" "$zathuraconf.bak"
|
||||||
|
|
||||||
|
ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/dunstrc" "$dunstconf"
|
||||||
|
ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/zathurarc" "$zathuraconf"
|
||||||
|
|
||||||
fix_sequences() {
|
fix_sequences() {
|
||||||
e=$'\e'
|
e=$'\e'
|
||||||
@ -16,14 +20,13 @@ fix_sequences() {
|
|||||||
background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
|
background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
|
||||||
cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
|
cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
|
||||||
|
|
||||||
for term in /dev/pts/{0..9}*
|
for term in /dev/pts/{0..9}*; do
|
||||||
do
|
echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null
|
||||||
echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null
|
echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null
|
||||||
echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null
|
echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null
|
||||||
echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null
|
done
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_sequences <"${HOME}/.cache/wal/sequences"
|
fix_sequences <"${XDG_CACHE_HOME:-$HOME/.cache}/wal/sequences"
|
||||||
|
|
||||||
pkill dunst; dunst &
|
pkill dunst; setsid -f dunst
|
||||||
|
|||||||
@ -1,152 +1,27 @@
|
|||||||
[global]
|
[global]
|
||||||
monitor = 0
|
monitor = 0
|
||||||
follow = keyboard
|
follow = keyboard
|
||||||
geometry = "350x5-0+24"
|
width = 370
|
||||||
indicate_hidden = yes
|
height = 350
|
||||||
shrink = yes
|
offset = 0x19
|
||||||
transparency = 20
|
padding = 2
|
||||||
notification_height = 0
|
horizontal_padding = 2
|
||||||
separator_height = 2
|
transparency = 25
|
||||||
padding = 0
|
font = Monospace 12
|
||||||
horizontal_padding = 8
|
|
||||||
frame_width = 3
|
|
||||||
frame_color = "{color4}"
|
|
||||||
|
|
||||||
# Define a color for the separator.
|
|
||||||
# possible values are:
|
|
||||||
# * auto: dunst tries to find a color fitting to the background;
|
|
||||||
# * foreground: use the same color as the foreground;
|
|
||||||
# * frame: use the same color as the frame;
|
|
||||||
# * anything else will be interpreted as a X color.
|
|
||||||
separator_color = frame
|
|
||||||
|
|
||||||
# Sort messages by urgency.
|
|
||||||
sort = yes
|
|
||||||
|
|
||||||
idle_threshold = 120
|
|
||||||
font = Monospace 14
|
|
||||||
line_height = 0
|
|
||||||
markup = full
|
|
||||||
|
|
||||||
# The format of the message. Possible variables are:
|
|
||||||
# %a appname
|
|
||||||
# %s summary
|
|
||||||
# %b body
|
|
||||||
# %i iconname (including its path)
|
|
||||||
# %I iconname (without its path)
|
|
||||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
|
||||||
# %n progress value if set without any extra characters
|
|
||||||
# %% Literal %
|
|
||||||
# Markup is allowed
|
|
||||||
format = "<b>%s</b>\n%b"
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
alignment = left
|
|
||||||
show_age_threshold = 60
|
|
||||||
word_wrap = yes
|
|
||||||
ellipsize = middle
|
|
||||||
ignore_newline = no
|
|
||||||
stack_duplicates = true
|
|
||||||
hide_duplicate_count = true
|
|
||||||
show_indicators = yes
|
|
||||||
icon_position = left
|
|
||||||
max_icon_size = 40
|
|
||||||
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/
|
|
||||||
sticky_history = yes
|
|
||||||
history_length = 20
|
|
||||||
dmenu = /usr/bin/dmenu -p dunst:
|
|
||||||
browser = /usr/bin/firefox -new-tab
|
|
||||||
|
|
||||||
# Always run rule-defined scripts, even if the notification is suppressed
|
|
||||||
always_run_script = true
|
|
||||||
|
|
||||||
title = Dunst
|
|
||||||
class = Dunst
|
|
||||||
startup_notification = false
|
|
||||||
force_xinerama = false
|
|
||||||
[experimental]
|
|
||||||
per_monitor_dpi = false
|
|
||||||
|
|
||||||
[shortcuts]
|
|
||||||
close = ctrl+space
|
|
||||||
close_all = ctrl+shift+space
|
|
||||||
history = ctrl+grave
|
|
||||||
context = ctrl+shift+period
|
|
||||||
|
|
||||||
[urgency_low]
|
[urgency_low]
|
||||||
# IMPORTANT: colors have to be defined in quotation marks.
|
background = "{color0}" # color0
|
||||||
# Otherwise the "#" and following would be interpreted as a comment.
|
foreground = "{color8}" # color8
|
||||||
background = "{background}"
|
timeout = 3
|
||||||
foreground = "{foreground}"
|
|
||||||
timeout = 5
|
|
||||||
# Icon for notifications with low urgency, uncomment to enable
|
|
||||||
#icon = /path/to/icon
|
|
||||||
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
background = "{background}"
|
foreground = "{color15}" # color15
|
||||||
foreground = "{foreground}"
|
background = "{color4}" # color4
|
||||||
timeout = 5
|
timeout = 5
|
||||||
|
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "{background}"
|
background = "{color1}" # color1
|
||||||
foreground = "{foreground}"
|
foreground = "{color15}" # color15
|
||||||
frame_color = "#fabd2f"
|
frame_color = "{color11}" # color11
|
||||||
timeout = 0
|
timeout = 10
|
||||||
|
|
||||||
# Every section that isn't one of the above is interpreted as a rules to
|
|
||||||
# override settings for certain messages.
|
|
||||||
# Messages can be matched by "appname", "summary", "body", "icon", "category",
|
|
||||||
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
|
|
||||||
# "background", "new_icon" and "format".
|
|
||||||
# Shell-like globbing will get expanded.
|
|
||||||
#
|
|
||||||
# SCRIPTING
|
|
||||||
# You can specify a script that gets run when the rule matches by
|
|
||||||
# setting the "script" option.
|
|
||||||
# The script will be called as follows:
|
|
||||||
# script appname summary body icon urgency
|
|
||||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
|
||||||
#
|
|
||||||
# NOTE: if you don't want a notification to be displayed, set the format
|
|
||||||
# to "".
|
|
||||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
|
||||||
# to find fitting options for rules.
|
|
||||||
|
|
||||||
#[espeak]
|
|
||||||
# summary = "*"
|
|
||||||
# script = dunst_espeak.sh
|
|
||||||
|
|
||||||
#[script-test]
|
|
||||||
# summary = "*script*"
|
|
||||||
# script = dunst_test.sh
|
|
||||||
|
|
||||||
#[ignore]
|
|
||||||
# # This notification will not be displayed
|
|
||||||
# summary = "foobar"
|
|
||||||
# format = ""
|
|
||||||
|
|
||||||
#[history-ignore]
|
|
||||||
# # This notification will not be saved in history
|
|
||||||
# summary = "foobar"
|
|
||||||
# history_ignore = yes
|
|
||||||
|
|
||||||
#[signed_on]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = "*signed on*"
|
|
||||||
# urgency = low
|
|
||||||
#
|
|
||||||
#[signed_off]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *signed off*
|
|
||||||
# urgency = low
|
|
||||||
#
|
|
||||||
#[says]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *says*
|
|
||||||
# urgency = critical
|
|
||||||
#
|
|
||||||
#[twitter]
|
|
||||||
# appname = Pidgin
|
|
||||||
# summary = *twitter.com*
|
|
||||||
# urgency = normal
|
|
||||||
#
|
|
||||||
# vim: ft=cfg
|
|
||||||
|
|||||||
@ -3,18 +3,16 @@
|
|||||||
# This file runs when a DM logs you into a graphical session.
|
# This file runs when a DM logs you into a graphical session.
|
||||||
# If you use startx/xinit like a Chad, this file will also be sourced.
|
# If you use startx/xinit like a Chad, this file will also be sourced.
|
||||||
|
|
||||||
|
xrandr --dpi 96 # Set DPI. User may want to use a larger number for larger screens.
|
||||||
setbg & # set the background with the `setbg` script
|
setbg & # set the background with the `setbg` script
|
||||||
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup
|
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
|
||||||
mpd & # music player daemon-you might prefer it as a service though
|
|
||||||
remaps & # run the remaps script, switching caps/esc and more; check it for more info
|
remaps & # run the remaps script, switching caps/esc and more; check it for more info
|
||||||
xcompmgr & # xcompmgr for transparency
|
|
||||||
dunst & # dunst for notifications
|
|
||||||
xset r rate 300 50 & # Speed xrate up
|
|
||||||
unclutter & # Remove mouse when idle
|
|
||||||
|
|
||||||
# This line autostarts an instance of Pulseaudio that does not exit on idle.
|
autostart="mpd xcompmgr dunst unclutter pipewire"
|
||||||
# This is "necessary" on Artix due to a current bug between PA and
|
|
||||||
# Chromium-based browsers where they fail to start PA and use dummy output.
|
for program in $autostart; do
|
||||||
pidof -s runit &&
|
pidof -s "$program" || setsid -f "$program"
|
||||||
! pidof -s pulseaudio >/dev/null 2>&1 &&
|
done >/dev/null 2>&1
|
||||||
setsid -f pulseaudio --start --exit-idle-time=-1 >/dev/null 2>&1
|
|
||||||
|
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||||
|
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
||||||
|
|||||||
1
.gtkrc-2.0
Symbolic link
1
.gtkrc-2.0
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.config/gtk-2.0/gtkrc-2.0
|
||||||
@ -37,7 +37,7 @@ case "$ext" in
|
|||||||
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;;
|
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;;
|
||||||
m) octave "$file" ;;
|
m) octave "$file" ;;
|
||||||
md) if [ -x "$(command -v lowdown)" ]; then
|
md) if [ -x "$(command -v lowdown)" ]; then
|
||||||
lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf
|
lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf
|
||||||
elif [ -x "$(command -v groffdown)" ]; then
|
elif [ -x "$(command -v groffdown)" ]; then
|
||||||
groffdown -i "$file" | groff > "$base.pdf"
|
groffdown -i "$file" | groff > "$base.pdf"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/usr/bin/notify-send "📰 Updating RSS feeds..."
|
/usr/bin/notify-send "📰 Updating RSS feeds..."
|
||||||
|
|
||||||
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit
|
||||||
|
|
||||||
echo 🔃 > /tmp/newsupdate
|
echo 🔃 > /tmp/newsupdate
|
||||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
||||||
|
|
||||||
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in
|
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in
|
||||||
"copy url") echo "$feed" | xclip -selection clipboard ;;
|
"Copy URL") echo "$feed" | xclip -selection clipboard ;;
|
||||||
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
||||||
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
|
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
|
||||||
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# A general, all-purpose extraction script. Not all extraction programs here
|
|
||||||
# are installed by LARBS automatically.
|
|
||||||
#
|
|
||||||
# Default behavior: Extract archive into new directory
|
|
||||||
# Behavior with `-c` option: Extract contents into current directory
|
|
||||||
|
|
||||||
while getopts "hc" o; do case "${o}" in
|
|
||||||
c) extracthere="True" ;;
|
|
||||||
*) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;;
|
|
||||||
esac done
|
|
||||||
|
|
||||||
if [ -z "$extracthere" ]; then
|
|
||||||
archive="$(readlink -f "$*")" &&
|
|
||||||
directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" &&
|
|
||||||
mkdir -p "$directory" &&
|
|
||||||
cd "$directory" || exit 1
|
|
||||||
else
|
|
||||||
archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1
|
|
||||||
|
|
||||||
if [ -f "$archive" ] ; then
|
|
||||||
case "$archive" in
|
|
||||||
*.tar.bz2|*.tbz2) bsdtar -xf "$archive" ;;
|
|
||||||
*.tar.xz) bsdtar -xf "$archive" ;;
|
|
||||||
*.tar.gz|*.tgz) bsdtar -xf "$archive" ;;
|
|
||||||
*.tar.zst) bsdtar -xf "$archive" ;;
|
|
||||||
*.tar) bsdtar -xf "$archive" ;;
|
|
||||||
*.lzma) unlzma "$archive" ;;
|
|
||||||
*.bz2) bunzip2 "$archive" ;;
|
|
||||||
*.rar) unrar x -ad "$archive" ;;
|
|
||||||
*.gz) gunzip "$archive" ;;
|
|
||||||
*.zip) unzip "$archive" ;;
|
|
||||||
*.Z) uncompress "$archive" ;;
|
|
||||||
*.7z) 7z x "$archive" ;;
|
|
||||||
*.xz) unxz "$archive" ;;
|
|
||||||
*.exe) cabextract "$archive" ;;
|
|
||||||
*) printf "extract: '%s' - unknown archive method\\n" "$archive" ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
printf "File \"%s\" not found.\\n" "$archive"
|
|
||||||
fi
|
|
||||||
@ -5,9 +5,8 @@
|
|||||||
# it informs the user that they need that command to continue. This is used in
|
# it informs the user that they need that command to continue. This is used in
|
||||||
# various other scripts for clarity's sake.
|
# various other scripts for clarity's sake.
|
||||||
|
|
||||||
for x in "$@";do
|
for x in "$@"; do
|
||||||
notify() { notify-send "📦 $x" "must be installed for this function." && exit 1 ;}
|
if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then
|
||||||
which_out="$( /usr/bin/which "$x" >/dev/null 2>&1 )" && exit 0 #you might have compiled the prog, and not install the repo pkg...
|
notify-send "📦 $x" "must be installed for this function." && exit 1 ;
|
||||||
pkgname="$(pacman -Qqo "$which_out" >/dev/null 2>&1 )" #...thats why two variables.
|
fi
|
||||||
pacman -Qq "$pkgname" >/dev/null 2>&1 || notify
|
|
||||||
done
|
done
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Reads file names from stdin and selects them in lf.
|
|
||||||
|
|
||||||
while read -r file; do
|
|
||||||
[ -z "$file" ] && continue
|
|
||||||
lf -remote "send select \"$file\""
|
|
||||||
lf -remote "send toggle"
|
|
||||||
done
|
|
||||||
24
.local/bin/lfub
Executable file
24
.local/bin/lfub
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This is a wrapper script for lb that allows it to create image previews with
|
||||||
|
# ueberzug. This works in concert with the lf configuration file and the
|
||||||
|
# lf-cleaner script.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
exec 3>&-
|
||||||
|
rm "$FIFO_UEBERZUG"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
|
lf "$@"
|
||||||
|
else
|
||||||
|
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||||
|
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
|
||||||
|
mkfifo "$FIFO_UEBERZUG"
|
||||||
|
ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
|
||||||
|
exec 3>"$FIFO_UEBERZUG"
|
||||||
|
trap cleanup HUP INT QUIT TERM PWR EXIT
|
||||||
|
lf "$@" 3>&-
|
||||||
|
fi
|
||||||
@ -4,7 +4,7 @@
|
|||||||
# usually the pdf of a compiled document. I find this useful especially
|
# usually the pdf of a compiled document. I find this useful especially
|
||||||
# running from vim.
|
# running from vim.
|
||||||
|
|
||||||
basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')"
|
basename="${1%.*}"
|
||||||
|
|
||||||
case "${*}" in
|
case "${*}" in
|
||||||
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;
|
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;
|
||||||
|
|||||||
53
.local/bin/otp
Executable file
53
.local/bin/otp
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get a one-time password, or add a OTP secret to your pass-otp store.
|
||||||
|
|
||||||
|
# The assumption of this script is that all otp passwords are stored with the
|
||||||
|
# suffix `-otp`. This script automatically appends newly added otps as such.
|
||||||
|
|
||||||
|
# For OTP passwords to be generated properly, it is important for the local
|
||||||
|
# computer to have its time properly synced. This can be done with the command
|
||||||
|
# below which requires the package `ntp`.
|
||||||
|
|
||||||
|
ifinstalled pass pass-otp
|
||||||
|
|
||||||
|
dir="${PASSWORD_STORE_DIR}"
|
||||||
|
|
||||||
|
choice="$({ echo "🆕add" ; echo "🕙sync-time" ; ls ${dir}/*-otp.gpg ;} | sed "s/.*\///;s/-otp.gpg//" | dmenu -p "Pick a 2FA:")"
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
🆕add )
|
||||||
|
ifinstalled maim zbar xclip || exit 1
|
||||||
|
|
||||||
|
temp="$dir/temp.png"
|
||||||
|
otp="otp-test-script"
|
||||||
|
trap 'shred -fu $temp; pass rm $otp' HUP INT QUIT TERM PWR EXIT
|
||||||
|
|
||||||
|
notify-send "Scan the image." "Scan the OTP QR code."
|
||||||
|
|
||||||
|
maim -s "$temp" || exit 1
|
||||||
|
info="$(zbarimg -q "$temp")"
|
||||||
|
info="${info#QR-Code:}"
|
||||||
|
issuer="$(echo "$info" | grep -o "issuer=[A-z0-9]\+")"
|
||||||
|
name="${issuer#issuer=}"
|
||||||
|
|
||||||
|
if echo "$info" | pass otp insert "$otp"; then
|
||||||
|
while true ; do
|
||||||
|
export name="$(dmenu -p "Give this One Time Password a one-word name:")"
|
||||||
|
echo "$name" | grep -q -- "^[A-z0-9-]\+$" && break
|
||||||
|
done
|
||||||
|
pass mv "$otp" "$name-otp"
|
||||||
|
notify-send "Successfully added." "$name-otp has been created."
|
||||||
|
else
|
||||||
|
notify-send "No OTP data found." "Try to scan the image again more precisely."
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
🕙sync-time )
|
||||||
|
ifinstalled ntp || exit 1
|
||||||
|
notify-send -u low "🕙 Synchronizing Time..." "Synching time with remote NTP servers..."
|
||||||
|
updatedata="$(sudo ntpdate pool.ntp.org)" &&
|
||||||
|
notify-send -u low "🕙 Synchronizing Time..." "Done. Time changed by ${updatedata#*offset }"
|
||||||
|
;;
|
||||||
|
*) pass otp -c ${choice}-otp ;;
|
||||||
|
esac
|
||||||
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
# Open a terminal window in the same directory as the currently active window.
|
# Open a terminal window in the same directory as the currently active window.
|
||||||
|
|
||||||
PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3)
|
PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p")
|
||||||
PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')"
|
PID="$(pstree -lpA "$PID")"
|
||||||
|
PID="${PID##*(}"
|
||||||
|
PID="${PID%)}"
|
||||||
cd "$(readlink /proc/"$PID"/cwd)" || return 1
|
cd "$(readlink /proc/"$PID"/cwd)" || return 1
|
||||||
"$TERMINAL"
|
"$TERMINAL"
|
||||||
|
|||||||
@ -7,7 +7,11 @@
|
|||||||
# If wal is installed, also generates a colorscheme.
|
# If wal is installed, also generates a colorscheme.
|
||||||
|
|
||||||
# Location of link to wallpaper link.
|
# Location of link to wallpaper link.
|
||||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
|
bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
|
||||||
|
|
||||||
|
# Configuration files of applications that have their themes changed by pywal.
|
||||||
|
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||||
|
zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
||||||
|
|
||||||
trueloc="$(readlink -f "$1")" &&
|
trueloc="$(readlink -f "$1")" &&
|
||||||
case "$(file --mime-type -b "$trueloc")" in
|
case "$(file --mime-type -b "$trueloc")" in
|
||||||
@ -18,12 +22,12 @@ esac
|
|||||||
|
|
||||||
# If pywal is installed, use it.
|
# If pywal is installed, use it.
|
||||||
if command -v wal >/dev/null 2>&1 ; then
|
if command -v wal >/dev/null 2>&1 ; then
|
||||||
wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||||
pidof dwm >/dev/null && xdotool key super+F12
|
pidof dwm >/dev/null && xdotool key super+F12
|
||||||
# If pywal is removed, return config files to normal.
|
# If pywal is removed, return config files to normal.
|
||||||
else
|
else
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
[ -f "$dunstconf.bak" ] && unlink "$dunstconf" && mv "$dunstconf.bak" "$dunstconf"
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
[ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xwallpaper --zoom "$bgloc"
|
xwallpaper --zoom "$bgloc"
|
||||||
|
|||||||
@ -7,13 +7,14 @@ bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
|
|||||||
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
||||||
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
||||||
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
|
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
|
||||||
|
vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim"
|
||||||
ranger_shortcuts="/dev/null"
|
ranger_shortcuts="/dev/null"
|
||||||
qute_shortcuts="/dev/null"
|
qute_shortcuts="/dev/null"
|
||||||
fish_shortcuts="/dev/null"
|
fish_shortcuts="/dev/null"
|
||||||
vifm_shortcuts="/dev/null"
|
vifm_shortcuts="/dev/null"
|
||||||
|
|
||||||
# Remove, prepare files
|
# Remove, prepare files
|
||||||
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" 2>/dev/null
|
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
|
||||||
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
|
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
|
||||||
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
|
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
|
||||||
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
||||||
@ -27,7 +28,8 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
|||||||
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
|
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
|
||||||
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
|
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
|
||||||
printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
|
printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
|
||||||
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
|
||||||
|
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
|
||||||
|
|
||||||
# Format the `files` file in the correct syntax and sent it to both configs.
|
# Format the `files` file in the correct syntax and sent it to both configs.
|
||||||
eval "echo \"$(cat "$bmfiles")\"" | \
|
eval "echo \"$(cat "$bmfiles")\"" | \
|
||||||
@ -37,4 +39,5 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
|||||||
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
||||||
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
|
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
|
||||||
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
|
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
|
||||||
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
|
||||||
|
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
|
||||||
|
|||||||
@ -1,194 +1,248 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Show a Doppler RADAR of an American user's preferred location.
|
# Show a Doppler RADAR of a user's preferred location.
|
||||||
|
|
||||||
secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
|
secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
|
||||||
radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
|
radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
|
||||||
doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
|
doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
|
||||||
|
|
||||||
pickloc() { chosen="$(echo "Northeast
|
pickloc() { chosen="$(echo "US: Northeast
|
||||||
Southeast
|
US: Southeast
|
||||||
PacNorthWest
|
US: PacNorthWest
|
||||||
PacSouthWest
|
US: PacSouthWest
|
||||||
UpperMissVly
|
US: UpperMissVly
|
||||||
SouthMissVly
|
US: SouthMissVly
|
||||||
SouthPlains
|
US: SouthPlains
|
||||||
NorthRockies
|
US: NorthRockies
|
||||||
SouthRockies
|
US: SouthRockies
|
||||||
Alaska
|
US: Alaska
|
||||||
Carib
|
US: Carib
|
||||||
Hawaii
|
US: Hawaii
|
||||||
CentGrLakes
|
US: CentGrLakes
|
||||||
Conus-Large
|
US: Conus-Large
|
||||||
KABR: Aberdeen, SD
|
US: KABR: Aberdeen, SD
|
||||||
KBIS: Bismarck, ND
|
US: KBIS: Bismarck, ND
|
||||||
KFTG: Denver/Boulder, CO
|
US: KFTG: Denver/Boulder, CO
|
||||||
KDMX: Des Moines, IA
|
US: KDMX: Des Moines, IA
|
||||||
KDTX: Detroit, MI
|
US: KDTX: Detroit, MI
|
||||||
KDDC: Dodge City, KS
|
US: KDDC: Dodge City, KS
|
||||||
KDLH: Duluth, MN
|
US: KDLH: Duluth, MN
|
||||||
KCYS: Cheyenne, WY
|
US: KCYS: Cheyenne, WY
|
||||||
KLOT: Chicago, IL
|
US: KLOT: Chicago, IL
|
||||||
KGLD: Goodland, KS
|
US: KGLD: Goodland, KS
|
||||||
KUEX: Hastings, NE
|
US: KUEX: Hastings, NE
|
||||||
KGJX: Grand Junction, CO
|
US: KGJX: Grand Junction, CO
|
||||||
KGRR: Grand Rapids, MI
|
US: KGRR: Grand Rapids, MI
|
||||||
KMVX: Fargo/Grand Forks, ND
|
US: KMVX: Fargo/Grand Forks, ND
|
||||||
KGRB: Green Bay, WI
|
US: KGRB: Green Bay, WI
|
||||||
KIND: Indianapolis, IN
|
US: KIND: Indianapolis, IN
|
||||||
KJKL: Jackson, KY
|
US: KJKL: Jackson, KY
|
||||||
KARX: La Crosse, WI
|
US: KARX: La Crosse, WI
|
||||||
KILX: Lincoln/Central Illinois, IL
|
US: KILX: Lincoln/Central Illinois, IL
|
||||||
KLVX: Louisville, KY
|
US: KLVX: Louisville, KY
|
||||||
KMQT: Marquette
|
US: KMQT: Marquette
|
||||||
KMKX: Milwaukee, WI
|
US: KMKX: Milwaukee, WI
|
||||||
KMPX: Minneapolis, MN
|
US: KMPX: Minneapolis, MN
|
||||||
KAPX: Gaylord/Alpena, MI
|
US: KAPX: Gaylord/Alpena, MI
|
||||||
KLNX: North Platte, NE
|
US: KLNX: North Platte, NE
|
||||||
KIWX: N. Webster/Northern, IN
|
US: KIWX: N. Webster/Northern, IN
|
||||||
KOAX: Omaha, NE
|
US: KOAX: Omaha, NE
|
||||||
KPAH: Paducah, KY
|
US: KPAH: Paducah, KY
|
||||||
KEAX: Pleasant Hill, MO
|
US: KEAX: Pleasant Hill, MO
|
||||||
KPUX: Pueblo, CO
|
US: KPUX: Pueblo, CO
|
||||||
KDVN: Quad Cities, IA
|
US: KDVN: Quad Cities, IA
|
||||||
KUDX: Rapid City, SD
|
US: KUDX: Rapid City, SD
|
||||||
KRIW: Riverton, WY
|
US: KRIW: Riverton, WY
|
||||||
KSGF: Springfield, MO
|
US: KSGF: Springfield, MO
|
||||||
KLSX: St. LOUIS, MO
|
US: KLSX: St. LOUIS, MO
|
||||||
KFSD: Sioux Falls, IA
|
US: KFSD: Sioux Falls, IA
|
||||||
KTWX: Topeka, KS
|
US: KTWX: Topeka, KS
|
||||||
KICT: Wichita, KS
|
US: KICT: Wichita, KS
|
||||||
KVWX: Paducah, KY
|
US: KVWX: Paducah, KY
|
||||||
ICAO: Responsible Wfo
|
US: ICAO: Responsible Wfo
|
||||||
KLTX: WILMINGTON, NC
|
US: KLTX: WILMINGTON, NC
|
||||||
KCCX: State College/Central, PA
|
US: KCCX: State College/Central, PA
|
||||||
KLWX: Sterling, VA
|
US: KLWX: Sterling, VA
|
||||||
KFCX: Blacksburg/Roanoke, VA
|
US: KFCX: Blacksburg/Roanoke, VA
|
||||||
KRAX: Raleigh/Durham, NC
|
US: KRAX: Raleigh/Durham, NC
|
||||||
KGYX: Portland, ME
|
US: KGYX: Portland, ME
|
||||||
KDIX: Mt Holly/Philadelphia, PA
|
US: KDIX: Mt Holly/Philadelphia, PA
|
||||||
KPBZ: Pittsburgh, PA
|
US: KPBZ: Pittsburgh, PA
|
||||||
KAKQ: Wakefield, VA
|
US: KAKQ: Wakefield, VA
|
||||||
KMHX: Morehead City, NC
|
US: KMHX: Morehead City, NC
|
||||||
KGSP: Greer/Greenville/Sprtbg, SC
|
US: KGSP: Greer/Greenville/Sprtbg, SC
|
||||||
KILN: Wilmington/Cincinnati, OH
|
US: KILN: Wilmington/Cincinnati, OH
|
||||||
KCLE: Cleveland, OH
|
US: KCLE: Cleveland, OH
|
||||||
KCAE: Columbia, SC
|
US: KCAE: Columbia, SC
|
||||||
KBGM: Binghamton, NY
|
US: KBGM: Binghamton, NY
|
||||||
KENX: Albany, NY
|
US: KENX: Albany, NY
|
||||||
KBUF: Buffalo, NY
|
US: KBUF: Buffalo, NY
|
||||||
KCXX: Burlington, VT
|
US: KCXX: Burlington, VT
|
||||||
KCBW: Caribou, ME
|
US: KCBW: Caribou, ME
|
||||||
KBOX: Boston /Taunton, MA
|
US: KBOX: Boston /Taunton, MA
|
||||||
KOKX: New York City, NY
|
US: KOKX: New York City, NY
|
||||||
KCLX: Charleston, SC
|
US: KCLX: Charleston, SC
|
||||||
KRLX: Charleston, WV
|
US: KRLX: Charleston, WV
|
||||||
ICAO: Responsible WFO
|
US: ICAO: Responsible WFO
|
||||||
KBRO: Brownsville, TX
|
US: KBRO: Brownsville, TX
|
||||||
KABX: Albuquerque, NM
|
US: KABX: Albuquerque, NM
|
||||||
KAMA: Amarillo, TX
|
US: KAMA: Amarillo, TX
|
||||||
KFFC: Peachtree City/Atlanta, GA
|
US: KFFC: Peachtree City/Atlanta, GA
|
||||||
KEWX: Austin/Sanantonio, TX
|
US: KEWX: Austin/Sanantonio, TX
|
||||||
KBMX: Birmingham, AL
|
US: KBMX: Birmingham, AL
|
||||||
KCRP: Corpus Christi, TX
|
US: KCRP: Corpus Christi, TX
|
||||||
KFWS: Dallas / Ft. Worth, TX
|
US: KFWS: Dallas / Ft. Worth, TX
|
||||||
KEPZ: El Paso, TX
|
US: KEPZ: El Paso, TX
|
||||||
KHGX: Houston/ Galveston, TX
|
US: KHGX: Houston/ Galveston, TX
|
||||||
KJAX: Jacksonville, FL
|
US: KJAX: Jacksonville, FL
|
||||||
KBYX: Key West, FL
|
US: KBYX: Key West, FL
|
||||||
KMRX: Morristown/knoxville, TN
|
US: KMRX: Morristown/knoxville, TN
|
||||||
KLBB: Lubbock, TX
|
US: KLBB: Lubbock, TX
|
||||||
KLZK: Little Rock, AR
|
US: KLZK: Little Rock, AR
|
||||||
KLCH: Lake Charles, LA
|
US: KLCH: Lake Charles, LA
|
||||||
KOHX: Nashville, TN
|
US: KOHX: Nashville, TN
|
||||||
KMLB: Melbourne, FL
|
US: KMLB: Melbourne, FL
|
||||||
KNQA: Memphis, TN
|
US: KNQA: Memphis, TN
|
||||||
KAMX: Miami, FL
|
US: KAMX: Miami, FL
|
||||||
KMAF: Midland/odessa, TX
|
US: KMAF: Midland/odessa, TX
|
||||||
KTLX: Norman, OK
|
US: KTLX: Norman, OK
|
||||||
KHTX: Huntsville, AL
|
US: KHTX: Huntsville, AL
|
||||||
KMOB: Mobile, AL
|
US: KMOB: Mobile, AL
|
||||||
KTLH: Tallahassee, FL
|
US: KTLH: Tallahassee, FL
|
||||||
KTBW: Tampa Bay Area, FL
|
US: KTBW: Tampa Bay Area, FL
|
||||||
KSJT: San Angelo, TX
|
US: KSJT: San Angelo, TX
|
||||||
KINX: Tulsa, OK
|
US: KINX: Tulsa, OK
|
||||||
KSRX: Tulsa, OK
|
US: KSRX: Tulsa, OK
|
||||||
KLIX: New Orleans/slidell, LA
|
US: KLIX: New Orleans/slidell, LA
|
||||||
KDGX: Jackson, MS
|
US: KDGX: Jackson, MS
|
||||||
KSHV: Shreveport, LA
|
US: KSHV: Shreveport, LA
|
||||||
ICAO: Responsible WFO
|
US: ICAO: Responsible WFO
|
||||||
KLGX: Seattle / Tacoma, WA
|
US: KLGX: Seattle / Tacoma, WA
|
||||||
KOTX: Spokane, WA
|
US: KOTX: Spokane, WA
|
||||||
KEMX: Tucson, AZ
|
US: KEMX: Tucson, AZ
|
||||||
KYUX: Phoenix, AZ
|
US: KYUX: Phoenix, AZ
|
||||||
KNKX: San Diego, CA
|
US: KNKX: San Diego, CA
|
||||||
KMUX: Monterey/san Francisco, CA
|
US: KMUX: Monterey/san Francisco, CA
|
||||||
KHNX: San Joaquin/hanford, CA
|
US: KHNX: San Joaquin/hanford, CA
|
||||||
KSOX: San Diego, CA
|
US: KSOX: San Diego, CA
|
||||||
KATX: Seattle / Tacoma, WA
|
US: KATX: Seattle / Tacoma, WA
|
||||||
KIWA: Phoenix, AZ
|
US: KIWA: Phoenix, AZ
|
||||||
KRTX: Portland, OR
|
US: KRTX: Portland, OR
|
||||||
KSFX: Pocatello, ID
|
US: KSFX: Pocatello, ID
|
||||||
KRGX: Reno, NV
|
US: KRGX: Reno, NV
|
||||||
KDAX: Sacramento, CA
|
US: KDAX: Sacramento, CA
|
||||||
KMTX: Salt Lake City, UT
|
US: KMTX: Salt Lake City, UT
|
||||||
KPDT: Pendleton, OR
|
US: KPDT: Pendleton, OR
|
||||||
KMSX: Missoula, MT
|
US: KMSX: Missoula, MT
|
||||||
KESX: Las Vegas, NV
|
US: KESX: Las Vegas, NV
|
||||||
KVTX: Los Angeles, CA
|
US: KVTX: Los Angeles, CA
|
||||||
KMAX: Medford, OR
|
US: KMAX: Medford, OR
|
||||||
KFSX: Flagstaff, AZ
|
US: KFSX: Flagstaff, AZ
|
||||||
KGGW: Glasgow, MT
|
US: KGGW: Glasgow, MT
|
||||||
KLRX: Elko, NV
|
US: KLRX: Elko, NV
|
||||||
KBHX: Eureka, CA
|
US: KBHX: Eureka, CA
|
||||||
KTFX: Great Falls, MT
|
US: KTFX: Great Falls, MT
|
||||||
KCBX: Boise, ID
|
US: KCBX: Boise, ID
|
||||||
KBLX: Billings, MT
|
US: KBLX: Billings, MT
|
||||||
KICX: Salt Lake City, UT
|
US: KICX: Salt Lake City, UT
|
||||||
ICAO: Responsible Wfo W/ MSCF
|
US: ICAO: Responsible Wfo W/ MSCF
|
||||||
PABC: Anchorage, AK
|
US: PABC: Anchorage, AK
|
||||||
PAPD: Fairbanks, AK
|
US: PAPD: Fairbanks, AK
|
||||||
PHKM: Honolulu, HI
|
US: PHKM: Honolulu, HI
|
||||||
PAHG: Anchorage, AK
|
US: PAHG: Anchorage, AK
|
||||||
PAKC: Anchorage, AK
|
US: PAKC: Anchorage, AK
|
||||||
PAIH: Anchorage, AK
|
US: PAIH: Anchorage, AK
|
||||||
PHMO: Honolulu, HI
|
US: PHMO: Honolulu, HI
|
||||||
PAEC: Fairbanks, AK
|
US: PAEC: Fairbanks, AK
|
||||||
TJUA: San Juan, PR
|
US: TJUA: San Juan, PR
|
||||||
PACG: Juneau, AK
|
US: PACG: Juneau, AK
|
||||||
PHKI: Honolulu, HI
|
US: PHKI: Honolulu, HI
|
||||||
PHWA: Honolulu, HI
|
US: PHWA: Honolulu, HI
|
||||||
ICAO: Responsible Wfo W/ MSCF
|
US: ICAO: Responsible Wfo W/ MSCF
|
||||||
KFDR: Norman, OK
|
US: KFDR: Norman, OK
|
||||||
PGUA: Guam
|
US: PGUA: Guam
|
||||||
KBBX: Sacramento, CA
|
US: KBBX: Sacramento, CA
|
||||||
KFDX: Albuquerque, NM
|
US: KFDX: Albuquerque, NM
|
||||||
KGWX: Jackson, MS
|
US: KGWX: Jackson, MS
|
||||||
KDOX: Wakefield, VA
|
US: KDOX: Wakefield, VA
|
||||||
KDYX: San Angelo, TX
|
US: KDYX: San Angelo, TX
|
||||||
KEYX: Las Vegas, NV
|
US: KEYX: Las Vegas, NV
|
||||||
KEVX: Mobile, AL
|
US: KEVX: Mobile, AL
|
||||||
KHPX: Paducah, KY
|
US: KHPX: Paducah, KY
|
||||||
KTYX: Burlington, VT
|
US: KTYX: Burlington, VT
|
||||||
KGRK: Dallas / Ft. Worth, TX
|
US: KGRK: Dallas / Ft. Worth, TX
|
||||||
KPOE: Lake Charles, LA
|
US: KPOE: Lake Charles, LA
|
||||||
KEOX: Tallahassee, FL
|
US: KEOX: Tallahassee, FL
|
||||||
KHDX: El Paso, TX
|
US: KHDX: El Paso, TX
|
||||||
KDFX: San Antonio, TX
|
US: KDFX: San Antonio, TX
|
||||||
KMXX: Birmingham, AL
|
US: KMXX: Birmingham, AL
|
||||||
KMBX: Bismarck, ND
|
US: KMBX: Bismarck, ND
|
||||||
KVAX: Jacksonville, FL
|
US: KVAX: Jacksonville, FL
|
||||||
KJGX: Peachtree City/atlanta, GA
|
US: KJGX: Peachtree City/atlanta, GA
|
||||||
KVNX: Norman, OK
|
US: KVNX: Norman, OK
|
||||||
KVBX: Vandenberg Afb: Orcutt, CA" | dmenu -r -i -l 50 -p "Select a National Weather Service radar to use as default:" | sed "s/:.*//" | tr "[:lower:]" "[:upper:]")"
|
US: KVBX: Vandenberg Afb: Orcutt, CA
|
||||||
|
EU: Europe
|
||||||
|
EU: GB: Great Brittain
|
||||||
|
EU: SCAN: Scandinavia
|
||||||
|
EU: ALPS: The Alps
|
||||||
|
EU: NL: The Netherlands
|
||||||
|
EU: DE: Germany
|
||||||
|
EU: SP: Spain
|
||||||
|
EU: FR: France
|
||||||
|
EU: IT: Italy
|
||||||
|
EU: PL: Poland
|
||||||
|
EU: GR: Greece
|
||||||
|
EU: TU: Turkey
|
||||||
|
EU: RU: Russia
|
||||||
|
EU: BA: Bahrain
|
||||||
|
EU: BC: Botswana
|
||||||
|
EU: SE: Republic of Seychelles
|
||||||
|
EU: HU: Hungary
|
||||||
|
EU: UK: Ukraine
|
||||||
|
AF: AF: Africa
|
||||||
|
AF: WA: West Africa
|
||||||
|
AF: ZA: South Africa
|
||||||
|
AF: DZ: Algeria
|
||||||
|
AF: CE: Canary Islands
|
||||||
|
AF: NG: Nigeria
|
||||||
|
AF: TD: Chad
|
||||||
|
AF: CG: Democratic Republic of Congo
|
||||||
|
AF: EG: Egypt
|
||||||
|
AF: ET: Ethiopia
|
||||||
|
AF: CM: Cameroon
|
||||||
|
AF: IS: Israel
|
||||||
|
AF: LY: Libya
|
||||||
|
AF: MG: Madagascar
|
||||||
|
AF: MO: Morocco
|
||||||
|
AF: BW: Namibia
|
||||||
|
AF: SA: Saudi Arabia
|
||||||
|
AF: SO: Somalia
|
||||||
|
AF: SD: Sudan
|
||||||
|
AF: TZ: Tanzania
|
||||||
|
AF: TN: Tunisia
|
||||||
|
AF: ZM: Zambia
|
||||||
|
AF: KE: Kenya
|
||||||
|
AF: AO: Angola" | dmenu -r -i -l 50 -p "Select a radar to use as default:" | tr "[:lower:]" "[:upper:]")"
|
||||||
|
|
||||||
|
# Set continent code and radar code.
|
||||||
|
continentcode=$(echo "$chosen" | sed "s/:.*//")
|
||||||
|
radarcode=$(echo "$chosen" | sed "s/..: // ; s/:.*//")
|
||||||
|
|
||||||
# Sanity check of selection and ensure user did not escape.
|
# Sanity check of selection and ensure user did not escape.
|
||||||
echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;}
|
echo "$radarcode" | grep -q "^[A-Z]\+$" && printf "%s,%s\\n" "$continentcode" "$radarcode" > "$radarloc" ;}
|
||||||
|
|
||||||
getdoppler() {
|
getdoppler() {
|
||||||
loc="$(cat "$radarloc")"
|
cont="$(sed "s/,.*//" "$radarloc")"
|
||||||
|
loc="$(cut -c 4- "$radarloc")"
|
||||||
notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
|
notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
|
||||||
curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;}
|
if [ "$cont" = "US" ] ; then
|
||||||
|
curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;
|
||||||
|
elif [ "$cont" = "EU" ] ; then
|
||||||
|
curl -sL "https://api.sat24.com/animated/${loc}/rainTMC/2/" > "$doppler" ;
|
||||||
|
elif [ "$cont" = "AF" ] ; then
|
||||||
|
curl -sL "https://api.sat24.com/animated/${loc}/rain/2/" > "$doppler" ;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
|
showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
|
||||||
|
|
||||||
@ -198,7 +252,7 @@ case $BLOCK_BUTTON in
|
|||||||
showdoppler ;;
|
showdoppler ;;
|
||||||
2) pickloc && getdoppler && showdoppler ;;
|
2) pickloc && getdoppler && showdoppler ;;
|
||||||
3) notify-send "🗺️ Doppler RADAR module" "\- Left click for local Doppler RADAR.
|
3) notify-send "🗺️ Doppler RADAR module" "\- Left click for local Doppler RADAR.
|
||||||
- Middle click to update change RADAR location.
|
- Middle click to update RADAR location.
|
||||||
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
|
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
|
||||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@ -26,4 +26,4 @@ update() {
|
|||||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||||
|
|
||||||
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx $tx)
|
||||||
|
|||||||
@ -19,10 +19,12 @@ vol="$(pamixer --get-volume)"
|
|||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
if [ "$vol" -gt "70" ]; then
|
||||||
icon="🔊"
|
icon="🔊"
|
||||||
elif [ "$vol" -lt "30" ]; then
|
elif [ "$vol" -gt "30" ]; then
|
||||||
|
icon="🔉"
|
||||||
|
elif [ "$vol" -gt "0" ]; then
|
||||||
icon="🔈"
|
icon="🔈"
|
||||||
else
|
else
|
||||||
icon="🔉"
|
echo 🔇 && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$icon$vol%"
|
echo "$icon$vol%"
|
||||||
|
|||||||
@ -5,14 +5,14 @@ case "$(readlink -f /sbin/init)" in
|
|||||||
*) ctl='loginctl' ;;
|
*) ctl='loginctl' ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n💤 sleep\n🔃 reboot\n🖥️shutdown\n📺 display off" | dmenu -i -p 'Action: ')" in
|
case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in
|
||||||
'🔒 lock') slock ;;
|
'🔒 lock') slock ;;
|
||||||
'🚪 leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;;
|
'🚪 leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;;
|
||||||
'♻️ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;;
|
'♻️ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;;
|
||||||
'🐻 hibernate') slock $ctl hibernate ;;
|
'🐻 hibernate') slock $ctl hibernate ;;
|
||||||
'💤 sleep') slock $ctl suspend ;;
|
'💤 sleep') slock $ctl suspend ;;
|
||||||
'🔃 reboot') $ctl reboot ;;
|
'🔃 reboot') $ctl reboot -i ;;
|
||||||
'🖥️shutdown') $ctl poweroff ;;
|
'🖥️shutdown') $ctl poweroff -i ;;
|
||||||
'📺 display off') xset dpms force off ;;
|
'📺 display off') xset dpms force off ;;
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@ -14,7 +14,7 @@ i3 (old window manager) https://videos.lukesmith.xyz/videos/watch/b861525c-7ada-
|
|||||||
neomutt (email) https://videos.lukesmith.xyz/videos/watch/83122e83-52d9-4278-ae1a-7d1beeb50c8e
|
neomutt (email) https://videos.lukesmith.xyz/videos/watch/83122e83-52d9-4278-ae1a-7d1beeb50c8e
|
||||||
ncmpcpp (music player) https://videos.lukesmith.xyz/videos/watch/b5ac6f0d-a220-4433-88e3-e98fc791dc0a
|
ncmpcpp (music player) https://videos.lukesmith.xyz/videos/watch/b5ac6f0d-a220-4433-88e3-e98fc791dc0a
|
||||||
newsboat (RSS reader) https://videos.lukesmith.xyz/videos/watch/bd2c3fff-40fa-47ea-aa98-5b1ec0c903b6
|
newsboat (RSS reader) https://videos.lukesmith.xyz/videos/watch/bd2c3fff-40fa-47ea-aa98-5b1ec0c903b6
|
||||||
ranger (file manager) https://videos.lukesmith.xyz/videos/watch/785d914f-8cbd-4a3d-a1f6-d75675fc7549
|
lf (file manager) https://videos.lukesmith.xyz/w/rKeHsF5ZHDNDbR1buUKB1c
|
||||||
zathura (pdf viewer) https://videos.lukesmith.xyz/videos/watch/c780f75a-11f6-48a9-a191-d079ebc36ea4
|
zathura (pdf viewer) https://videos.lukesmith.xyz/videos/watch/c780f75a-11f6-48a9-a191-d079ebc36ea4
|
||||||
gpg keys https://videos.lukesmith.xyz/videos/watch/040f5530-4830-4583-9ddc-2080b421531b
|
gpg keys https://videos.lukesmith.xyz/videos/watch/040f5530-4830-4583-9ddc-2080b421531b
|
||||||
calcurse (calendar) https://videos.lukesmith.xyz/videos/watch/4b937e8b-7654-46e3-8d01-79392ec5b3d1
|
calcurse (calendar) https://videos.lukesmith.xyz/videos/watch/4b937e8b-7654-46e3-8d01-79392ec5b3d1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user