Compare commits
No commits in common. "cc1c39d20d1763495ffcac14d4e3f8bba0782da7" and "ffceab78731995942664c1aa80826ea41d151bfd" have entirely different histories.
cc1c39d20d
...
ffceab7873
10 changed files with 10 additions and 109 deletions
|
@ -16,7 +16,6 @@ fi
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
host_backup_run
|
host_backup_run
|
||||||
sleep 3
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ if [ -z "$action" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
"backup-shutdown") _menu_shutdown_backup && systemctl poweroff -i ;;
|
backup-shutdown) _menu_shutdown_backup && systemctl poweroff -i ;;
|
||||||
"shutdown") systemctl poweroff -i ;;
|
shutdown) systemctl poweroff -i ;;
|
||||||
"reboot") systemctl reboot ;;
|
reboot) systemctl reboot ;;
|
||||||
"soft-reboot") systemctl soft-reboot ;;
|
soft-reboot) systemctl soft-reboot ;;
|
||||||
"logout") systemctl --user exit ;;
|
logout) systemctl --user exit ;;
|
||||||
"autostart") autostart-manage run ;;
|
autostart) autostart-manage run ;;
|
||||||
"*") ;; esac
|
*) ;; esac
|
||||||
|
|
|
@ -126,14 +126,15 @@ groups = ["graphical"]
|
||||||
|
|
||||||
[[autoinstall]]
|
[[autoinstall]]
|
||||||
type = "exe"
|
type = "exe"
|
||||||
source = "https://git.serguzim.me/serguzim/teamspeak-query-lib/releases/download/latest/ts-control"
|
source = "https://git.serguzim.me/serguzim/teamspeak-query-lib/raw/branch/main/ts-control"
|
||||||
target = "ts-control"
|
target = "ts-control"
|
||||||
groups = ["graphical", "personal"]
|
groups = ["graphical", "personal"]
|
||||||
|
|
||||||
[[autoinstall]]
|
[[autoinstall]]
|
||||||
type = "exe"
|
type = "exe"
|
||||||
source = "https://git.serguzim.me/serguzim/teamspeak-query-lib/releases/download/latest/teamspeak-query-lib"
|
source = "https://git.serguzim.me/serguzim/teamspeak-query-lib/actions/runs/latest/artifacts/teamspeak-query-lib"
|
||||||
target = "teamspeak-query-lib"
|
target = "teamspeak-query-lib"
|
||||||
|
pipe = "zcat"
|
||||||
groups = ["graphical", "personal"]
|
groups = ["graphical", "personal"]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
export DRONE_SERVER='https://ci.serguzim.me'
|
export DRONE_SERVER='https://ci.serguzim.me'
|
||||||
|
|
||||||
export LINKWARDEN_URL="https://bookmarks.serguzim.me"
|
|
||||||
|
|
||||||
export OPENFAAS_URL="https://faas.serguzim.me"
|
export OPENFAAS_URL="https://faas.serguzim.me"
|
||||||
|
|
||||||
export WOODPECKER_SERVER="https://ci.serguzim.me"
|
export WOODPECKER_SERVER="https://ci.serguzim.me"
|
||||||
|
|
|
@ -46,10 +46,6 @@ export QT_QPA_PLATFORMTHEME="qt5ct"
|
||||||
|
|
||||||
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
|
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
|
||||||
|
|
||||||
export STCONFDIR="$XDG_CONFIG_HOME/syncthing"
|
|
||||||
export STDATADIR="$XDG_DATA_HOME/syncthing"
|
|
||||||
export STNODEFAULTFOLDER="true"
|
|
||||||
|
|
||||||
export TERMINAL="alacritty"
|
export TERMINAL="alacritty"
|
||||||
export TIME_STYLE="long-iso"
|
export TIME_STYLE="long-iso"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import keybindings
|
import keybindings
|
||||||
import common
|
import common
|
||||||
import linkwarden
|
|
||||||
|
|
||||||
config.load_autoconfig()
|
config.load_autoconfig()
|
||||||
keybindings.init(config)
|
keybindings.init(config)
|
||||||
common.init(c)
|
common.init(c)
|
||||||
linkwarden.init()
|
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
if socket.gethostname() == 'portalo':
|
if socket.gethostname() == 'portalo':
|
||||||
|
|
|
@ -24,9 +24,6 @@ def init(c):
|
||||||
c.bind(',Po', 'spawn --userscript qutebrowser-keepassxc --only-otp --key ' + gpg_key, mode='normal')
|
c.bind(',Po', 'spawn --userscript qutebrowser-keepassxc --only-otp --key ' + gpg_key, mode='normal')
|
||||||
c.bind(',Pp', 'spawn --userscript qutebrowser-keepassxc --autotype --key ' + gpg_key, mode='normal')
|
c.bind(',Pp', 'spawn --userscript qutebrowser-keepassxc --autotype --key ' + gpg_key, mode='normal')
|
||||||
|
|
||||||
c.unbind('M')
|
|
||||||
c.bind('M', 'spawn --userscript qutebrowser-linkwarden', mode='normal')
|
|
||||||
|
|
||||||
c.bind(',q', 'spawn --userscript qr {url}')
|
c.bind(',q', 'spawn --userscript qr {url}')
|
||||||
c.bind(',Q', 'hint links spawn --userscript qr {hint-url}')
|
c.bind(',Q', 'hint links spawn --userscript qr {hint-url}')
|
||||||
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import urllib.request
|
|
||||||
|
|
||||||
linkwarden_url = os.environ.get('LINKWARDEN_URL')
|
|
||||||
linkwarden_token = os.environ.get('LINKWARDEN_TOKEN')
|
|
||||||
|
|
||||||
def get_links(cursor):
|
|
||||||
request = urllib.request.Request(linkwarden_url + "/api/v1/links?sort=0&cursor=" + str(cursor), headers={
|
|
||||||
'Authorization': 'Bearer ' + linkwarden_token
|
|
||||||
})
|
|
||||||
response = urllib.request.urlopen(request)
|
|
||||||
data = response.read().decode("utf-8")
|
|
||||||
data = data.replace("\\n", " ").replace("\\r", " ").replace("\\t", " ")
|
|
||||||
data = ' '.join(data.split())
|
|
||||||
return json.loads(data).get("response", [])
|
|
||||||
|
|
||||||
def init():
|
|
||||||
if linkwarden_url is None or linkwarden_token is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
links = []
|
|
||||||
cursor = 0
|
|
||||||
|
|
||||||
while True:
|
|
||||||
new_links = get_links(cursor)
|
|
||||||
links += new_links
|
|
||||||
if len(new_links):
|
|
||||||
cursor = new_links[-1]["id"]
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
with open(os.path.expanduser("~/.config/qutebrowser/bookmarks/urls"), "w+") as f:
|
|
||||||
for link in links:
|
|
||||||
url = link.get("url")
|
|
||||||
if not url:
|
|
||||||
continue
|
|
||||||
|
|
||||||
title = link.get("name")
|
|
||||||
if not title:
|
|
||||||
title = link.get("description")
|
|
||||||
if not title:
|
|
||||||
title = ""
|
|
||||||
|
|
||||||
f.write(url + " " + title + "\n")
|
|
||||||
|
|
||||||
f.close()
|
|
|
@ -1,39 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
get_collections() {
|
|
||||||
curl -H "Authorization: Bearer $LINKWARDEN_TOKEN" \
|
|
||||||
-H "Accept: application/json" \
|
|
||||||
"$LINKWARDEN_URL/api/v1/collections" 2>/dev/null \
|
|
||||||
| jq -r '.response | map_values(.name)[]'
|
|
||||||
}
|
|
||||||
|
|
||||||
collection=$(get_collections | $DMENU -p "Collection: ")
|
|
||||||
url=$QUTE_URL
|
|
||||||
name=$(echo "$QUTE_TITLE" | $DMENU -p "Title: ")
|
|
||||||
|
|
||||||
payload=$(jq -n \
|
|
||||||
--arg u "$url" \
|
|
||||||
--arg n "$name" \
|
|
||||||
--arg c "$collection" \
|
|
||||||
'{
|
|
||||||
url: $u,
|
|
||||||
name: $n,
|
|
||||||
collection: {name: $c},
|
|
||||||
tags: []
|
|
||||||
}')
|
|
||||||
|
|
||||||
response=$(curl -sS --fail-with-body \
|
|
||||||
-H "Authorization: Bearer $LINKWARDEN_TOKEN" \
|
|
||||||
-H "Accept: application/json" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-X POST \
|
|
||||||
-d "$payload" \
|
|
||||||
"$LINKWARDEN_URL/api/v1/links" 2>&1)
|
|
||||||
|
|
||||||
code="$?"
|
|
||||||
|
|
||||||
if [ "$code" -ne 0 ]
|
|
||||||
then
|
|
||||||
response=$(echo "$response" | sed 's/"/\\"/g' | sed 's/$/ - /g' | tr -d '\n' | sed 's/ - $//g')
|
|
||||||
echo "message-error \"Failed to save link: $response\"" >> "$QUTE_FIFO"
|
|
||||||
fi
|
|
|
@ -27,8 +27,6 @@
|
||||||
"position",
|
"position",
|
||||||
"length"
|
"length"
|
||||||
],
|
],
|
||||||
"title-len": 50,
|
|
||||||
"artist-len": 25,
|
|
||||||
"player-icons": {
|
"player-icons": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"chromium": "",
|
"chromium": "",
|
||||||
|
|
Loading…
Reference in a new issue