Compare commits
48 Commits
57798d0509
...
master
Author | SHA1 | Date | |
---|---|---|---|
a4a1f44e4e
|
|||
93f5122723
|
|||
951eebe79b
|
|||
5bf85682ed
|
|||
75e7744f01
|
|||
56e4a5ebfb
|
|||
76e72f4d46
|
|||
a73c95b3a6
|
|||
562a454d63
|
|||
1dcd003a8d
|
|||
52af3677cf
|
|||
c12e14fb65
|
|||
7d07cb92de
|
|||
4188c07932
|
|||
585f192551
|
|||
809a7210e0
|
|||
162bce097d
|
|||
ab72387a96
|
|||
69212cf836
|
|||
5c345b8a8c
|
|||
a2eaec5dba
|
|||
e104755b24
|
|||
944a2bb4e8
|
|||
15a6065ec0
|
|||
f074a1c74e
|
|||
4f8a4671d2
|
|||
740ab0f2ad
|
|||
1c0b5771e3
|
|||
78d4618dfa
|
|||
9641482295
|
|||
b8b5a9f45e
|
|||
dedfe7285e
|
|||
b54c2abd9c
|
|||
cbefbe5a5e
|
|||
a5c1ad6af0
|
|||
6892176569
|
|||
dfbd109c6e
|
|||
35d8536fcf
|
|||
ba4f3a72a0
|
|||
4e53b56e59
|
|||
bec8276729
|
|||
3e1222e211
|
|||
d4073acce2
|
|||
8d4aabc052
|
|||
5f0fe257aa
|
|||
55eac4d70c
|
|||
18d1bca807
|
|||
8e3b1e0a25
|
@ -17,10 +17,10 @@ Hostname = cloud.bocken.org
|
||||
|
||||
# Path to the CalDAV calendar on the host specified above. This is the base
|
||||
# path following your host name in the URL.
|
||||
Path = /remote.php/dav/calendars/admin/personal/
|
||||
Path = /remote.php/dav/calendars/alexander/personal/
|
||||
|
||||
# Type of authentication to use. Must be "basic" or "oauth2"
|
||||
#AuthMethod = basic
|
||||
AuthMethod = basic
|
||||
|
||||
# Enable this if you want to skip SSL certificate checks.
|
||||
InsecureSSL = No
|
||||
@ -53,8 +53,8 @@ Verbose = Yes
|
||||
# Set `Password` to your password in plaintext (unsafe),
|
||||
# or `PasswordCommand` to a shell command that retrieves it (recommended).
|
||||
[Auth]
|
||||
Username = alexander@bocken.org
|
||||
# Password = DO NOT USE
|
||||
Username = alexander
|
||||
# Password = # SET VIA CALCURSE_CALDAV_PASSWORD environment variable
|
||||
# PasswordCommand = #Does not work
|
||||
|
||||
# Optionally specify additional HTTP headers here.
|
||||
@ -63,13 +63,15 @@ Username = alexander@bocken.org
|
||||
|
||||
# Use the following to synchronize with an OAuth2-based service
|
||||
# such as Google Calendar.
|
||||
#[OAuth2]
|
||||
[OAuth2]
|
||||
ClientID = calcurse
|
||||
ClientSecret =
|
||||
#ClientID = your_client_id
|
||||
#ClientSecret = your_client_secret
|
||||
|
||||
# Scope of access for API calls. Synchronization requires read/write.
|
||||
#Scope = https://example.com/resource/scope
|
||||
Scope =
|
||||
|
||||
# Change the redirect URI if you receive errors, but ensure that it is identical
|
||||
# to the redirect URI you specified in the API settings.
|
||||
#RedirectURI = http://127.0.0.1
|
||||
RedirectURI = http://127.0.0.1
|
||||
|
@ -27,13 +27,13 @@
|
||||
width = 300
|
||||
|
||||
# The maximum height of a single notification, excluding the frame.
|
||||
height = 300
|
||||
height = (0, 300)
|
||||
|
||||
# Position the notification in the top right corner
|
||||
origin = top-right
|
||||
|
||||
# Offset from the origin
|
||||
offset = 0x26
|
||||
offset = (0, 26)
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
@ -206,7 +206,7 @@
|
||||
# icon_theme = "Adwaita, breeze"
|
||||
|
||||
# Align icons left/right/top/off
|
||||
icon_position = left
|
||||
icon_position = off
|
||||
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
|
@ -31,7 +31,7 @@
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Noto Sans Mono</family>
|
||||
<family>Inconsolata</family>
|
||||
<family>Libertinus Mono</family>
|
||||
<family>FontAwesome</family>
|
||||
<family>Braille</family>
|
||||
|
@ -95,7 +95,7 @@
|
||||
"sync_speed_attempts": 3,
|
||||
"sync_speed_time": 1000,
|
||||
"thumbnail_enable": true,
|
||||
"thumbnail_jellyscrub": false,
|
||||
"thumbnail_jellyscrub": true,
|
||||
"thumbnail_osc_builtin": true,
|
||||
"thumbnail_preferred_size": 320,
|
||||
"transcode_dolby_vision": true,
|
||||
@ -104,4 +104,4 @@
|
||||
"transcode_warning": true,
|
||||
"use_web_seek": false,
|
||||
"write_logs": false
|
||||
}
|
||||
}
|
124
.config/mbsync/config
Normal file
124
.config/mbsync/config
Normal file
@ -0,0 +1,124 @@
|
||||
IMAPStore alexander@bocken.org-remote
|
||||
Host mail.bocken.org
|
||||
Port 993
|
||||
User alexander
|
||||
PassCmd "pass alexander@bocken.org"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore alexander@bocken.org-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/alexander@bocken.org/
|
||||
Inbox /home/alex/.local/share/mail/alexander@bocken.org/INBOX
|
||||
|
||||
Channel alexander@bocken.org
|
||||
Expunge Both
|
||||
Far :alexander@bocken.org-remote:
|
||||
Near :alexander@bocken.org-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
IMAPStore abocken@ethz.ch-remote
|
||||
Host outlook.office365.com
|
||||
Port 993
|
||||
User abocken@ethz.ch
|
||||
PassCmd "mutt_oauth2.py ~/.local/share/mail/eth.token"
|
||||
AuthMechs XOAUTH2
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore abocken@ethz.ch-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/abocken@ethz.ch/
|
||||
Inbox /home/alex/.local/share/mail/abocken@ethz.ch/INBOX
|
||||
|
||||
Channel abocken@ethz.ch
|
||||
Expunge Both
|
||||
Far :abocken@ethz.ch-remote:
|
||||
Near :abocken@ethz.ch-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
#IMAPStore abocken@ethz.ch-remote
|
||||
#Host mail.ethz.ch
|
||||
#Port 993
|
||||
#User abocken
|
||||
#PassCmd "pass 'ETH/nETHz - abocken@ethz.ch'"
|
||||
#AuthMechs LOGIN
|
||||
#TLSType IMAPS
|
||||
#CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
#
|
||||
#MaildirStore abocken@ethz.ch-local
|
||||
#Subfolders Verbatim
|
||||
#Path /home/alex/.local/share/mail/abocken@ethz.ch/
|
||||
#Inbox /home/alex/.local/share/mail/abocken@ethz.ch/INBOX
|
||||
#
|
||||
#Channel abocken@ethz.ch
|
||||
#Expunge Both
|
||||
#Far :abocken@ethz.ch-remote:
|
||||
#Near :abocken@ethz.ch-local:
|
||||
#Patterns * !"[Gmail]/All Mail"
|
||||
#Create Both
|
||||
#SyncState *
|
||||
#MaxMessages 0
|
||||
#ExpireUnread no
|
||||
|
||||
|
||||
IMAPStore alexander@aaathats3as.com-remote
|
||||
Host mail.cock.li
|
||||
Port 993
|
||||
User alexander@aaathats3as.com
|
||||
PassCmd "pass eMail/aaathats3as.com"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore alexander@aaathats3as.com-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/alexander@aaathats3as.com/
|
||||
Inbox /home/alex/.local/share/mail/alexander@aaathats3as.com/INBOX
|
||||
|
||||
Channel alexander@aaathats3as.com
|
||||
Expunge Both
|
||||
Far :alexander@aaathats3as.com-remote:
|
||||
Near :alexander@aaathats3as.com-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
IMAPStore account@bocken.org-remote
|
||||
Host mail.bocken.org
|
||||
Port 993
|
||||
User account
|
||||
PassCmd "pass account@bocken.org"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore account@bocken.org-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/account@bocken.org/
|
||||
Inbox /home/alex/.local/share/mail/account@bocken.org/INBOX
|
||||
|
||||
Channel account@bocken.org
|
||||
Expunge Both
|
||||
Far :account@bocken.org-remote:
|
||||
Near :account@bocken.org-local:
|
||||
Patterns * !"[Gmail]/All Mail" !"*fts-flatcurve*" !"*virtual*"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
@ -18,3 +18,4 @@ video/x-matroska=video.desktop
|
||||
video/mp4=video.desktop
|
||||
x-scheme-handler/lbry=lbry.desktop
|
||||
inode/directory=file.desktop
|
||||
x-scheme-handler/msteams=teams.desktop
|
||||
|
@ -1,5 +1,6 @@
|
||||
music_directory "~/msc"
|
||||
playlist_directory "~/.config/mpd/playlists"
|
||||
state_file "~/.local/share/mpd/state"
|
||||
|
||||
auto_update "yes"
|
||||
bind_to_address "127.0.0.1"
|
||||
|
80
.config/mpv/scripts/custom_yanker.lua
Normal file
80
.config/mpv/scripts/custom_yanker.lua
Normal file
@ -0,0 +1,80 @@
|
||||
-- Define the time window for keypresses
|
||||
local time_window = 2 -- seconds
|
||||
|
||||
-- Variables to keep track of 'y' keypress and the timer
|
||||
local y_pressed = false
|
||||
local y_timer = nil
|
||||
|
||||
-- Function to reset the 'y' keypress state
|
||||
local function reset_y()
|
||||
y_pressed = false
|
||||
if y_timer then
|
||||
mp.cancel_timer(y_timer)
|
||||
y_timer = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to handle 'y' keypress
|
||||
local function handle_yanker()
|
||||
reset_y()
|
||||
y_pressed = true
|
||||
-- Start a timer to reset the state after 2 seconds
|
||||
y_timer = mp.add_timeout(time_window, reset_y)
|
||||
end
|
||||
|
||||
-- Function to handle 'n' keypress
|
||||
-- Copy the filename to clipboard
|
||||
local function handle_filename()
|
||||
if y_pressed then
|
||||
local filename = mp.get_property("filename")
|
||||
-- Use a method to copy 'filename' to clipboard (platform-specific)
|
||||
-- For example, on Unix-like systems, you might use 'xclip'
|
||||
os.execute("printf %s" .. filename .. " | xclip -selection clipboard")
|
||||
mp.osd_message("Copied filename " .. filename .. " to clipboard", 3)
|
||||
reset_y() -- Reset the 'y' keypress state
|
||||
end
|
||||
end
|
||||
|
||||
-- Bind the keys to their respective functions
|
||||
|
||||
-- Function to handle 'd' keypress
|
||||
-- Copy the directory to clipboard
|
||||
local function handle_dir()
|
||||
if y_pressed then
|
||||
local filepath = mp.get_property("path")
|
||||
local directory = string.match(filepath, "(.*/)")
|
||||
os.execute("printf %s" .. directory .. " | xclip -selection clipboard")
|
||||
mp.osd_message("Copied directory " .. directory .. " to clipboard", 3)
|
||||
reset_y()
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to handle 'p' keypress
|
||||
local function handle_path()
|
||||
if y_pressed then
|
||||
local full_path = mp.get_property("path")
|
||||
os.execute("printf %s " .. full_path .. " | xclip -selection clipboard")
|
||||
mp.osd_message("Copied full path " .. full_path .. " to clipboard", 3)
|
||||
reset_y()
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to copy the title to clipboard
|
||||
local function handle_title()
|
||||
if y_pressed then
|
||||
local title = mp.get_property("media-title")
|
||||
if title and title ~= mp.get_property("filename") then
|
||||
os.execute("printf %s" .. title .. " | xclip -selection clipboard")
|
||||
mp.osd_message("Copied title " .. title .. " to clipboard", 3)
|
||||
else
|
||||
handle_filename() -- Call the function to copy the filename
|
||||
end
|
||||
reset_y()
|
||||
end
|
||||
end
|
||||
|
||||
mp.add_key_binding("y", "check_y", handle_yanker)
|
||||
mp.add_key_binding("n", "check_n", handle_filename)
|
||||
mp.add_key_binding("p", "check_p", handle_path)
|
||||
mp.add_key_binding("d", "check_d", handle_dir)
|
||||
mp.add_key_binding("t", "check_t", handle_title)
|
30
.config/mpv/scripts/mark.lua
Normal file
30
.config/mpv/scripts/mark.lua
Normal file
@ -0,0 +1,30 @@
|
||||
-- mpv script to mark videos
|
||||
local utils = require 'mp.utils'
|
||||
local marked_videos = {}
|
||||
local marked_file = "marked"
|
||||
|
||||
function toggle_mark()
|
||||
local path = mp.get_property("path")
|
||||
if marked_videos[path] then
|
||||
marked_videos[path] = nil
|
||||
mp.osd_message("Unmarked: " .. path)
|
||||
else
|
||||
marked_videos[path] = true
|
||||
mp.osd_message("Marked: " .. path)
|
||||
end
|
||||
end
|
||||
|
||||
function save_marks()
|
||||
-- Do not write anything if "marked_videos" is empty
|
||||
if next(marked_videos) == nil then
|
||||
return
|
||||
end
|
||||
local file = io.open(marked_file, "a")
|
||||
for path, _ in pairs(marked_videos) do
|
||||
file:write(path .. "\n")
|
||||
end
|
||||
file:close()
|
||||
end
|
||||
|
||||
mp.add_key_binding("M", "toggle_mark", toggle_mark)
|
||||
mp.register_event("shutdown", save_marks)
|
@ -1,47 +0,0 @@
|
||||
# vim: filetype=neomuttrc
|
||||
# muttrc file for account abocken@ethz.ch
|
||||
set realname = "Alexander Bocken"
|
||||
set from = "abocken@ethz.ch"
|
||||
set sendmail = "msmtp -a abocken@ethz.ch"
|
||||
alias me Alexander Bocken <abocken@ethz.ch>
|
||||
set folder = "/home/alex/.local/share/mail/abocken@ethz.ch"
|
||||
set header_cache = /home/alex/.cache/mutt-wizard/abocken@ethz.ch/headers
|
||||
set message_cachedir = /home/alex/.cache/mutt-wizard/abocken@ethz.ch/bodies
|
||||
set mbox_type = Maildir
|
||||
|
||||
|
||||
bind index,pager gg noop
|
||||
bind index,pager g noop
|
||||
bind index,pager M noop
|
||||
bind index,pager C noop
|
||||
bind index gg first-entry
|
||||
unmailboxes *
|
||||
unalternates *
|
||||
unset signature
|
||||
unmacro index o
|
||||
macro index o "<shell-escape>mailsync abocken@ethz.ch<enter>" "run mbsync to sync abocken@ethz.ch"
|
||||
|
||||
mailboxes "=Calendar" "=Deleted Items" "=Drafts" "=INBOX" "=Journal" "=Junk E-Mail" "=Notes" "=Outbox" "=Sent" "=Sent Items" "=Tasks" "=Trash"
|
||||
set postponed = "+Drafts"
|
||||
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
|
||||
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
|
||||
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
|
||||
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
|
||||
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
|
||||
macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox"
|
||||
set spoolfile = "+INBOX"
|
||||
macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
|
||||
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
|
||||
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
|
||||
set record = "+Sent"
|
||||
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
|
||||
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
|
||||
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
|
||||
set record = "+Sent"
|
||||
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
|
||||
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
|
||||
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
|
||||
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
|
||||
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
|
||||
macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
|
||||
set trash = "+Trash"
|
@ -5,18 +5,15 @@ set from = "alexander@bocken.org"
|
||||
set sendmail = "msmtp -a alexander@bocken.org"
|
||||
alias me Alexander Bocken <alexander@bocken.org>
|
||||
set folder = "/home/alex/.local/share/mail/alexander@bocken.org"
|
||||
set header_cache = /home/alex/.cache/mutt-wizard/alexander@bocken.org/headers
|
||||
set message_cachedir = /home/alex/.cache/mutt-wizard/alexander@bocken.org/bodies
|
||||
set header_cache = "/home/alex/.cache/mutt-wizard/alexander_bocken.org/headers"
|
||||
set message_cachedir = "/home/alex/.cache/mutt-wizard/alexander_bocken.org/bodies"
|
||||
set mbox_type = Maildir
|
||||
set hostname = "bocken.org"
|
||||
#source /usr/share/mutt-wizard/switch.muttrc
|
||||
set spoolfile = +INBOX
|
||||
set postponed = +Drafts
|
||||
set trash = +Trash
|
||||
set record = +Sent
|
||||
source /usr/share/mutt-wizard/switch.muttrc
|
||||
set spoolfile = "+INBOX"
|
||||
set postponed = "+Drafts"
|
||||
set trash = "+Trash"
|
||||
set record = "+Sent"
|
||||
|
||||
macro index o "<shell-escape>mailsync alexander@bocken.org<enter>" "run mbsync to sync alexander@bocken.org"
|
||||
macro index \eg "<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; /usr/lib/gnupg/gpg-wks-client --create \$eFGPT \$eID | msmtp --read-envelope-from --read-recipients -a alexander@bocken.org<enter>" "publish GPG key to WKS provider"
|
||||
macro index \eh "<pipe-message>/usr/lib/gnupg/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a alexander@bocken.org<enter>" "confirm GPG publication"
|
||||
|
||||
mailboxes "=Archive/Archive" "=Trash/Trash" "=Sent" "=Junk" "=Drafts" "=INBOX"
|
||||
macro index o "<shell-escape>mailsync alexander@bocken.org<enter>" "sync alexander@bocken.org"
|
||||
mailboxes "=Sent" "=Junk" "=Drafts" "=INBOX"
|
||||
|
@ -1,8 +1,7 @@
|
||||
# vim: filetype=neomuttrc
|
||||
source /usr/share/mutt-wizard/mutt-wizard.muttrc
|
||||
source /home/alex/.config/mutt/accounts/alexander@bocken.org.muttrc
|
||||
macro index,pager i1 '<sync-mailbox><enter-command>source /home/alex/.config/mutt/accounts/alexander@bocken.org.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alexander@bocken.org"
|
||||
macro index,pager i2 '<sync-mailbox><enter-command>source /home/alex/.config/mutt/accounts/1-abocken@ethz.ch.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to abocken@ethz.ch"
|
||||
macro index,pager i2 '<sync-mailbox><enter-command>source /home/alex/.config/mutt/accounts/abocken@ethz.ch.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to abocken@ethz.ch"
|
||||
set forward_attachments = ask-yes
|
||||
macro compose m \
|
||||
"<enter-command>set pipe_decode<enter>\
|
||||
@ -14,6 +13,17 @@ macro compose m \
|
||||
<tag-entry><previous-entry><tag-entry><group-alternatives>" \
|
||||
"Convert markdown to HTML5 and plaintext alternative content types"
|
||||
|
||||
set query_command = "abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook --mutt-query '%s'"
|
||||
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
|
||||
#set query_command = "abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook --mutt-query '%s'"
|
||||
#macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
|
||||
macro index,pager i3 '<sync-mailbox><enter-command>source /home/alex/.config/mutt/accounts/alexander@aaathats3as.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alexander@aaathats3as.com"
|
||||
macro index,pager i1 '<sync-mailbox><enter-command>source /home/alex/.config/mutt/accounts/alexander@bocken.org.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alexander@bocken.org"
|
||||
|
||||
|
||||
set query_command= "mates mutt-query '%s'"
|
||||
|
||||
set query_command = "echo %s | xargs khard email --parsable --"
|
||||
bind editor <Tab> complete-query
|
||||
bind editor ^T complete
|
||||
macro index,pager a \
|
||||
"<pipe-message>khard add-email<return>" \
|
||||
"add the sender email address to khard"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#show-read-feeds no
|
||||
auto-reload yes
|
||||
reload-threads 100
|
||||
|
||||
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
|
||||
|
||||
|
23
.config/nsxiv/exec/image-info
Executable file
23
.config/nsxiv/exec/image-info
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example for $XDG_CONFIG_HOME/nsxiv/exec/image-info
|
||||
# Called by nsxiv(1) whenever an image gets loaded.
|
||||
# The output is displayed in nsxiv's status bar.
|
||||
# Arguments:
|
||||
# $1: path to image file (as provided by the user)
|
||||
# $2: image width
|
||||
# $3: image height
|
||||
# $4: fully resolved path to the image file
|
||||
|
||||
s=" " # field separator
|
||||
|
||||
exec 2>/dev/null
|
||||
|
||||
filename=$(basename -- "$1")
|
||||
filesize=$(du -Hh -- "$1" | cut -f 1)
|
||||
geometry="${2}x${3}"
|
||||
#TODO: imrpove for multiple date formats
|
||||
#currently just picks the first date that is not a profile or file date using exiftool (no one coherent standard for date in exif metadata is used)
|
||||
date_shot="$(exiftool -- "$1" | grep 'Date' | grep -vE '(Profile|File)' | cut -d: -f1 --complement | sort | head -n1)"
|
||||
|
||||
echo "${filesize}${s}${geometry}${s}${filename}${s}${date_shot}"
|
@ -26,7 +26,7 @@ do
|
||||
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
|
||||
"d")
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
[ "$(printf "No\\nYes" | dmenu -n -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
"g") ifinstalled gimp && setsid -f gimp "$file" ;;
|
||||
"i") notify-send "File information" "$(mediainfo "$file")" ;;
|
||||
esac
|
||||
|
20
.config/nsxiv/exec/thumb-info
Executable file
20
.config/nsxiv/exec/thumb-info
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example for $XDG_CONFIG_HOME/nsxiv/exec/thumb-info
|
||||
# Called by nsxiv(1) whenever the selected thumbnail changes.
|
||||
# The output is displayed in nsxiv's status bar.
|
||||
# Arguments:
|
||||
# $1: path to image file (as provided by the user)
|
||||
# $2: empty
|
||||
# $3: empty
|
||||
# $4: fully resolved path to the image file
|
||||
|
||||
s=" " # field separator
|
||||
|
||||
exec 2>/dev/null
|
||||
|
||||
filename=$(basename -- "$4")
|
||||
filesize=$(du -Hh -- "$4" | cut -f 1)
|
||||
|
||||
echo "${filesize}${s}${filename}"
|
||||
|
27
.config/nsxiv/exec/win-title
Executable file
27
.config/nsxiv/exec/win-title
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example for $XDG_CONFIG_HOME/nsxiv/exec/win-title
|
||||
# Called by nsxiv(1) whenever any of the relevant information changes.
|
||||
# The output is set as nsxiv's window title.
|
||||
#
|
||||
# Arguments, "Optional" arguments might be empty:
|
||||
# $1: resolved absolute path of the current file
|
||||
# $2: current file number
|
||||
# $3: total file number
|
||||
# $4: image width (Optional: Disabled on thumbnails mode)
|
||||
# $5: image height (Optional: Disabled on thumbnails mode)
|
||||
# $6: current zoom (Optional: Disabled on thumbnails mode)
|
||||
#
|
||||
# The term file is used rather than image as nsxiv does not
|
||||
# precheck that the input files are valid images. Total file
|
||||
# count may be different from the actual count of valid images.
|
||||
|
||||
exec 2>/dev/null
|
||||
|
||||
filename="${1##*/}"
|
||||
|
||||
if [ -n "$4" ]; then # image mode
|
||||
printf "%s" "nsxiv - ${filename} | ${4}x${5} ${6}% [${2}/${3}]"
|
||||
else
|
||||
printf "%s" "nsxiv - ${filename} [${2}/${3}]"
|
||||
fi
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"suggest.enablePreselect": false,
|
||||
"suggest.noselect": true,
|
||||
"svelte.enable-ts-plugin": true
|
||||
"svelte.enable-ts-plugin": true,
|
||||
"pyright.inlayHints.variableTypes": false
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
let mapleader =","
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||
@ -7,6 +8,8 @@ if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autolo
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"'))
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'preservim/nerdtree'
|
||||
@ -22,9 +25,17 @@ Plug 'lervag/vimtex', { 'for': ['tex'] }
|
||||
Plug 'arcticicestudio/nord-vim'
|
||||
Plug 'rhysd/vim-grammarous'
|
||||
Plug 'jalvesaq/Nvim-R', {'branch': 'stable', 'for': ['r', 'R', 'Rmd', 'rmd']}
|
||||
Plug 'luk400/vim-jukit', {'for': ['ipynb', 'py']}
|
||||
Plug 'luk400/vim-jukit'
|
||||
Plug 'David-Kunz/gen.nvim'
|
||||
Plug 'othree/html5.vim'
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
||||
Plug 'github/copilot.vim',
|
||||
Plug 'nathangrigg/vim-beancount'
|
||||
call plug#end()
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
set title
|
||||
set bg=light
|
||||
set go=a
|
||||
@ -62,6 +73,26 @@ colorscheme nord
|
||||
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||||
set splitbelow splitright
|
||||
|
||||
""" Autocompile RMarkdown on save if flag is set in file
|
||||
" Define a function to check for the autocompile flag and compile if present
|
||||
function! CompileRMarkdown()
|
||||
let autocompile = search('<\!--\s\+vim:\s\+set\s\+autocompile=true\s\+-->', 'nW') != 0
|
||||
if autocompile
|
||||
silent !Rscript -e 'rmarkdown::render("%")'
|
||||
redraw!
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
" Automatically compile RMarkdown on buffer write
|
||||
autocmd BufWritePost *.Rmd call CompileRMarkdown()
|
||||
|
||||
""" GitHub Copilot
|
||||
" remap accept to <C-J> instead of <CR>
|
||||
imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
|
||||
let g:copilot_no_tab_map = v:true
|
||||
|
||||
|
||||
" Python Notebooks using jukit
|
||||
let g:_jukit_python_os_cmd = 'python'
|
||||
let g:jukit_shell_cmd = 'ipython'
|
||||
@ -95,7 +126,7 @@ let g:jukit_convert_overwrite_default = -1
|
||||
" - Default setting when converting from .ipynb to .py or vice versa and a file of the same name already exists. Can be of [-1, 0, 1], where -1 means no default (i.e. you'll be prompted to specify what to do), 0 means never overwrite, 1 means always overwrite
|
||||
let g:jukit_convert_open_default = -1
|
||||
|
||||
let g:jukit_hist_use_ueberzug = 1
|
||||
let g:jukit_hist_use_ueberzug = 0
|
||||
" - Set to 1 to use Überzug to display saved outputs instead of an ipython split window
|
||||
let g:jukit_ueberzug_use_cached = 1
|
||||
" - Whether to cache created images of saved outputs. If set to 0, will convert saved outputs to png from scratch each time. Note that this will make displaying saved outputs significantly slower.
|
||||
@ -118,11 +149,11 @@ let g:jukit_ueberzug_jupyter_cmd = 'jupyter'
|
||||
" - path to jupyter executable. By default it just uses the jupyter command found in your environment. If you started an output split in a virtual environment, make sure that you either have jupyter installed in that environment or set the absolute path to the python3 command.
|
||||
let g:jukit_ueberzug_cutycapt_cmd = 'CutyCapt'
|
||||
" - path to cutycapt executable
|
||||
let g:jukit_ueberzug_imagemagick_cmd = 'convert'
|
||||
let g:jukit_ueberzug_imagemagick_cmd = 'magick'
|
||||
" - path to imagemagick (`convert` command) executable
|
||||
|
||||
" Nerd tree
|
||||
map <leader>n :NERDTreeToggle<CR>
|
||||
"map <leader>n :NERDTreeToggle<CR>
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
if has('nvim')
|
||||
let NERDTreeBookmarksFile = stdpath('data') . '/NERDTreeBookmarks'
|
||||
@ -139,10 +170,6 @@ let R_start_libs = 'base,stats,graphics,grDevices,utils,methods'
|
||||
let R_hl_term = 0
|
||||
" let Rout_more_colors = 1
|
||||
|
||||
" AirLatex
|
||||
" your login-name
|
||||
let g:AirLatexUsername="cookies:overleaf_session2=s%3AMANcnaAAj4VeIgXsNIiCINZ0QgwtYNzn.9x0PVRqOp8egbGYpnIHuffJUxmH%2F%2F2W%2FFnTBPmDny1M"
|
||||
|
||||
"This allows for change paste motion cp{motion}
|
||||
nmap <silent> cp :set opfunc=ChangePaste<CR>g@
|
||||
function! ChangePaste(type, ...)
|
||||
@ -150,11 +177,6 @@ function! ChangePaste(type, ...)
|
||||
silent exe "normal! p"
|
||||
endfunction
|
||||
|
||||
" optional: set server name
|
||||
let g:AirLatexDomain="www.overleaf.com"
|
||||
|
||||
let g:AirLatexAllowInsecure=0
|
||||
|
||||
" vimtex:
|
||||
let g:vimtex_view_method = 'zathura'
|
||||
let g:vimtex_compiler_latexmk = { 'build_dir' : '',
|
||||
@ -171,6 +193,7 @@ let g:vimtex_compiler_latexmk = { 'build_dir' : '',
|
||||
\ ],
|
||||
\}
|
||||
|
||||
"\ '-pdflatex="pdflatex --shell-escape %O %S"',
|
||||
|
||||
" vimling:
|
||||
"nm <leader><leader>d :call ToggleDeadKeys()<CR>
|
||||
@ -404,7 +427,7 @@ nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
||||
|
||||
|
||||
"""I like COC
|
||||
let g:coc_global_extensions = ['coc-json', 'coc-texlab', 'coc-svg', 'coc-docker', 'coc-lua', 'coc-perl', 'coc-r-lsp', 'coc-tsserver', 'coc-emmet', 'coc-clangd', 'coc-html-css-support', 'coc-go', 'coc-css', 'coc-perl', 'coc-yaml', 'coc-svelte', 'coc-sql']
|
||||
let g:coc_global_extensions = ['coc-json', 'coc-texlab', 'coc-svg', 'coc-docker', 'coc-lua', 'coc-perl', 'coc-r-lsp', 'coc-tsserver', 'coc-emmet', 'coc-clangd', 'coc-html-css-support', 'coc-go', 'coc-css', 'coc-perl', 'coc-yaml', 'coc-svelte', 'coc-sql', 'coc-sh']
|
||||
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
|
||||
" unicode characters in the file autoload/float.vim
|
||||
set encoding=utf-8
|
||||
|
34
.config/papis/config
Normal file
34
.config/papis/config
Normal file
@ -0,0 +1,34 @@
|
||||
[papers]
|
||||
dir = ~/dox/papers
|
||||
extra-bibtex-keys = ["doc_url"]
|
||||
use-git = True
|
||||
formatter = jinja2
|
||||
|
||||
# Format folder & file in format <year>-<last_name_first_author>-<paper_title>
|
||||
add-file-name = {{ doc.year }}-{{ (doc.author_list[0].family if doc.author_list else "AUTHOR_MISSING") }}-{{ ' '.join(doc.title.split()[:10]) }}
|
||||
add-folder-name = {{ doc.year }}-{{ (doc.author_list[0].family if doc.author_list else "AUTHOR_MISSING") }}-{{ ' '.join(doc.title.split()[:10]) }}
|
||||
ref-format = {{doc.author_list[0].family if doc.author_list else "AUTHOR MISSING"}}{{doc.year}}{{doc.title.title().translate(None, ' -')[:15]}}
|
||||
|
||||
# Defaults simply converted to jinja2
|
||||
header-format = <ansired>{{doc.html_escape.title}}</ansired>\n <ansigreen>{{doc.html_escape.author}}</ansigreen>\n <ansiblue>({{doc.html_escape.year}})</ansiblue> [<ansiyellow>{{doc.html_escape.tags}}</ansiyellow>]
|
||||
match-format = {{doc.tags}}{{doc.subfolder}}{{doc.title}}{{doc.author}}{{doc.year}}
|
||||
document-description-format = {{doc.title}} - {{doc.author}}
|
||||
multiple-authors-format = {{au.family}}, {{au.given}}
|
||||
browse-query-format = {{doc.title}} {{doc.author}}
|
||||
notes-name = notes.md
|
||||
|
||||
[books]
|
||||
dir = ~/dox/books
|
||||
add-file-name = {doc[author]}{doc[title]}
|
||||
use-git = True
|
||||
|
||||
[settings]
|
||||
opentool = rifle
|
||||
default-library = papers
|
||||
file-browser = ranger
|
||||
|
||||
|
||||
[tui]
|
||||
editmode = vi
|
||||
options_list.selected_margin_style = bg:ansigreen fg:ansired
|
||||
options_list.unselected_margin_style =
|
@ -3,9 +3,7 @@ username_extractor=regex_search
|
||||
regex_username=^user: (.*)$
|
||||
|
||||
[github.com]
|
||||
username=AlexBocken
|
||||
target=dev/Github_Token
|
||||
|
||||
[bocken.org]
|
||||
username=Alexander
|
||||
target=dev/personal_gitea
|
||||
[git.bocken.org]
|
||||
target=dev/Gitea_Token
|
||||
|
@ -101,7 +101,7 @@ fade-out-step = 0.03;
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 0.8;
|
||||
inactive-opacity = 1.0;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
|
@ -1,247 +0,0 @@
|
||||
# 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/wireplumber" 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" }
|
||||
]
|
@ -6,5 +6,88 @@
|
||||
|
||||
config_version: 2
|
||||
settings:
|
||||
bindings.commands:
|
||||
global:
|
||||
normal:
|
||||
',C': spawn -d st castyt {url}
|
||||
',S': spawn -d mpvallvids {url}
|
||||
',V': spawn -d startmpv {url}
|
||||
',X': spawn -d dmenuhandler {url}
|
||||
',c': hint links spawn -d st castyt {hint-url}
|
||||
',s': hint links spawn -d mpvallvids {hint-url}
|
||||
',v': hint links spawn -d startmpv {hint-url}
|
||||
',x': hint links spawn -d dmenuhandler {hint-url}
|
||||
aO: download-open;; download-remove;; close
|
||||
ao: download-open;; download-remove
|
||||
ar: download-remove
|
||||
gP: open -p {url}
|
||||
u: undo --window
|
||||
colors.webpage.darkmode.algorithm:
|
||||
global: lightness-cielab
|
||||
colors.webpage.darkmode.contrast:
|
||||
global: 0.5
|
||||
colors.webpage.darkmode.enabled:
|
||||
global: false
|
||||
colors.webpage.darkmode.threshold.background:
|
||||
global: 100
|
||||
colors.webpage.preferred_color_scheme:
|
||||
global: light
|
||||
content.cookies.accept:
|
||||
global: no-3rdparty
|
||||
content.desktop_capture:
|
||||
https://meet.bocken.org: true
|
||||
content.headers.user_agent:
|
||||
global: Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko)
|
||||
{qt_key}/{qt_version} {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}
|
||||
content.javascript.clipboard:
|
||||
global: access-paste
|
||||
content.javascript.enabled:
|
||||
global: true
|
||||
content.media.audio_capture:
|
||||
https://meet.bocken.org: true
|
||||
https://meet.piribauer.de: true
|
||||
https://teams.microsoft.com: true
|
||||
content.media.audio_video_capture:
|
||||
https://meet.bocken.org: true
|
||||
https://meet.piribauer.de: true
|
||||
https://teams.microsoft.com: true
|
||||
content.media.video_capture:
|
||||
https://meet.bocken.org: true
|
||||
https://meet.piribauer.de: true
|
||||
https://teams.microsoft.com: true
|
||||
content.notifications.enabled:
|
||||
https://cloud.bocken.org: true
|
||||
https://stream.bocken.org: true
|
||||
https://teams.microsoft.com: true
|
||||
content.pdfjs:
|
||||
global: false
|
||||
downloads.location.directory:
|
||||
global: /tmp
|
||||
downloads.location.prompt:
|
||||
global: false
|
||||
editor.command:
|
||||
global:
|
||||
- st
|
||||
- nvim
|
||||
- -f
|
||||
- '{file}'
|
||||
- -c
|
||||
- normal
|
||||
- '{line}G{column}l'
|
||||
prompt.filebrowser:
|
||||
global: true
|
||||
url.searchengines:
|
||||
global:
|
||||
DEFAULT: https://bocken.org/searx/?q={}
|
||||
brave: https://search.brave.com/search?q={}&source=web
|
||||
cactus: https://latin.cactus2000.de/index.php?q={}
|
||||
ddg: https://duckduckgo.com/?q={}
|
||||
dw: https://www.dwds.de/wb/{}
|
||||
gg: https://linggle.com/?q={}
|
||||
jisho: jisho.org/search/{}
|
||||
ling: https://www.linguee.com/english-german/search?source=auto&query={}
|
||||
nyaa: nyaa.si/?q={}
|
||||
oz: http://www.ozdic.com/collocation-dictionary/{}
|
||||
re: https://bocken.org/rezepte?q={}
|
||||
sx: https://bocken.org/searx/?q={}
|
||||
yt: https://www.youtube.com/results?search_query={}
|
||||
|
@ -7,6 +7,7 @@ c.auto_save.session = False
|
||||
c.backend = "webengine"
|
||||
c.bindings.commands = { "normal":
|
||||
{
|
||||
"<Alt-Return>": "open -t {url}",
|
||||
"u": "undo --window",
|
||||
",C": "spawn -d st castyt {url}",
|
||||
",S": "spawn -d mpvallvids {url}",
|
||||
@ -28,9 +29,10 @@ c.content.blocking.method = "both"
|
||||
c.content.desktop_capture = "ask"
|
||||
c.content.fullscreen.window = False
|
||||
|
||||
c.content.javascript.enabled = True
|
||||
#c.content.javascript.enabled = True # make editable via autoconfig
|
||||
c.content.local_content_can_access_remote_urls = True
|
||||
c.content.notifications.presenter = "libnotify"
|
||||
c.content.javascript.clipboard = "access-paste"
|
||||
|
||||
from os.path import expanduser
|
||||
c.downloads.location.directory = expanduser("~")
|
||||
@ -67,6 +69,7 @@ c.url.default_page = local_startpage
|
||||
c.url.open_base_url = True
|
||||
|
||||
searchengines = {
|
||||
"sx": "https://searx.bocken.org/?q={}",
|
||||
"brave": "https://search.brave.com/search?q={}&source=web",
|
||||
"cactus": "https://latin.cactus2000.de/index.php?q={}",
|
||||
"ddg": "https://duckduckgo.com/?q={}",
|
||||
@ -79,7 +82,7 @@ searchengines = {
|
||||
"re": "https://bocken.org/rezepte?q={}",
|
||||
"yt": "https://www.youtube.com/results?search_query={}"
|
||||
}
|
||||
searchengines["DEFAULT"] = searchengines["ddg"]
|
||||
searchengines["DEFAULT"] = searchengines["sx"]
|
||||
c.url.searchengines = searchengines
|
||||
|
||||
c.zoom.default = "160%"
|
||||
|
@ -281,13 +281,10 @@ set save_tabs_on_exit false
|
||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
||||
# the top and vice versa.
|
||||
set wrap_scroll false
|
||||
map grm cd ~/eth/hrm
|
||||
map gpm cd ~/eth/pm
|
||||
map gre cd ~/eth/recht
|
||||
map grt cd ~/eth/rt2
|
||||
map gvl cd vl
|
||||
map gus cd üs
|
||||
map gz cd zsf
|
||||
# go to path in clipboard (command: xclip -selection clipboard -o)
|
||||
map gd eval fm.cd(os.popen('xclip -selection clipboard -o').read().strip())
|
||||
# go to path of file in clipboard
|
||||
map gp eval fm.cd(os.path.dirname(os.popen('xclip -selection clipboard -o').read().strip()))
|
||||
|
||||
|
||||
map glb cd ~/.local/bin
|
||||
|
@ -89,6 +89,7 @@
|
||||
ext sc, has sc-im, X, flag t = sc-im -- "$@"
|
||||
mime text/calendar, has calcurse, flag f = calendaradd "$@"
|
||||
name ^.*\.bands\.agr$, has xmgrace, X, flag f = xmgrace -- "$@"
|
||||
ext svelte, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||
|
||||
|
||||
# Define the "editor" for text files as first action
|
||||
@ -129,7 +130,7 @@ ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||
#-------------------------------------------
|
||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video|audio, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||
|
@ -294,7 +294,7 @@ handle_mime() {
|
||||
exit 1;;
|
||||
|
||||
## Text
|
||||
text/* | */xml)
|
||||
text/*|*/xml|application/javascript)
|
||||
## Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
|
@ -36,6 +36,7 @@ export XDG_VIDEOS_DIR="$HOME/vids"
|
||||
#Various stuff
|
||||
export BIB="$XDG_DOCUMENTS_DIR/bib.bib"
|
||||
|
||||
export MATES_DIR="${XDG_DATA_HOME:-$HOME/.local/share/}/vdirsyncer/contacts/"
|
||||
#export XDG_RUNTIME_DIR="$HOME/.cache/xdg_run" # Messes up Audio for some reason, might be useful to figure out in the future how to fix
|
||||
#export XAUTHORITY="$HOME/.cache/xdg_run/Xauthority" # This line will break some DMs.
|
||||
export CHROOT="${HOME}/.local/src/chroot"
|
||||
|
19
.config/vdirsyncer/config
Normal file
19
.config/vdirsyncer/config
Normal file
@ -0,0 +1,19 @@
|
||||
[general]
|
||||
status_path = "~/.config/vdirsyncer/status/"
|
||||
|
||||
[pair nextcloud_contacts]
|
||||
a = "nextcloud_contacts_local"
|
||||
b = "nextcloud_contacts_remote"
|
||||
collections = ["from a", "from b"]
|
||||
|
||||
[storage nextcloud_contacts_local]
|
||||
type = "filesystem"
|
||||
path = "~/.local/share/vdirsyncer/"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage nextcloud_contacts_remote]
|
||||
type = "carddav"
|
||||
url = "https://cloud.bocken.org/remote.php/dav/addressbooks/users/alexander/contacts/"
|
||||
auth = "basic"
|
||||
username = "alexander"
|
||||
password.fetch = ["shell", "pass Misc/NC_vdirsyncer | head -n1"]
|
@ -14,10 +14,11 @@ autostart="picom mpd dunst unclutter dwmblocks update_musicbar pipewire remapd p
|
||||
for program in $autostart; do
|
||||
pidof -s "$program" || setsid -f "$program"
|
||||
done >/dev/null 2>&1
|
||||
sleep 30 && jellyfin-mpv-shim & # Start jellyfin-mpv-shim after 30 seconds, to ensure that internet is connected (bodged, not relevant though)
|
||||
xrandr --auto
|
||||
xrandr --dpi 180 # Set DPI. User may want to use a larger number for larger screens.
|
||||
xrandr --listactivemonitors | grep -qE '1920.*x1080.*HDMI-1-3$' && ( xrandr --output HDMI-1-3 --scale 1.666666666666 && setbg ) # set scale for 2nd monitor if connected
|
||||
|
||||
xrandr --dpi 140 # Set DPI. User may want to use a larger number for larger screens.
|
||||
sb-bright 40 # set brighntess by default to 40% instead of ~38%
|
||||
xrandr --listactivemonitors | grep -qE '1920.*x1080.*DP-7$' && ( xrandr --output DP-7 --scale 1.666666666666 && setbg ) # set scale for 2nd monitor if connected
|
||||
echo "$DBUS_SESSION_BUS_ADDRESS" > /tmp/dbus_session_bus_address
|
||||
|
||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||
|
@ -14,4 +14,6 @@ map i recolor
|
||||
map p print
|
||||
map g goto top
|
||||
map <C-s> exec zathura_backward_search.sh
|
||||
map <A-Return> exec openfilebrowser $FILE
|
||||
map <A-Return> exec "openfilebrowser $FILE"
|
||||
map <C-h> exec "movepdf $FILE"
|
||||
map y exec "copyfilepath $FILE"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#files: 827 version: 5.9
|
||||
#files: 858 version: 5.9
|
||||
|
||||
_comps=(
|
||||
'-' '_precommand'
|
||||
@ -50,6 +50,10 @@ _comps=(
|
||||
'appletviewer' '_java'
|
||||
'apropos' '_man'
|
||||
'apvlv' '_pdf'
|
||||
'archbuild' '_devtools'
|
||||
'arch-chroot' '_archinstallscripts'
|
||||
'arch-nspawn' '_devtools'
|
||||
'archrelease' '_devtools'
|
||||
'arduino-ctags' '_ctags'
|
||||
'arecord' '_alsa-utils'
|
||||
'arena' '_webbrowser'
|
||||
@ -60,6 +64,7 @@ _comps=(
|
||||
'asciidoctor' '_asciidoctor'
|
||||
'asciinema' '_asciinema'
|
||||
'ash' '_sh'
|
||||
'asp' '_asp'
|
||||
'-assign-parameter-' '_assign'
|
||||
'at' '_at'
|
||||
'atq' '_at'
|
||||
@ -88,12 +93,16 @@ _comps=(
|
||||
'bibtex' '_bibtex'
|
||||
'bindkey' '_bindkey'
|
||||
'bison' '_bison'
|
||||
'black' '_black'
|
||||
'blackd' '_blackd'
|
||||
'bluetoothctl' '_bluetoothctl'
|
||||
'bmake' '_make'
|
||||
'bogofilter' '_bogofilter'
|
||||
'bogotune' '_bogofilter'
|
||||
'bogoutil' '_bogofilter'
|
||||
'bootctl' '_bootctl'
|
||||
'borg' '_borg'
|
||||
'borgfs' '_borg'
|
||||
'bpython' '_bpython'
|
||||
'bpython2' '_bpython'
|
||||
'bpython2-gtk' '_bpython'
|
||||
@ -124,6 +133,7 @@ _comps=(
|
||||
'bunzip2' '_bzip2'
|
||||
'burst' '_mh'
|
||||
'busctl' '_busctl'
|
||||
'bwrap' '_bwrap'
|
||||
'bzcat' '_bzip2'
|
||||
'bzegrep' '_grep'
|
||||
'bzfgrep' '_grep'
|
||||
@ -149,12 +159,15 @@ _comps=(
|
||||
'ceilometer' '_openstack'
|
||||
'certtool' '_gnutls'
|
||||
'cftp' '_twisted'
|
||||
'chafa' '_chafa'
|
||||
'chage' '_users'
|
||||
'chattr' '_chattr'
|
||||
'chcon' '_chcon'
|
||||
'chdir' '_cd'
|
||||
'checkpkg' '_devtools'
|
||||
'checkupdates' '_checkupdates'
|
||||
'chfn' '_users'
|
||||
'chg' '_hg'
|
||||
'chgrp' '_chown'
|
||||
'chimera' '_webbrowser'
|
||||
'chkconfig' '_chkconfig'
|
||||
@ -188,6 +201,10 @@ _comps=(
|
||||
'-command-' '_autocd'
|
||||
'command' '_command'
|
||||
'-command-line-' '_normal'
|
||||
'commitpkg' '_devtools'
|
||||
'communitypkg' '_devtools'
|
||||
'community-stagingpkg' '_devtools'
|
||||
'community-testingpkg' '_devtools'
|
||||
'comp' '_mh'
|
||||
'compadd' '_compadd'
|
||||
'compdef' '_compdef'
|
||||
@ -201,6 +218,7 @@ _comps=(
|
||||
'configure' '_configure'
|
||||
'convert' '_imagemagick'
|
||||
'coredumpctl' '_coredumpctl'
|
||||
'corepkg' '_devtools'
|
||||
'cowsay' '_cowsay'
|
||||
'cowthink' '_cowsay'
|
||||
'cp' '_cp'
|
||||
@ -247,6 +265,7 @@ _comps=(
|
||||
'dict' '_dict'
|
||||
'diff' '_diff'
|
||||
'diff3' '_diff3'
|
||||
'diffpkg' '_devtools'
|
||||
'diffstat' '_diffstat'
|
||||
'dig' '_dig'
|
||||
'dillo' '_webbrowser'
|
||||
@ -263,8 +282,10 @@ _comps=(
|
||||
'dmesg' '_dmesg'
|
||||
'dmidecode' '_dmidecode'
|
||||
'doas' '_doas'
|
||||
'docker' '_docker'
|
||||
'domainname' '_yp'
|
||||
'dos2unix' '_dos2unix'
|
||||
'downgrade' '_downgrade'
|
||||
'drill' '_drill'
|
||||
'dropbox' '_dropbox'
|
||||
'dropdb' '_postgresql'
|
||||
@ -319,6 +340,8 @@ _comps=(
|
||||
'express' '_webbrowser'
|
||||
'extcheck' '_java'
|
||||
'extractres' '_psutils'
|
||||
'extrapkg' '_devtools'
|
||||
'extra-x86_64-build' '_devtools'
|
||||
'fakeroot' '_fakeroot'
|
||||
'false' '_nothing'
|
||||
'fc' '_fc'
|
||||
@ -333,6 +356,7 @@ _comps=(
|
||||
'filterdiff' '_patchutils'
|
||||
'find' '_find'
|
||||
'findaffix' '_ispell'
|
||||
'finddeps' '_devtools'
|
||||
'findmnt' '_findmnt'
|
||||
'finger' '_finger'
|
||||
'firefox' '_mozilla'
|
||||
@ -402,6 +426,7 @@ _comps=(
|
||||
'geany' '_geany'
|
||||
'gegrep' '_grep'
|
||||
'gem' '_gem'
|
||||
'genfstab' '_archinstallscripts'
|
||||
'genisoimage' '_genisoimage'
|
||||
'genv' '_env'
|
||||
'get' '_sccs'
|
||||
@ -453,6 +478,7 @@ _comps=(
|
||||
'gnl' '_nl'
|
||||
'gnocchi' '_openstack'
|
||||
'gnome-gv' '_gnome-gv'
|
||||
'gnome-unstable-x86_64-build' '_devtools'
|
||||
'gnumfmt' '_numfmt'
|
||||
'gnupod_addsong' '_gnupod'
|
||||
'gnupod_addsong.pl' '_gnupod'
|
||||
@ -573,6 +599,7 @@ _comps=(
|
||||
'heat' '_openstack'
|
||||
'help' '_sccs'
|
||||
'hexdump' '_hexdump'
|
||||
'hg' '_hg'
|
||||
'hilite' '_precommand'
|
||||
'histed' '_zed'
|
||||
'history' '_fc'
|
||||
@ -638,19 +665,27 @@ _comps=(
|
||||
'journalctl' '_journalctl'
|
||||
'jq' '_jq'
|
||||
'jupyter' '_jupyter'
|
||||
'kcmshell5' '_systemsettings'
|
||||
'kcmshell6' '_systemsettings'
|
||||
'kdeconnect-cli' '_kdeconnect'
|
||||
'kde-inhibit' '_kde-inhibit'
|
||||
'kde-unstable-x86_64-build' '_devtools'
|
||||
'kernel-install' '_kernel-install'
|
||||
'keystone' '_openstack'
|
||||
'keytool' '_java'
|
||||
'kfmclient' '_kfmclient'
|
||||
'khard' '_khard'
|
||||
'kill' '_kill'
|
||||
'killall' '_killall'
|
||||
'killall5' '_killall'
|
||||
'kinfocenter' '_systemsettings'
|
||||
'kioclient' '_kfmclient'
|
||||
'knock' '_knock'
|
||||
'konqueror' '_webbrowser'
|
||||
'kpartx' '_kpartx'
|
||||
'kpdf' '_pdf'
|
||||
'krunner' '_krunner'
|
||||
'kscreen-doctor' '_kscreen-doctor'
|
||||
'ksh' '_sh'
|
||||
'ksh88' '_sh'
|
||||
'ksh93' '_sh'
|
||||
@ -724,8 +759,10 @@ _comps=(
|
||||
'Mail' '_mail'
|
||||
'mailx' '_mail'
|
||||
'make' '_make'
|
||||
'makechrootpkg' '_devtools'
|
||||
'makeinfo' '_texinfo'
|
||||
'makepkg' '_pacman'
|
||||
'makerepropkg' '_devtools'
|
||||
'man' '_man'
|
||||
'manage.py' '_django'
|
||||
'manila' '_openstack'
|
||||
@ -749,6 +786,7 @@ _comps=(
|
||||
'mencal' '_mencal'
|
||||
'mere' '_mere'
|
||||
'merge' '_rcs'
|
||||
'meson' '_meson'
|
||||
'metaflac' '_flac'
|
||||
'mformat' '_mtools'
|
||||
'mgv' '_pspdf'
|
||||
@ -762,6 +800,7 @@ _comps=(
|
||||
'mhstore' '_mh'
|
||||
'mii-tool' '_mii-tool'
|
||||
'mistral' '_openstack'
|
||||
'mkarchroot' '_devtools'
|
||||
'mkdir' '_mkdir'
|
||||
'mkfifo' '_mkfifo'
|
||||
'mkinitcpio' '_mkinitcpio'
|
||||
@ -805,6 +844,11 @@ _comps=(
|
||||
'mtoolstest' '_mtools'
|
||||
'mtr' '_mtr'
|
||||
'mtype' '_mtools'
|
||||
'multilib-build' '_devtools'
|
||||
'multilibpkg' '_devtools'
|
||||
'multilib-staging-build' '_devtools'
|
||||
'multilib-testing-build' '_devtools'
|
||||
'multilib-testingpkg' '_devtools'
|
||||
'munchlist' '_ispell'
|
||||
'mupdf' '_mupdf'
|
||||
'murano' '_openstack'
|
||||
@ -863,6 +907,7 @@ _comps=(
|
||||
'nvim' '_vim'
|
||||
'objdump' '_objdump'
|
||||
'od' '_od'
|
||||
'offload-build' '_devtools'
|
||||
'ogg123' '_vorbis'
|
||||
'oggdec' '_vorbis'
|
||||
'oggenc' '_vorbis'
|
||||
@ -882,6 +927,7 @@ _comps=(
|
||||
'pacat' '_pulseaudio'
|
||||
'paccache' '_paccache'
|
||||
'pacdiff' '_pacdiff'
|
||||
'pacignore' '_pacignore'
|
||||
'pack' '_pack'
|
||||
'packf' '_mh'
|
||||
'paclist' '_paclist'
|
||||
@ -894,11 +940,14 @@ _comps=(
|
||||
'pacscripts' '_pacscripts'
|
||||
'pacsearch' '_pacsearch'
|
||||
'pacsort' '_pacsort'
|
||||
'pacstrap' '_archinstallscripts'
|
||||
'pactl' '_pulseaudio'
|
||||
'pactree' '_pactree'
|
||||
'padsp' '_pulseaudio'
|
||||
'pandoc' '_pandoc'
|
||||
'papis' '_papis'
|
||||
'paplay' '_pulseaudio'
|
||||
'parallel' '_parallel'
|
||||
'-parameter-' '_parameter'
|
||||
'parec' '_pulseaudio'
|
||||
'parecord' '_pulseaudio'
|
||||
@ -908,6 +957,7 @@ _comps=(
|
||||
'paste' '_paste'
|
||||
'pasuspender' '_pulseaudio'
|
||||
'patch' '_patch'
|
||||
'patchelf' '_patchelf'
|
||||
'pax' '_pax'
|
||||
'pcat' '_pack'
|
||||
'pcp-htop' '_htop'
|
||||
@ -915,6 +965,7 @@ _comps=(
|
||||
'pdf2dsc' '_pdf'
|
||||
'pdf2ps' '_pdf'
|
||||
'pdffonts' '_pdf'
|
||||
'pdfgrep' '_pdfgrep'
|
||||
'pdfimages' '_pdf'
|
||||
'pdfinfo' '_pdf'
|
||||
'pdfjadetex' '_tex'
|
||||
@ -953,9 +1004,11 @@ _comps=(
|
||||
'ping6' '_ping'
|
||||
'pkgadd' '_pkgadd'
|
||||
'pkg-config' '_pkg-config'
|
||||
'pkgctl' '_devtools'
|
||||
'pkginfo' '_pkginfo'
|
||||
'pkgrm' '_pkgrm'
|
||||
'pkill' '_pgrep'
|
||||
'plasmashell' '_plasmashell'
|
||||
'pldd' '_pids'
|
||||
'pmake' '_make'
|
||||
'pman' '_perl_modules'
|
||||
@ -972,6 +1025,7 @@ _comps=(
|
||||
'podgrep' '_perl_modules'
|
||||
'podpath' '_perl_modules'
|
||||
'podtoc' '_perl_modules'
|
||||
'poetry' '_poetry'
|
||||
'poff' '_pon'
|
||||
'policytool' '_java'
|
||||
'pon' '_pon'
|
||||
@ -1026,7 +1080,7 @@ _comps=(
|
||||
'pyhtmlizer' '_twisted'
|
||||
'qdbus' '_qdbus'
|
||||
'qiv' '_qiv'
|
||||
'_qrcp' '_qrcp'
|
||||
'qpdf' '_qpdf'
|
||||
'qrcp' '_qrcp'
|
||||
'quilt' '_quilt'
|
||||
'r' '_fc'
|
||||
@ -1147,6 +1201,7 @@ _comps=(
|
||||
'showchar' '_psutils'
|
||||
'showmount' '_showmount'
|
||||
'shred' '_shred'
|
||||
'shtab' '_shtab'
|
||||
'shuf' '_shuf'
|
||||
'shutdown' '_shutdown'
|
||||
'sisu' '_sisu'
|
||||
@ -1165,6 +1220,7 @@ _comps=(
|
||||
'smbstatus' '_samba'
|
||||
'soa' '_hosts'
|
||||
'socket' '_socket'
|
||||
'sogrep' '_devtools'
|
||||
'sort' '_sort'
|
||||
'sortm' '_mh'
|
||||
'source' '_source'
|
||||
@ -1184,6 +1240,8 @@ _comps=(
|
||||
'sshfs' '_sshfs'
|
||||
'ssh-keygen' '_ssh'
|
||||
'ssh-keyscan' '_ssh'
|
||||
'stagingpkg' '_devtools'
|
||||
'staging-x86_64-build' '_devtools'
|
||||
'star' '_tar'
|
||||
'start' '_initctl'
|
||||
'stat' '_stat'
|
||||
@ -1235,6 +1293,7 @@ _comps=(
|
||||
'systemd-run' '_systemd-run'
|
||||
'systemd-tmpfiles' '_systemd-tmpfiles'
|
||||
'systemd-tty-ask-password-agent' '_systemd'
|
||||
'systemsettings' '_systemsettings'
|
||||
'tac' '_tac'
|
||||
'tacker' '_openstack'
|
||||
'tail' '_tail'
|
||||
@ -1251,6 +1310,8 @@ _comps=(
|
||||
'tdr' '_devtodo'
|
||||
'tee' '_tee'
|
||||
'telnet' '_telnet'
|
||||
'testingpkg' '_devtools'
|
||||
'testing-x86_64-build' '_devtools'
|
||||
'tex' '_tex'
|
||||
'texi2any' '_texinfo'
|
||||
'texi2dvi' '_texinfo'
|
||||
@ -1268,6 +1329,7 @@ _comps=(
|
||||
'tkconch' '_twisted'
|
||||
'tkinfo' '_texinfo'
|
||||
'tla' '_tla'
|
||||
'tldr' '_tldr'
|
||||
'tload' '_tload'
|
||||
'tmux' '_tmux'
|
||||
'todo' '_devtodo'
|
||||
@ -1285,7 +1347,6 @@ _comps=(
|
||||
'transmission-remote' '_transmission'
|
||||
'trap' '_trap'
|
||||
'tree' '_tree'
|
||||
'tremc' '_tremc'
|
||||
'trial' '_twisted'
|
||||
'trove' '_openstack'
|
||||
'true' '_nothing'
|
||||
@ -1305,6 +1366,7 @@ _comps=(
|
||||
'type' '_which'
|
||||
'typeset' '_typeset'
|
||||
'udevadm' '_udevadm'
|
||||
'udisksctl' '_udisks2'
|
||||
'ulimit' '_ulimit'
|
||||
'uml_mconsole' '_uml'
|
||||
'uml_moo' '_uml'
|
||||
@ -1443,6 +1505,7 @@ _comps=(
|
||||
'wipefs' '_wipefs'
|
||||
'wodim' '_cdrecord'
|
||||
'wpa_cli' '_wpa_cli'
|
||||
'wpctl' '_wpctl'
|
||||
'write' '_users_on'
|
||||
'www' '_webbrowser'
|
||||
'xargs' '_xargs'
|
||||
@ -1565,8 +1628,15 @@ _comps=(
|
||||
|
||||
_services=(
|
||||
'bzcat' 'bunzip2'
|
||||
'communitypkg' 'commitpkg'
|
||||
'community-stagingpkg' 'commitpkg'
|
||||
'community-testingpkg' 'commitpkg'
|
||||
'corepkg' 'commitpkg'
|
||||
'extrapkg' 'commitpkg'
|
||||
'extra-x86_64-build' 'archbuild'
|
||||
'gchgrp' 'chgrp'
|
||||
'gchown' 'chown'
|
||||
'gnome-unstable-x86_64-build' 'archbuild'
|
||||
'gnupod_addsong.pl' 'gnupod_addsong'
|
||||
'gnupod_check.pl' 'gnupod_check'
|
||||
'gnupod_INIT.pl' 'gnupod_INIT'
|
||||
@ -1574,11 +1644,17 @@ _services=(
|
||||
'gpg2' 'gpg'
|
||||
'gzcat' 'gunzip'
|
||||
'iceweasel' 'firefox'
|
||||
'kde-unstable-x86_64-build' 'archbuild'
|
||||
'lzcat' 'unxz'
|
||||
'lzma' 'xz'
|
||||
'Mail' 'mail'
|
||||
'mailx' 'mail'
|
||||
'mktunes.pl' 'mktunes'
|
||||
'multilib-build' 'archbuild'
|
||||
'multilibpkg' 'commitpkg'
|
||||
'multilib-staging-build' 'archbuild'
|
||||
'multilib-testing-build' 'archbuild'
|
||||
'multilib-testingpkg' 'commitpkg'
|
||||
'nail' 'mail'
|
||||
'ncl' 'nc'
|
||||
'nedit-nc' 'nc'
|
||||
@ -1598,9 +1674,13 @@ _services=(
|
||||
'-redirect-,>,xz' 'unxz'
|
||||
'remsh' 'rsh'
|
||||
'slogin' 'ssh'
|
||||
'stagingpkg' 'commitpkg'
|
||||
'staging-x86_64-build' 'archbuild'
|
||||
'svnadmin-static' 'svnadmin'
|
||||
'svnlite' 'svn'
|
||||
'svnliteadmin' 'svnadmin'
|
||||
'testingpkg' 'commitpkg'
|
||||
'testing-x86_64-build' 'archbuild'
|
||||
'tunes2pod.pl' 'tunes2pod'
|
||||
'unlzma' 'unxz'
|
||||
'xelatex' 'latex'
|
||||
@ -1632,6 +1712,7 @@ _postpatcomps=(
|
||||
'shasum(|5).*' '_shasum'
|
||||
'(texi(2*|ndex))' '_texi'
|
||||
'(tiff*|*2tiff|pal2rgb)' '_tiff'
|
||||
'-value-,BORG_*,-default-' '_borg'
|
||||
'-value-,(ftp|http(|s))_proxy,-default-' '_urls'
|
||||
'-value-,LC_*,-default-' '_locales'
|
||||
'-value-,*path,-default-' '_directories'
|
||||
@ -1677,18 +1758,24 @@ bindkey '^[,' _history-complete-newer
|
||||
bindkey '^[/' _history-complete-older
|
||||
bindkey '^[~' _bash_complete-word
|
||||
|
||||
autoload -Uz _bat _bluetoothctl _bootctl _bun _busctl \
|
||||
_cargo _checkupdates _coredumpctl _curl _email-notmuch \
|
||||
_hostnamectl _img2sixel _journalctl _jupyter _kernel-install \
|
||||
_libinput _localectl _loginctl _machinectl _mkinitcpio \
|
||||
_mpv _mutt-wizard.zsh _networkctl _ninja _notmuch \
|
||||
_oomctl _paccache _pacdiff _paclist _paclog-pkglist \
|
||||
_pacman _pacscripts _pacsearch _pacsort _pactree \
|
||||
_paru _pass _pulseaudio _qrcp _rankmirrors \
|
||||
_rclone _resolvectl _sd_hosts_or_user_at_host _sd_machines _sd_outputmodes \
|
||||
_sd_unit_files _systemctl _systemd _systemd-analyze _systemd-delta \
|
||||
_systemd-inhibit _systemd-nspawn _systemd-path _systemd-run _systemd-tmpfiles \
|
||||
_timedatectl _tremc _udevadm _updpkgsums _xwallpaper \
|
||||
autoload -Uz _archinstallscripts _asp _bat _black _blackd \
|
||||
_bluetoothctl _bootctl _borg _bun _busctl \
|
||||
_bwrap _cargo _chafa _checkupdates _coredumpctl \
|
||||
_curl _devtools _docker _downgrade _email-khard \
|
||||
_email-notmuch _hg _hostnamectl _img2sixel _journalctl \
|
||||
_jupyter _kde-inhibit _kernel-install _khard _krunner \
|
||||
_kscreen-doctor _libinput _localectl _loginctl _machinectl \
|
||||
_meson _mkinitcpio _mpv _mutt-wizard.zsh _networkctl \
|
||||
_ninja _notmuch _oomctl _paccache _pacdiff \
|
||||
_pacignore _paclist _paclog-pkglist _pacman _pacscripts \
|
||||
_pacsearch _pacsort _pactree _papis _parallel \
|
||||
_paru _pass _patchelf _pdfgrep _pip \
|
||||
_plasmashell _poetry _pulseaudio _qpdf _qrcp \
|
||||
_rankmirrors _rclone _resolvectl _sd_hosts_or_user_at_host _sd_machines \
|
||||
_sd_outputmodes _sd_unit_files _shtab _systemctl _systemd \
|
||||
_systemd-analyze _systemd-delta _systemd-inhibit _systemd-nspawn _systemd-path \
|
||||
_systemd-run _systemd-tmpfiles _systemsettings _timedatectl _tldr \
|
||||
_udevadm _udisks2 _updpkgsums _wpctl _xwallpaper \
|
||||
_yay _yt-dlp _zathura _cdr _all_labels \
|
||||
_all_matches _alternative _approximate _arg_compile _arguments \
|
||||
_bash_completions _cache_invalid _call_function _combination _complete \
|
||||
|
@ -6,10 +6,7 @@
|
||||
|
||||
#automatically scale HD screens to better work with hidpi
|
||||
scale_factor_HD=${1:-1.6666}
|
||||
scale_outputs="HDMI-3
|
||||
DP-2
|
||||
HDMI-1-3
|
||||
DP1-2"
|
||||
scale_outputs="HDMI-1 DP-7"
|
||||
|
||||
|
||||
#fixes issue that script gets called twice for some reason
|
||||
@ -45,7 +42,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary")
|
||||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
if $(echo "$scale_outputs" | grep -q "$primary"); then
|
||||
if echo "$scale_outputs" | grep -q "$primary"; then
|
||||
xrandr --output "$primary" --auto --scale $scale_factor_HD --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
elif $(echo "$scale_outputs" | grep -q "$seconday"); then
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale $scale_factor_HD
|
||||
|
@ -3,21 +3,18 @@ PASS_DIR=Misc/SaferVPN
|
||||
USER='alexander@bocken.org'
|
||||
ETH_user="abocken@student-net.ethz.ch"
|
||||
ETH_password_path="ETH/VPN"
|
||||
ETH_OTP_path="OTP/nETHz"
|
||||
|
||||
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -i -p 'connect with which vpn server?' -l 10)"
|
||||
[ -z "$choice" ] && exit
|
||||
if [ "$choice" = "ETH" ]; then
|
||||
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
||||
transmission-remote -u 0
|
||||
transmission-remote -d 0
|
||||
pass "$ETH_password_path" | sudo openconnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||
printf "%s\n%s\n" "$(pass "$ETH_password_path")" "$(pass otp "$ETH_OTP_path")" | sudo openconnect --useragent=AnyConnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||
if ping -c 3 -W 3 -q webprint.ethz.ch ;then
|
||||
notify-send "ETH VPN" "ETH VPN connected"
|
||||
fi
|
||||
elif ping -c 1 -W 2 -q webprint.ethz.ch ;then
|
||||
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
||||
transmission-remote -U
|
||||
transmission-remote -D
|
||||
fi
|
||||
else
|
||||
printf '%s\n%s\n' "$USER" "$(pass $PASS_DIR)" > /tmp/tmp_pass
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
DBUS_SESSION_BUS_ADDRESS=$(cat /tmp/dbus_session_bus_address)
|
||||
export DBUS_SESSION_BUS_ADDRESS
|
||||
export DISPLAY=:0.0
|
||||
export DBUS_SESSION_BUS_ADDRESS=$(cat /tmp/dbus_session_bus_address)
|
||||
#export DISPLAY=:0.0
|
||||
newsboat -x reload & pid=$!
|
||||
sleep 120
|
||||
kill -15 $pid
|
||||
|
@ -5,8 +5,8 @@
|
||||
VIRTUAL_PRINTER_DIR="/var/spool/cups-pdf/$USER"
|
||||
# Printer to print magazine layout on
|
||||
PRINTER="Canon-MF220"
|
||||
PRINTER=Virtual_PDF_Printer
|
||||
file="$@"
|
||||
#PRINTER=Virtual_PDF_Printer
|
||||
file="$1"
|
||||
lpr -P Virtual_PDF_Printer -o number-up=2 -o orientation-requested=4 -o fit-to-page -o media=a4 "$file"
|
||||
str="."
|
||||
until lpc status | grep -A 4 'Virtual_PDF_Printer:' | tail -n1 | grep 'no entries'; do
|
||||
|
2
.local/bin/scanner
Executable file
2
.local/bin/scanner
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
QT_SCALE_FACTOR=1.6666666666666666 skanlite
|
@ -23,9 +23,10 @@ do
|
||||
echo "Error. Capacity:$capacity" > /dev/stderr &&
|
||||
continue
|
||||
# do not display full batteries (nice to unclutter status bars for laptops mostly used stationiary)
|
||||
[ "$capacity" -eq 100 ] &&
|
||||
printf '\n' &&
|
||||
if [ "$capacity" -eq 100 ] || grep -q "Full" "$battery"/status; then
|
||||
printf '\n'
|
||||
continue
|
||||
fi
|
||||
|
||||
unset status
|
||||
status=$(sed "s/Not charging/🛑/" "$battery"/status)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
pgrep openconnect > /dev/null || if ping -c 1 -W 1 -q webprint.ethz.ch > /dev/null
|
||||
if ping -c 1 -W 1 -q webprint.ethz.ch > /dev/null;
|
||||
then
|
||||
printf '🔬'
|
||||
fi
|
||||
|
@ -8,21 +8,21 @@ echo "syncclouds.sh: moodle-dl"
|
||||
# remove lock file if moodle-dl is not running
|
||||
pgrep -x moodle-dl || [ -f ~/eth/.moodle/running.lock ] && rm ~/eth/.moodle/running.lock
|
||||
cd ~/eth/.moodle && moodle-dl
|
||||
} > /dev/null 2>&1 &
|
||||
}
|
||||
moodle_pid=$!
|
||||
|
||||
# sync nextcloud drive
|
||||
echo "syncclouds.sh: nextcloudcmd"
|
||||
{
|
||||
nextcloudcmd -s -u "alexander@bocken.org" --password "$(pass server/seenas/nextcloud_admin_pass | head -n1)" ~/dox/nextcloud https://cloud.bocken.org
|
||||
} > /dev/null 2>&1 &
|
||||
nextcloudcmd -u "alexander" --password "$(pass show Misc/nextcloud_token | head -n1)" ~/dox/nextcloud https://cloud.bocken.org
|
||||
}
|
||||
nextcloud_pid=$!
|
||||
|
||||
# sync contacts to nextcloud
|
||||
echo "syncclouds.sh: vdirsyncer"
|
||||
{
|
||||
vdirsyncer sync
|
||||
} > /dev/null 2>&1 &
|
||||
}
|
||||
vdirsyncer_pid=$!
|
||||
|
||||
# sync calendar to nextcloud
|
||||
@ -30,8 +30,8 @@ echo "syncclouds.sh: calcurse-caldav"
|
||||
{
|
||||
# remove lock file if calcurse-caldav is not running
|
||||
pgrep -x calcurse-caldav || [ -f ~/.local/share/calcurse/caldav/lock ] && rm ~/.local/share/calcurse/caldav/lock
|
||||
CALCURSE_CALDAV_PASSWORD=$(pass server/seenas/nextcloud_admin_pass) calcurse-caldav
|
||||
} > /dev/null 2>&1 &
|
||||
CALCURSE_CALDAV_PASSWORD=$(pass Misc/calcurse_token) calcurse-caldav
|
||||
}
|
||||
calcurse_pid=$!
|
||||
|
||||
# Wait for all processes to complete and print a message for each one
|
||||
|
@ -4,21 +4,10 @@ for file in $@; do
|
||||
INPUTPDF=/tmp/file.pdf
|
||||
cp -f "$file" $INPUTPDF
|
||||
printf '\\documentclass[a4paper,final]{article}
|
||||
\\usepackage{pdfpages}
|
||||
\\usepackage{ifpdf,ifxetex,everyshi}
|
||||
\\makeatletter
|
||||
\\ifpdf
|
||||
\\EveryShipout{\\ifodd\\c@page\\else\\pdfpageattr{/Rotate 180}\\fi}%%
|
||||
\\fi
|
||||
\\ifxetex
|
||||
\\EveryShipout{\\ifodd\\c@page\\special{pdf: put @thispage << /Rotate 180 >>}%%
|
||||
\\fi
|
||||
}
|
||||
\\fi
|
||||
\\makeatother
|
||||
\\begin{document}
|
||||
\\includepdf[pages=-, nup=1x2, booklet=true, landscape]{%s}
|
||||
\\end{document}' "$INPUTPDF" > /tmp/tmp$$.tex
|
||||
\\usepackage{pdfpages}
|
||||
\\begin{document}
|
||||
\\includepdf[pages=-, nup=2x1, booklet=true, landscape]{%s}
|
||||
\\end{document}' "$INPUTPDF" > /tmp/tmp$$.tex
|
||||
cd /tmp || exit
|
||||
pdflatex /tmp/tmp$$.tex
|
||||
only_filename="$(echo "$file" | awk -F/ '{print $NF}')"
|
||||
|
3
.local/bin/tools/copyfilepath
Executable file
3
.local/bin/tools/copyfilepath
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
printf %s "$*" | xclip -selection clipboard &&
|
||||
notify-send "Copied to clipboard: $*"
|
@ -11,7 +11,7 @@ makepathabsolute(){
|
||||
echo "$dl_location"
|
||||
}
|
||||
|
||||
choices="$(printf 'mpv\ncopy url\nqueue download\nrifle file\nqueue youtube-dl\nbrowser\nrip media\ncast')"
|
||||
choices="$(printf 'mpv\ncopy url\nqueue download\nrifle file\nqueue youtube-dl\nbrowser\nrip media\ncast\nadd torrent\n')"
|
||||
if echo "$1" | grep -q "4chan"; then
|
||||
choices="$(printf '%s\nwatch thread' "$choices")"
|
||||
fi
|
||||
@ -38,7 +38,13 @@ case "$choice" in
|
||||
mkdir -p "$(makepathabsolute "$dest")"
|
||||
threadwatcher add "$1" "$dest" &
|
||||
notify-send "dmenuhandler" "Thread watcher started. Download initialized.";;
|
||||
"rip media") dest="$(dmenuinput 'name of folder:')"
|
||||
lynx --dump --nonumbers --listonly "$1" | grep -E "\.(webm|mp4|gif|jpg|jpeg|png|pdf|epub|mobi|djvu)" | sort -u | xargs wget -P "$(makepathabsolute "$dest")"
|
||||
notify-send "dmenuhandler" "all media ripped into $dest";;
|
||||
"rip media") dest="$(dmenuinput 'name of folder:')"
|
||||
lynx --dump --nonumbers --listonly "$1" | grep -E "\.(webm|mp4|gif|jpg|jpeg|png|pdf|epub|mobi|djvu)" | sort -u | xargs wget -P "$(makepathabsolute "$dest")"
|
||||
notify-send "dmenuhandler" "all media ripped into $dest";;
|
||||
"add torrent") echo "$1" | grep -q '^magnet:' && transadd "$1"
|
||||
if echo "$1" | grep -q "\.torrent$"; then
|
||||
curl -L "$1" -o "/tmp/torrentfile"
|
||||
transadd "/tmp/torrentfile"
|
||||
rm "/tmp/torrentfile"
|
||||
fi
|
||||
esac
|
||||
|
9
.local/bin/tools/movepdf
Executable file
9
.local/bin/tools/movepdf
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
file="$1"
|
||||
dest="$(find "$HOME" -maxdepth 5 -type d -not -path "$HOME/.*" | dmenu -i -p 'move to folder:')"
|
||||
if ! [ -d "$dest" ]; then
|
||||
mkdir -p "$dest"
|
||||
fi
|
||||
echo $dest
|
||||
echo $file
|
||||
mv "$file" "$dest"
|
@ -14,6 +14,17 @@ if echo "$1" | grep -qE 'youtube.*list'; then
|
||||
sed 's/^/https:\/\/www.youtube.com\/watch?v=/' |
|
||||
xargs mpv --ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best' ||
|
||||
notify-send "startmpv" "An error has occured with playlist $playlist_id"
|
||||
elif echo "$1" | grep -qE 'rumble.com'; then
|
||||
notify-send "startmpv" "Rumble videos are not supported by mpv, first ripping, then playing..."
|
||||
(
|
||||
cd /tmp
|
||||
yt-dlp "$1" &
|
||||
# get the filename of the downloaded video
|
||||
filename="$(yt-dlp -e "$1")"
|
||||
sleep 5
|
||||
mpv /tmp/$filename*part
|
||||
rm /tmp/$filename*part
|
||||
)
|
||||
else
|
||||
mpv --ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best' "$1"
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+12 dwmblocks)
|
||||
|
||||
host=https://bocken.org/transmission
|
||||
host=https://bocken.org/transmission/rpc
|
||||
user=alex
|
||||
password=$(pass show server/seenas/transmission)
|
||||
transmission-remote $host -n $user:$password -a "$@" && notify-send "🔽 Torrent added."
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
while true; do
|
||||
mpc idle player > /dev/null
|
||||
pkill -RTMIN+11 dwmblocks
|
||||
pkill -RTMIN+8 dwmblocks
|
||||
done
|
||||
|
@ -1,26 +1,6 @@
|
||||
[MIME Cache]
|
||||
application/pdf=chromium.desktop;wine-extension-pdf.desktop;
|
||||
application/rdf+xml=chromium.desktop;
|
||||
application/rss+xml=chromium.desktop;
|
||||
application/rtf=wine-extension-rtf.desktop;
|
||||
application/vnd.ms-htmlhelp=wine-extension-chm.desktop;
|
||||
application/winhlp=wine-extension-hlp.desktop;
|
||||
application/x-mswinurl=wine-extension-url.desktop;
|
||||
application/x-mswrite=wine-extension-wri.desktop;
|
||||
application/x-wine-extension-ini=wine-extension-ini.desktop;
|
||||
application/x-wine-extension-msp=wine-extension-msp.desktop;
|
||||
application/xhtml+xml=chromium.desktop;
|
||||
application/xhtml_xml=chromium.desktop;
|
||||
application/xml=chromium.desktop;wine-extension-xml.desktop;
|
||||
image/gif=chromium.desktop;wine-extension-gif.desktop;
|
||||
image/jpeg=chromium.desktop;wine-extension-jfif.desktop;wine-extension-jpe.desktop;
|
||||
image/png=chromium.desktop;wine-extension-png.desktop;
|
||||
image/webp=chromium.desktop;
|
||||
text/html=browser.desktop;chromium.desktop;wine-extension-htm.desktop;
|
||||
text/plain=wine-extension-txt.desktop;
|
||||
text/vbscript=wine-extension-vbs.desktop;
|
||||
text/xml=chromium.desktop;
|
||||
text/html=browser.desktop;
|
||||
x-scheme-handler/about=browser.desktop;
|
||||
x-scheme-handler/http=browser.desktop;chromium.desktop;
|
||||
x-scheme-handler/https=browser.desktop;chromium.desktop;
|
||||
x-scheme-handler/http=browser.desktop;
|
||||
x-scheme-handler/https=browser.desktop;
|
||||
x-scheme-handler/unknown=browser.desktop;
|
||||
|
@ -7,12 +7,12 @@
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
setInterval(() => {
|
||||
const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
|
||||
if (btn) {
|
||||
btn.click()
|
||||
}
|
||||
document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')?.click()
|
||||
const ad = [...document.querySelectorAll('.ad-showing')][0];
|
||||
if (ad) {
|
||||
document.querySelector('video').playbackRate = 10;
|
||||
}
|
||||
setTimeout( () => {
|
||||
document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')?.click()
|
||||
}, 5000)
|
||||
}, 50)
|
||||
|
@ -0,0 +1,266 @@
|
||||
// ==UserScript==
|
||||
// @name photoprism bulkeditor
|
||||
// @version 0.1
|
||||
// @description bulkeditor
|
||||
// @author andy@boeckler.org
|
||||
// @match https://*/library/browse*
|
||||
// @match https://*/library/all*
|
||||
// @match https://*/library/albums/*/view*
|
||||
// @match https://*/library/favorites*
|
||||
// @namespace https://bilder.bocken.org/
|
||||
// @updateURL https://gist.github.com/boecko/e2d0effe7c61976c22e6bc0a8ee645c7/raw/photoprismbulkeditor.user.js
|
||||
// @downloadURL https://gist.github.com/boecko/e2d0effe7c61976c22e6bc0a8ee645c7/raw/photoprismbulkeditor.user.js
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
// from https://gist.github.com/stephenchew/b73ecc75b77a84a92fa350048d5ca84f
|
||||
//------- START
|
||||
const isDefined = (value) => typeof value !== 'undefined' && value !== null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns `true` if the field is set, `false` otherwise
|
||||
*/
|
||||
const updateField = (data, field) => {
|
||||
const type = data[field].type;
|
||||
const value = data[field].content;
|
||||
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const element = document.forms[0].__vue__._data.inputs.find((element) =>
|
||||
element.$el.className.includes(`input-${field}`)
|
||||
);
|
||||
|
||||
switch (type.toLowerCase()) {
|
||||
case 'prepend':
|
||||
element.internalValue = value + ' ' + element.internalValue;
|
||||
break;
|
||||
case 'append':
|
||||
element.internalValue += ' ' + value;
|
||||
break;
|
||||
case 'replace':
|
||||
element.internalValue = value;
|
||||
break;
|
||||
default:
|
||||
console.error(`'${type}' is not a valid way of updating a field.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const runBulk = async (data) => {
|
||||
const validation = validateData(data);
|
||||
|
||||
if (validation) {
|
||||
console.error('There is an error in the data:\n\n' + validation);
|
||||
return;
|
||||
}
|
||||
|
||||
console.time('bulk-edit');
|
||||
|
||||
try {
|
||||
const pause = async (seconds) => new Promise((r) => setTimeout(r, seconds * 500));
|
||||
|
||||
let count = 0;
|
||||
|
||||
do {
|
||||
let dirty = false;
|
||||
|
||||
if (window.interrupt) {
|
||||
alert('Execution interrupted by user.');
|
||||
delete window.interrupt;
|
||||
return;
|
||||
}
|
||||
|
||||
for (let field of Object.keys(data)) {
|
||||
dirty |= updateField(data, field);
|
||||
}
|
||||
|
||||
if (!dirty) {
|
||||
console.warn('No field was set. Nothing has changed.');
|
||||
return;
|
||||
}
|
||||
|
||||
const applyButton = document.querySelector('button.action-apply');
|
||||
applyButton.click();
|
||||
count++;
|
||||
|
||||
const rightButton = document.querySelector('.v-toolbar__items .action-next');
|
||||
if (rightButton.disabled) {
|
||||
break;
|
||||
}
|
||||
|
||||
await pause(1);
|
||||
rightButton.click();
|
||||
await pause(1);
|
||||
} while (true);
|
||||
|
||||
const doneButton = document.querySelector('button.action-done');
|
||||
doneButton.click();
|
||||
|
||||
console.info(`Bulk edited ${count} photos.`);
|
||||
} finally {
|
||||
console.timeEnd('bulk-edit');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return LF delimited error message, or `null` if all is good.
|
||||
*/
|
||||
const validateData = (data) => {
|
||||
if (!data) {
|
||||
return 'No data provided.';
|
||||
}
|
||||
|
||||
const error = [];
|
||||
|
||||
if (isDefined(data.day?.content)) {
|
||||
const day = parseInt(data.day.content, 10);
|
||||
if (isNaN(day) || day < -1 || day > 31 || day === 0) {
|
||||
error.push('Day must be between 1 and 31. Set to -1 for "Unknown".');
|
||||
}
|
||||
data.day.type = 'replace';
|
||||
}
|
||||
|
||||
if (isDefined(data.month?.content)) {
|
||||
const month = parseInt(data.month.content, 10);
|
||||
if (isNaN(month) || month < -1 || month > 12 || month === 0) {
|
||||
error.push('Month must be between 1 and 12. Set to -1 for "Unknown".');
|
||||
}
|
||||
data.month.type = 'replace';
|
||||
}
|
||||
|
||||
if (isDefined(data.year?.content)) {
|
||||
const year = parseInt(data.year.content, 10);
|
||||
const currentYear = new Date().getFullYear();
|
||||
if ((isNaN(year) || year < 1750 || year > currentYear) && year !== -1) {
|
||||
// 1750 is Photoprism defined year
|
||||
error.push('Year must be between 1750 and ' + currentYear + '. Set to -1 for "Unknown".');
|
||||
}
|
||||
data.year.type = 'replace';
|
||||
}
|
||||
|
||||
return error.length > 0 ? error.join('\n') : null;
|
||||
};
|
||||
//------- END
|
||||
|
||||
const runGpsBulkUpdate = async (url) => {
|
||||
if(!url) return
|
||||
let m = url.match(/@(.*)z/)
|
||||
if( !m[1] ) {
|
||||
console.warn("URL ist falsch", url)
|
||||
return
|
||||
}
|
||||
let gpsCoords = m[1].split(',')
|
||||
let data = {
|
||||
latitude: {
|
||||
content: gpsCoords[0],
|
||||
type: 'replace'
|
||||
},
|
||||
longitude: {
|
||||
content: gpsCoords[1],
|
||||
type: 'replace'
|
||||
},
|
||||
altitude: {
|
||||
content: 0,
|
||||
type: 'replace'
|
||||
}
|
||||
}
|
||||
if(gpsCoords[2] && gpsCoords[2].match(/^\d+$/)) {
|
||||
data.altitude = {
|
||||
content: gpsCoords[2],
|
||||
type: 'replace'
|
||||
}
|
||||
}
|
||||
console.log('runBulk', data);
|
||||
return await runBulk(data);
|
||||
// return true;
|
||||
}
|
||||
|
||||
const runKeywordBulkUpdate = async () => {
|
||||
let keywords = prompt("Keywords?")
|
||||
if(!keywords) return
|
||||
let data = {
|
||||
keywords: {
|
||||
content: keywords,
|
||||
type: 'append',
|
||||
}
|
||||
}
|
||||
return await runBulk(data);
|
||||
// return true;
|
||||
}
|
||||
|
||||
//------- greasmonkey code
|
||||
const BTN_STYLE_1 = 'cursor: pointer; border: solid white'
|
||||
const BTN_STYLE_2 = 'cursor: pointer; border: solid white; opacity:0.5'
|
||||
const checkBoxes = {}
|
||||
const inputs = {}
|
||||
let submitNode = null
|
||||
let bulkRunning = false
|
||||
async function submitHandler(e) {
|
||||
e.preventDefault()
|
||||
let bulkData = {}
|
||||
for(let name in checkBoxes) {
|
||||
if(!checkBoxes[name].checked) continue
|
||||
bulkData[name] = {
|
||||
content: inputs[name].value,
|
||||
type: 'replace'
|
||||
}
|
||||
}
|
||||
if(Object.keys(bulkData).length == 0) return;
|
||||
submitNode.disabled = true
|
||||
submitNode.setAttribute('style', BTN_STYLE_2);
|
||||
bulkRunning = true
|
||||
await runBulk(bulkData);
|
||||
bulkRunning = false
|
||||
}
|
||||
|
||||
function addSubmitIfMissing() {
|
||||
const selector = '.input-title input[type=text]'
|
||||
let inputNode = document.querySelector(selector)
|
||||
if( inputNode==null || inputNode.offsetParent == null) return
|
||||
if(inputNode.nextSibling) return
|
||||
|
||||
let newSubmit = document.createElement('input');
|
||||
newSubmit.setAttribute('type', 'submit');
|
||||
newSubmit.setAttribute('value', 'Bulkchange');
|
||||
newSubmit.setAttribute('style', BTN_STYLE_1);
|
||||
inputNode.parentNode.append(newSubmit);
|
||||
newSubmit.onclick = submitHandler
|
||||
submitNode = newSubmit
|
||||
}
|
||||
function addCheckBoxIfMissing(name) {
|
||||
const selector = '.input-' + name + ' input[type=text]'
|
||||
let inputNode = document.querySelector(selector)
|
||||
// wenn da und nicht unsichtbar
|
||||
if( inputNode==null || inputNode.offsetParent == null) return
|
||||
if(inputNode.nextSibling) return
|
||||
|
||||
let newCheckBox = document.createElement('input');
|
||||
newCheckBox.setAttribute('type', 'checkbox');
|
||||
inputNode.parentNode.append(newCheckBox);
|
||||
checkBoxes[name] = newCheckBox
|
||||
inputs[name] = inputNode
|
||||
}
|
||||
|
||||
var checkExistTimer = setInterval(function () {
|
||||
if(bulkRunning) return
|
||||
addCheckBoxIfMissing('day')
|
||||
addCheckBoxIfMissing('month')
|
||||
addCheckBoxIfMissing('year')
|
||||
addCheckBoxIfMissing('latitude')
|
||||
addCheckBoxIfMissing('longitude')
|
||||
addCheckBoxIfMissing('altitude')
|
||||
addSubmitIfMissing()
|
||||
},1000);
|
||||
|
||||
window.runBulk = runBulk
|
||||
window.runGpsBulkUpdate = runGpsBulkUpdate
|
||||
window.runKeywordBulkUpdate = runKeywordBulkUpdate
|
||||
|
||||
})();
|
15
.local/share/qutebrowser/greasemonkey/remove_more_yt_ads.js
Normal file
15
.local/share/qutebrowser/greasemonkey/remove_more_yt_ads.js
Normal file
@ -0,0 +1,15 @@
|
||||
// ==UserScript==
|
||||
// @name Auto Remove Ads
|
||||
// @version 1.0.2
|
||||
// @description Autoremove static ads
|
||||
// @author Alexander Bocken
|
||||
// @match *://*.youtube.com/*
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
setInterval(() => {
|
||||
document.querySelectorAll('.ytd-page-top-ad-layout-renderer,.ytd-display-ad-renderer,.ytd-video-display-full-buttoned-renderer, ytd-display-ad-renderer,.ytd-banner-promo-renderer-background,.ytd-player-legacy-desktop-watch-ads-renderer,ytd-ad-slot-renderer').forEach(
|
||||
el => {
|
||||
el.remove();
|
||||
})
|
||||
document.querySelectorAll('[aria-label="Not interested"]').forEach(el => { el.click() })
|
||||
}, 50)
|
Reference in New Issue
Block a user