Compare commits
No commits in common. "a3b00c4693d6822acfe08b0a88f7600946efe304" and "0aeccdad4fa51236d3d1abe077445bb7fecf1a75" have entirely different histories.
a3b00c4693
...
0aeccdad4f
22 changed files with 102 additions and 57 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
[user]
|
[user]
|
||||||
email = marty.oehme@gmail.com
|
email = marty.oehme@gmail.com
|
||||||
name = Marty Oehme
|
name = Marty Oehme
|
||||||
signingkey = 73BA40D5AFAF49C9
|
signingkey = B7538B8F50A1C800
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
[alias]
|
[alias]
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
--
|
--
|
||||||
-- original from https://codeberg.org/jouni/mpv_sponsorblock_minimal
|
-- original from https://codeberg.org/jouni/mpv_sponsorblock_minimal
|
||||||
-- adapted for local playback skipping and some refactoring by me
|
-- adapted for local playback skipping and some refactoring by me
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
API = "https://sponsor.ajay.app/api/skipSegments",
|
API = "https://sponsor.ajay.app/api/skipSegments",
|
||||||
|
|
||||||
|
|
@ -14,39 +15,36 @@ local options = {
|
||||||
|
|
||||||
local function getranges()
|
local function getranges()
|
||||||
local args = {
|
local args = {
|
||||||
"curl", "-s", "-d", "videoID=" .. Youtube_id, "-d",
|
"curl",
|
||||||
"categories=[" .. options.categories .. "]", "-G", options.API
|
"-s",
|
||||||
}
|
"-d",
|
||||||
local sponsors = mp.command_native({
|
"videoID="..youtube_id,
|
||||||
name = "subprocess",
|
"-d",
|
||||||
capture_stdout = true,
|
"categories=["..options.categories.."]",
|
||||||
playback_only = false,
|
"-G",
|
||||||
args = args
|
options.API}
|
||||||
})
|
local sponsors = mp.command_native({name = "subprocess", capture_stdout = true, playback_only = false, args = args})
|
||||||
|
|
||||||
if string.match(sponsors.stdout, "%[(.-)%]") then
|
if string.match(sponsors.stdout,"%[(.-)%]") then
|
||||||
Ranges = {}
|
ranges = {}
|
||||||
for i in string.gmatch(string.sub(sponsors.stdout, 2, -2), "%[(.-)%]") do
|
for i in string.gmatch(string.sub(sponsors.stdout,2,-2),"%[(.-)%]") do
|
||||||
local k, v = string.match(i, "(%d+.?%d*),(%d+.?%d*)")
|
k,v = string.match(i,"(%d+.?%d*),(%d+.?%d*)")
|
||||||
Ranges[k] = v
|
ranges[k] = v
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
return
|
||||||
end
|
end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local function skip_ads(name, pos)
|
local function skip_ads(name,pos)
|
||||||
if pos ~= nil then
|
if pos ~= nil then
|
||||||
for k, v in pairs(Ranges) do
|
for k,v in pairs(ranges) do
|
||||||
if tonumber(k) <= pos and tonumber(v) > pos then
|
if tonumber(k) <= pos and tonumber(v) > pos then
|
||||||
-- this message may sometimes be wrong
|
--this message may sometimes be wrong
|
||||||
-- it only seems to be a visual thing though
|
--it only seems to be a visual thing though
|
||||||
mp.osd_message("[sponsorblock] skipping forward " ..
|
mp.osd_message("[sponsorblock] skipping forward "..math.floor(tonumber(v)-mp.get_property("time-pos")).."s")
|
||||||
math.floor(
|
--need to do the +0.01 otherwise mpv will start spamming skip sometimes
|
||||||
tonumber(v) - mp.get_property("time-pos")) ..
|
--example: https://www.youtube.com/watch?v=4ypMJzeNooo
|
||||||
"s")
|
mp.set_property("time-pos",tonumber(v)+0.01)
|
||||||
-- need to do the +0.01 otherwise mpv will start spamming skip sometimes
|
|
||||||
-- example: https://www.youtube.com/watch?v=4ypMJzeNooo
|
|
||||||
mp.set_property("time-pos", tonumber(v) + 0.01)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -56,23 +54,19 @@ end
|
||||||
|
|
||||||
local function file_loaded()
|
local function file_loaded()
|
||||||
local video_path = mp.get_property("path")
|
local video_path = mp.get_property("path")
|
||||||
local youtube_id1 = string.match(video_path,
|
local youtube_id1 = string.match(video_path, "https?://youtu%.be/([%w-_]+).*")
|
||||||
"https?://youtu%.be/([%w-_]+).*")
|
local youtube_id2 = string.match(video_path, "https?://w?w?w?%.?youtube%.com/v/([%w-_]+).*")
|
||||||
local youtube_id2 = string.match(video_path,
|
|
||||||
"https?://w?w?w?%.?youtube%.com/v/([%w-_]+).*")
|
|
||||||
local youtube_id3 = string.match(video_path, "/watch.*[?&]v=([%w-_]+).*")
|
local youtube_id3 = string.match(video_path, "/watch.*[?&]v=([%w-_]+).*")
|
||||||
local youtube_id4 = string.match(video_path, "/embed/([%w-_]+).*")
|
local youtube_id4 = string.match(video_path, "/embed/([%w-_]+).*")
|
||||||
local localytfile = string.match(video_path,
|
local localytfile = string.match(video_path, "-([%a%d%-_]+)%.[mw][kpe][v4b][m]?$")
|
||||||
"-([%a%d%-_]+)%.[mw][kpe][v4b][m]?$")
|
youtube_id = youtube_id1 or youtube_id2 or youtube_id3 or youtube_id4 or localytfile
|
||||||
Youtube_id = youtube_id1 or youtube_id2 or youtube_id3 or youtube_id4 or
|
if not youtube_id or string.len(youtube_id) < 11 then return end
|
||||||
localytfile
|
youtube_id = string.sub(youtube_id, 1, 11)
|
||||||
if not Youtube_id or string.len(Youtube_id) < 11 then return end
|
|
||||||
Youtube_id = string.sub(Youtube_id, 1, 11)
|
|
||||||
|
|
||||||
getranges()
|
getranges()
|
||||||
if Ranges then
|
if ranges then
|
||||||
ON = true
|
ON = true
|
||||||
mp.add_key_binding("b", "sponsorblock", toggle)
|
mp.add_key_binding("b","sponsorblock",toggle)
|
||||||
mp.observe_property("time-pos", "native", skip_ads)
|
mp.observe_property("time-pos", "native", skip_ads)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ config.bind(leader + "tV", "set tabs.position left")
|
||||||
config.bind(lleader + "M", "spawn umpv {url}")
|
config.bind(lleader + "M", "spawn umpv {url}")
|
||||||
config.bind(lleader + "m", "hint links spawn umpv {hint-url}")
|
config.bind(lleader + "m", "hint links spawn umpv {hint-url}")
|
||||||
config.bind(lleader + "I", "spawn nsxiv-rifle {url}")
|
config.bind(lleader + "I", "spawn nsxiv-rifle {url}")
|
||||||
config.bind(lleader + "i", "hint links spawn nsxiv-rifle {hint-url}")
|
config.bind(lleader + "i", "hint --rapid links spawn nsxiv-rifle {hint-url}")
|
||||||
|
|
||||||
# bind youtube-dl to download the current page/links
|
# bind youtube-dl to download the current page/links
|
||||||
config.bind(lleader + "dM", "spawn vidl {url}")
|
config.bind(lleader + "dM", "spawn vidl {url}")
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ redirects = {
|
||||||
"www.instagram.com": "bibliogram.art",
|
"www.instagram.com": "bibliogram.art",
|
||||||
"wikipedia.org": "wikiless.org",
|
"wikipedia.org": "wikiless.org",
|
||||||
"en.wikipedia.org": "wikiless.org",
|
"en.wikipedia.org": "wikiless.org",
|
||||||
"medium.com": "scribe.rip",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Open any of: quickmarks, bookmarks and browser history via dmenu (or rofi)
|
# Open any of: quickmarks, bookmarks and browser history via dmenu (or rofi)
|
||||||
# Handle open -s && open -t with bemenu
|
# Handle open -s && open -t with bemenu
|
||||||
#
|
|
||||||
# Requires sqlite3 binary installed to traverse the history.
|
|
||||||
|
|
||||||
#:bind o spawn --userscript /path/to/userscripts/qutedmenu open
|
#:bind o spawn --userscript /path/to/userscripts/qutedmenu open
|
||||||
#:bind O spawn --userscript /path/to/userscripts/qutedmenu tab
|
#:bind O spawn --userscript /path/to/userscripts/qutedmenu tab
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
from_local() {
|
from_local() {
|
||||||
fpath="$(realpath -e "$1")"
|
fpath="$(realpath "$1")"
|
||||||
ln -s "$fpath" "$cache_dir"
|
ln -s "$fpath" "$cache_dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,5 +71,5 @@ while [ -n "$1" ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ "$(find -L "$cache_dir" -type f -print | wc -l)" -ne 0 ] &&
|
[ "$(find "$cache_dir" -type f -print | wc -l)" -ne 0 ] &&
|
||||||
nsxiv -p "$cache_dir"
|
nsxiv -p "$cache_dir"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/lib/systemd/user/an2linuxserver.service
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../dropdown-terminal.service
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../dropdown-todo.service
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../flashfocus.service
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/lib/systemd/user/greenclip.service
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../x-started-confirm.service
|
||||||
13
services/.config/systemd/user/dropdown-terminal.service
Normal file
13
services/.config/systemd/user/dropdown-terminal.service
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Terminal window hidden to be called at any point
|
||||||
|
Requires=x-started-confirm.service
|
||||||
|
After=x-started-confirm.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
# workaround to allow relative executable invocation (i.e. current users' home dir)
|
||||||
|
ExecStart=/bin/bash -c 'kitty --title "dropdown-terminal" --class scratchpad'
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
13
services/.config/systemd/user/dropdown-todo.service
Normal file
13
services/.config/systemd/user/dropdown-todo.service
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Todo.md hidden vim instance
|
||||||
|
Requires=x-started-confirm.service
|
||||||
|
After=x-started-confirm.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
# workaround to allow relative executable invocation (i.e. current users' home dir)
|
||||||
|
ExecStart=/bin/bash -c 'kitty --title "dropdown-todo" --class scratchpad nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F | :Limelight" %h/documents/records/todo.md'
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
12
services/.config/systemd/user/flashfocus.service
Normal file
12
services/.config/systemd/user/flashfocus.service
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Perform windows animations on focus
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
Requires=x-started-confirm.service
|
||||||
|
After=x-started-confirm.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/flashfocus
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
[Unit]
|
||||||
|
Requires=x-started-confirm.service
|
||||||
|
After=x-started-confirm.service
|
||||||
10
services/.config/systemd/user/x-started-confirm.service
Normal file
10
services/.config/systemd/user/x-started-confirm.service
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Monitor status of X server start
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/bash -c '%h/.local/share/services/x-started-confirm.sh'
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
@ -10,9 +10,8 @@ unalias -a
|
||||||
# v shorthand for neovim
|
# v shorthand for neovim
|
||||||
if exist nvim; then
|
if exist nvim; then
|
||||||
alias v="nvim"
|
alias v="nvim"
|
||||||
|
alias vs="nvim -c 'ScratchPad'"
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias vs="nvim -c 'ScratchPad'" # open an empty 'scratchpad' which simply disappears after use
|
|
||||||
alias vw="nvim -c \"lua require 'zettelkasten'.index_open()\"" # open to personal wiki
|
|
||||||
elif exist vim; then
|
elif exist vim; then
|
||||||
alias v="vim"
|
alias v="vim"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new-window -n dash
|
||||||
send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task next" C-m
|
send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task next" C-m
|
||||||
split-window -h -l 71
|
split-window -h -l 71
|
||||||
send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task summary" C-m
|
send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task summary" C-m
|
||||||
split-window -v "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task status:pending or +ACTIVE burndown"
|
split-window -v "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task end.after=tod-3m or entry.after=tod-1m burndown"
|
||||||
select-pane -t 1
|
select-pane -t 1
|
||||||
split-window -v -l 5
|
split-window -v -l 5
|
||||||
send-keys "t" Space
|
send-keys "t" Space
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</edit>
|
</edit>
|
||||||
<edit name="dpi" mode="assign">
|
<edit name="dpi" mode="assign">
|
||||||
<double>93</double>
|
<double>92</double>
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
</fontconfig>
|
</fontconfig>
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ riverctl map normal $mod+Shift Space spawn "clipman pick --tool=bemenu"
|
||||||
riverctl map normal $mod+Shift R spawn "$term --class float -e qalc"
|
riverctl map normal $mod+Shift R spawn "$term --class float -e qalc"
|
||||||
|
|
||||||
# Open emoji picker
|
# Open emoji picker
|
||||||
riverctl map normal $mod+Shift E spawn "bemoji -nt"
|
riverctl map normal $mod+Shift E spawn "bemoji -t"
|
||||||
|
|
||||||
# Open translation helper
|
# Open translation helper
|
||||||
riverctl map normal $mod+Shift T spawn "bemenu-translate"
|
riverctl map normal $mod+Shift T spawn "bemenu-translate"
|
||||||
|
|
@ -240,6 +240,5 @@ exec wl-paste -t text --watch clipman store &
|
||||||
riverctl default-layout rivercarro &
|
riverctl default-layout rivercarro &
|
||||||
# start layouting engine
|
# start layouting engine
|
||||||
killall rivercarro
|
killall rivercarro
|
||||||
exec rivercarro -main-ratio 0.65 &
|
exec rivercarro -main-ratio 0.65 -view-padding 6 -outer-padding 6 &
|
||||||
# exec rivercarro -main-ratio 0.65 -view-padding 6 -outer-padding 6 & # -> does not work with current rivercarro version (0.1.4)
|
# brightnessctl set 100%
|
||||||
brightnessctl set 70%
|
|
||||||
|
|
|
||||||
|
|
@ -70,13 +70,13 @@ prompt pure
|
||||||
# load additional aliases
|
# load additional aliases
|
||||||
if [ -d "$CONFDIR/sh/alias.d" ]; then
|
if [ -d "$CONFDIR/sh/alias.d" ]; then
|
||||||
for _alias in "$CONFDIR/sh/alias.d"/*.sh; do
|
for _alias in "$CONFDIR/sh/alias.d"/*.sh; do
|
||||||
source "$_alias"
|
. "$_alias"
|
||||||
done
|
done
|
||||||
unset _alias
|
unset _alias
|
||||||
fi
|
fi
|
||||||
if [ -d "$ZSHCONFDIR/alias.d" ]; then
|
if [ -d "$ZSHCONFDIR/alias.d" ]; then
|
||||||
for _alias in "$ZSHCONFDIR/alias.d"/*.sh; do
|
for _alias in "$ZSHCONFDIR/alias.d"/*.sh; do
|
||||||
source "$_alias"
|
. "$_alias"
|
||||||
done
|
done
|
||||||
unset _alias
|
unset _alias
|
||||||
fi
|
fi
|
||||||
|
|
@ -171,7 +171,6 @@ bindkey -M isearch '^N' history-incremental-search-forward
|
||||||
# Send command to editor and back for execution
|
# Send command to editor and back for execution
|
||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey '^e' edit-command-line
|
bindkey '^e' edit-command-line
|
||||||
bindkey -M vicmd '^e' edit-command-line
|
|
||||||
|
|
||||||
# Deduplicate PATH - remove any duplicate entries from PATH
|
# Deduplicate PATH - remove any duplicate entries from PATH
|
||||||
# from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command
|
# from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue