diff options
Diffstat (limited to 'dotfiles/common')
20 files changed, 407 insertions, 46 deletions
diff --git a/dotfiles/common/.config/calibre/gui.json b/dotfiles/common/.config/calibre/gui.json index f34a1ee..853dbd8 100644 --- a/dotfiles/common/.config/calibre/gui.json +++ b/dotfiles/common/.config/calibre/gui.json @@ -1,4 +1,45 @@ { + "action-layout-toolbar": [ + "Choose Library", + null, + "Edit Metadata", + null, + "View", + null, + "Favourites Menu", + null, + "Add Books", + "Fetch News", + "Save To Disk", + null, + "Remove Books", + null, + "Preferences", + "Help", + "Check Books" + ], + "action-layout-toolbar-device": [ + "Choose Library", + null, + "Location Manager", + "Send To Device", + null, + "Edit Metadata", + null, + "View", + null, + "Favourites Menu", + null, + "Add Books", + "Fetch News", + "Save To Disk", + null, + "Remove Books", + null, + "Preferences", + "Help", + "Check Books" + ], "book_list_pin_splitter_state": { "__class__": "bytearray", "__value__": "AAAA/wAAAAEAAAACAAABAAAAAEYA/////wEAAAABAA==" @@ -172,14 +213,14 @@ "geometry-of-calibre_main_window_geometry": { "frame_geometry": { "height": 1306, - "width": 1490, + "width": 1828, "x": 0, "y": 0 }, "full_screened": false, "geometry": { "height": 1306, - "width": 1490, + "width": 1828, "x": 0, "y": 0 }, @@ -192,7 +233,7 @@ }, "qt": { "__class__": "bytearray", - "__value__": "AdnQywADAAAAAAAAAAAAAAAABdEAAAUZAAAAAAAAAAAAAAcjAAAFGQAAAAACAAAADXAAAAAAAAAAAAAABdEAAAUZ" + "__value__": "AdnQywADAAAAAAAAAAAAAAAAByMAAAUZAAAAAAAAAAAAAAcjAAAFGQAAAAACAAAADXAAAAAAAAAAAAAAByMAAAUZ" }, "screen": { "depth": 32, @@ -427,7 +468,7 @@ "grid view visible": false, "library_usage_stats": { "/home/cjennings/archive/books": 10, - "/home/cjennings/sync/books": 6 + "/home/cjennings/sync/books": 10 }, "light_palette_name": "", "light_palettes": { @@ -491,46 +532,5 @@ "show_splash_screen": false, "show_vl_tabs": true, "tag browser search box visible": false, - "toolbar_icon_size": "small", - "action-layout-toolbar": [ - "Choose Library", - null, - "Edit Metadata", - null, - "View", - null, - "Favourites Menu", - null, - "Add Books", - "Fetch News", - "Save To Disk", - null, - "Remove Books", - null, - "Preferences", - "Help", - "Check Books" - ], - "action-layout-toolbar-device": [ - "Choose Library", - null, - "Location Manager", - "Send To Device", - null, - "Edit Metadata", - null, - "View", - null, - "Favourites Menu", - null, - "Add Books", - "Fetch News", - "Save To Disk", - null, - "Remove Books", - null, - "Preferences", - "Help", - "Check Books" - ] + "toolbar_icon_size": "small" }
\ No newline at end of file diff --git a/dotfiles/common/.config/yt-dlp/config b/dotfiles/common/.config/yt-dlp/config index 6b99261..2e024cd 100644 --- a/dotfiles/common/.config/yt-dlp/config +++ b/dotfiles/common/.config/yt-dlp/config @@ -18,3 +18,6 @@ # Output template: ~/videos/channel-title.ext -o ~/videos/%(channel)s-%(title)s.%(ext)s + +# Download YouTube JS challenge solver from official yt-dlp/ejs repo +--remote-components ejs:github diff --git a/dotfiles/common/.local/bin/notify b/dotfiles/common/.local/bin/notify new file mode 100755 index 0000000..a89a3ff --- /dev/null +++ b/dotfiles/common/.local/bin/notify @@ -0,0 +1,138 @@ +#!/bin/bash +# +# notify - Display notifications with icons and sounds +# +# Usage: +# notify <type> "title" "body" [--persist] +# +# Types: +# success - Green checkmark, pleasant chime +# fail - Red X, warning tone +# alert - Yellow exclamation, attention tone +# question - Blue question mark, contemplative tone +# alarm - Alarm clock icon, alarm sound +# info - Blue info icon, confident tone +# security - Shield icon, security tone +# bug - Bug icon, error tone +# +# Options: +# --persist Don't auto-dismiss (stays until manually closed) +# +# Examples: +# notify success "Job Complete" "Download finished in 12 minutes" +# notify fail "Job Failed" "Connection refused" --persist +# notify alert "Warning" "Network speed reduced" +# notify question "Input Needed" "Continue or abort?" + +set -euo pipefail + +ICON_DIR="$HOME/.local/share/icons/notify" +SOUND_DIR="$HOME/.local/share/sounds/notify" + +usage() { + cat <<EOF +Usage: notify <type> "title" "body" [--persist] + +Types: + success Green checkmark, pleasant chime + fail Red X, warning tone + alert Yellow exclamation, attention tone + question Blue question mark, contemplative tone + alarm Alarm clock, alarm sound + info Blue info icon, confident tone + security Shield icon, security tone + bug Bug icon, error tone + +Options: + --persist Don't auto-dismiss notification + +Examples: + notify success "Job Complete" "Download finished" + notify fail "Build Failed" "Test errors" --persist +EOF + exit 1 +} + +# Require at least type, title, body +if [[ $# -lt 3 ]]; then + usage +fi + +TYPE="$1" +TITLE="$2" +BODY="$3" +PERSIST="${4:-}" + +# Validate type and set icon/sound +case "$TYPE" in + success) + ICON="$ICON_DIR/success.png" + SOUND="$SOUND_DIR/success.ogg" + ;; + fail) + ICON="$ICON_DIR/fail.png" + SOUND="$SOUND_DIR/fail.ogg" + ;; + alert) + ICON="$ICON_DIR/alert.png" + SOUND="$SOUND_DIR/alert.ogg" + ;; + question) + ICON="$ICON_DIR/question.png" + SOUND="$SOUND_DIR/question.ogg" + ;; + alarm) + ICON="$ICON_DIR/alarm.png" + SOUND="$SOUND_DIR/alarm.ogg" + ;; + info) + ICON="$ICON_DIR/info.png" + SOUND="$SOUND_DIR/info.ogg" + ;; + security) + ICON="$ICON_DIR/security.png" + SOUND="$SOUND_DIR/security.ogg" + ;; + bug) + ICON="$ICON_DIR/bug.png" + SOUND="$SOUND_DIR/bug.ogg" + ;; + *) + echo "Error: Unknown type '$TYPE'" >&2 + echo "Valid types: success, fail, alert, question, alarm, info, security, bug" >&2 + exit 1 + ;; +esac + +# Check assets exist +if [[ ! -f "$ICON" ]]; then + echo "Warning: Icon not found: $ICON" >&2 +fi + +if [[ ! -f "$SOUND" ]]; then + echo "Warning: Sound not found: $SOUND" >&2 +fi + +# Build notify-send arguments +NOTIFY_ARGS=( + --app-name="" + --urgency=normal +) + +# Add persist flag if requested +if [[ "$PERSIST" == "--persist" ]]; then + NOTIFY_ARGS+=(--expire-time=0) +fi + +# Add icon if it exists +if [[ -f "$ICON" ]]; then + NOTIFY_ARGS+=(--icon="$ICON") +fi + +# Play sound in background (if it exists) +if [[ -f "$SOUND" ]]; then + paplay "$SOUND" & +fi + +# Send notification +notify-send "${NOTIFY_ARGS[@]}" "$TITLE" "$BODY" diff --git a/dotfiles/common/.local/bin/resetmimetypes b/dotfiles/common/.local/bin/resetmimetypes new file mode 100755 index 0000000..cfe5936 --- /dev/null +++ b/dotfiles/common/.local/bin/resetmimetypes @@ -0,0 +1,220 @@ +#!/usr/bin/env bash + +# Remove Old Databases +rm ~/.config/mimeapps.list >> /dev/null 2>&1 +rm ~/.local/share/applications/mimeinfo.cache >> /dev/null 2>&1 +rm ~/.local/share/applications/mimeinfo.list >> /dev/null 2>&1 + +# Directory Node: nautilus +xdg-mime default org.gnome.Nautilus.desktop inode/directory + +# Audio Files: audacious + +# Audio Files: mpv +xdg-mime default mpv.desktop audio/basic +xdg-mime default mpv.desktop audio/flac.wav +xdg-mime default mpv.desktop audio/mp4 +xdg-mime default mpv.desktop audio/mpeg +xdg-mime default mpv.desktop audio/ogg +xdg-mime default mpv.desktop audio/opus +xdg-mime default mpv.desktop audio/vnd.rn-realaudio +xdg-mime default mpv.desktop audio/vnd.wav +xdg-mime default mpv.desktop audio/vorbis +xdg-mime default mpv.desktop audio/x-aiff +xdg-mime default mpv.desktop audio/x-mpegurl + +# Video Files: mpv + +# Video Files: vlc +xdg-mime default vlc.desktop application/mpeg4-iod +xdg-mime default vlc.desktop application/mpeg4-muxcodetable +xdg-mime default vlc.desktop application/ogg +xdg-mime default vlc.desktop application/vnd.apple.mpegurl +xdg-mime default vlc.desktop application/x-quicktime-media-link +xdg-mime default vlc.desktop application/x-quicktimeplayer +xdg-mime default vlc.desktop application/x-shockwave-flash +xdg-mime default vlc.desktop video/avi +xdg-mime default vlc.desktop video/divx +xdg-mime default vlc.desktop video/flv +xdg-mime default vlc.desktop video/mp4 +xdg-mime default vlc.desktop video/mp4v-es +xdg-mime default vlc.desktop video/mpeg +xdg-mime default vlc.desktop video/mpeg-system +xdg-mime default vlc.desktop video/msvideo +xdg-mime default vlc.desktop video/ogg +xdg-mime default vlc.desktop video/quicktime +xdg-mime default vlc.desktop video/vnd.divx +xdg-mime default vlc.desktop video/vnd.mpegurl +xdg-mime default vlc.desktop video/vnd.rn-realvideo +xdg-mime default vlc.desktop video/webm +xdg-mime default vlc.desktop video/x-avi +xdg-mime default vlc.desktop video/x-flv +xdg-mime default vlc.desktop video/x-m4v +xdg-mime default vlc.desktop video/x-matroska +xdg-mime default vlc.desktop video/x-mpeg +xdg-mime default vlc.desktop video/x-mpeg-system +xdg-mime default vlc.desktop video/x-mpeg2 +xdg-mime default vlc.desktop video/x-ms-wmv +xdg-mime default vlc.desktop video/x-msvideo +xdg-mime default vlc.desktop video/x-theora +xdg-mime default vlc.desktop video/x-theora+ogg +xdg-mime default vlc.desktop x-content/video-dvd +xdg-mime default vlc.desktop x-content/video-svcd +xdg-mime default vlc.desktop x-content/video-vcd + +# Images: feh +xdg-mime default feh.desktop image/bmp +xdg-mime default feh.desktop image/gif +xdg-mime default feh.desktop image/jpeg +xdg-mime default feh.desktop image/jpg +xdg-mime default feh.desktop image/png +xdg-mime default feh.desktop image/tiff +xdg-mime default feh.desktop image/webp +xdg-mime default feh.desktop image/avif +xdg-mime default feh.desktop image/heic +xdg-mime default feh.desktop image/heif +xdg-mime default feh.desktop image/svg+xml +xdg-mime default feh.desktop image/x-bmp +xdg-mime default feh.desktop image/x-eps +xdg-mime default feh.desktop image/x-ico +xdg-mime default feh.desktop image/x-icon +xdg-mime default feh.desktop image/x-xbitmap +xdg-mime default feh.desktop image/x-xpixmap + +# Torrent Files: Transmission Remote +xdg-mime default io.github.TransmissionRemoteGtk-gtk.desktop application/x-bittorrent +xdg-mime default io.github.TransmissionRemoteGtk.desktop x-scheme-handler/magnet + +# Web Browser: Chromium Browser + +# Web Browser: Google-Chrome Browser + +# Web Browser: Google Chrome Stable +xdg-mime default google-chrome-stable.desktop application/rdf+xml +xdg-mime default google-chrome-stable.desktop application/rss+xml +xdg-mime default google-chrome-stable.desktop application/xhtml+xml +xdg-mime default google-chrome-stable.desktop application/xhtml_xml +xdg-mime default google-chrome-stable.desktop application/xml +xdg-mime default google-chrome-stable.desktop text/html +xdg-mime default google-chrome-stable.desktop text/xml +xdg-mime default google-chrome-stable.desktop x-scheme-handler/http +xdg-mime default google-chrome-stable.desktop x-scheme-handler/https + +# Mobi Ebooks: calibre-ebook-reader +xdg-mime default calibre-ebook-viewer.desktop application/x-mobi8-ebook +xdg-mime default calibre-ebook-viewer.desktop application/x-mobipocket-ebook + +# Text and Source Code: Emacsclient +xdg-mime default emacsclient.desktop application/x-shellscript +xdg-mime default emacsclient.desktop text/english +xdg-mime default emacsclient.desktop text/markdown +xdg-mime default emacsclient.desktop text/plain +xdg-mime default emacsclient.desktop text/x-c +xdg-mime default emacsclient.desktop text/x-c++ +xdg-mime default emacsclient.desktop text/x-c++hdr +xdg-mime default emacsclient.desktop text/x-c++src +xdg-mime default emacsclient.desktop text/x-chdr +xdg-mime default emacsclient.desktop text/x-csrc +xdg-mime default emacsclient.desktop text/x-java +xdg-mime default emacsclient.desktop text/x-makefile +xdg-mime default emacsclient.desktop text/x-moc +xdg-mime default emacsclient.desktop text/x-pascal +xdg-mime default emacsclient.desktop text/x-tcl +xdg-mime default emacsclient.desktop text/x-tex + +# PDF/EPUB: Emacsclient + +# PDF ePUB: Zathura +xdg-mime default org.pwmt.zathura.desktop application/eps +xdg-mime default org.pwmt.zathura.desktop application/epub+zip +xdg-mime default org.pwmt.zathura.desktop application/oxps +xdg-mime default org.pwmt.zathura.desktop application/pdf +xdg-mime default org.pwmt.zathura.desktop application/postscript +xdg-mime default org.pwmt.zathura.desktop application/ps +xdg-mime default org.pwmt.zathura.desktop application/x-fictionbook +xdg-mime default org.pwmt.zathura.desktop image/eps +xdg-mime default org.pwmt.zathura.desktop image/vnd.djvu +xdg-mime default org.pwmt.zathura.desktop image/vnd.djvu+multipage + +# PDF ePUB: Foliate + +# PDF ePUB: Evince + +# Comics Files: Zathura +xdg-mime default org.pwmt.zathura.desktop application/vnd.comicbook+zip +xdg-mime default org.pwmt.zathura.desktop application/vnd.comicbook-rar + +# Spreadsheets: Libreoffice Calc +xdg-mime default libreoffice-calc.desktop application/vnd.ms-excel +xdg-mime default libreoffice-calc.desktop application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +xdg-mime default libreoffice-calc.desktop application/vnd.oasis.opendocument.spreadsheet +xdg-mime default libreoffice-calc.desktop application/vnd.oasis.opendocument.spreadsheet-template +xdg-mime default libreoffice-calc.desktop text/csv +xdg-mime default libreoffice-calc.desktop text/tab-separated-values + +# Presentations: Libreoffice Impress +xdg-mime default libreoffice-impress.desktop application/vnd.ms-powerpoint +xdg-mime default libreoffice-impress.desktop application/vnd.openxmlformats-officedocument.presentationml.presentation +xdg-mime default libreoffice-impress.desktop application/vnd.oasis.opendocument.presentation +xdg-mime default libreoffice-impress.desktop application/vnd.oasis.opendocument.presentation-template + +# Libreoffice Writer +xdg-mime default libreoffice-writer.desktop application/clarisworks +xdg-mime default libreoffice-writer.desktop application/macwriteii +xdg-mime default libreoffice-writer.desktop application/msword +xdg-mime default libreoffice-writer.desktop application/prs.plucker +xdg-mime default libreoffice-writer.desktop application/rtf +xdg-mime default libreoffice-writer.desktop application/vnd.lotus-wordpro +xdg-mime default libreoffice-writer.desktop application/vnd.ms-word +xdg-mime default libreoffice-writer.desktop application/vnd.ms-word.template.macroEnabled.12 +xdg-mime default libreoffice-writer.desktop application/vnd.ms-works +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text-flat-xml +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text-master +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text-master-template +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text-template +xdg-mime default libreoffice-writer.desktop application/vnd.oasis.opendocument.text-web +xdg-mime default libreoffice-writer.desktop application/vnd.openxmlformats-officedocument +xdg-mime default libreoffice-writer.desktop application/vnd.openxmlformats-officedocument.wordprocessingml.document +xdg-mime default libreoffice-writer.desktop application/vnd.palm +xdg-mime default libreoffice-writer.desktop application/vnd.stardivision.writer-global +xdg-mime default libreoffice-writer.desktop application/vnd.sun.xml.writer +xdg-mime default libreoffice-writer.desktop application/vnd.sun.xml.writer.global +xdg-mime default libreoffice-writer.desktop application/vnd.sun.xml.writer.template +xdg-mime default libreoffice-writer.desktop application/vnd.wordperfect +xdg-mime default libreoffice-writer.desktop application/wordperfect +xdg-mime default libreoffice-writer.desktop application/x-abiword +xdg-mime default libreoffice-writer.desktop application/x-aportisdoc +xdg-mime default libreoffice-writer.desktop application/x-doc +xdg-mime default libreoffice-writer.desktop application/x-extension-txt +xdg-mime default libreoffice-writer.desktop application/x-fictionbook+xml +xdg-mime default libreoffice-writer.desktop application/x-hwp +xdg-mime default libreoffice-writer.desktop application/x-iwork-pages-sffpages +xdg-mime default libreoffice-writer.desktop application/x-mswrite +xdg-mime default libreoffice-writer.desktop application/x-sony-bbeb +xdg-mime default libreoffice-writer.desktop application/x-starwriter +xdg-mime default libreoffice-writer.desktop application/x-t602 +xdg-mime default libreoffice-writer.desktop text/rtf + +# Archives: file-roller +xdg-mime default org.gnome.FileRoller.desktop application/zip +xdg-mime default org.gnome.FileRoller.desktop application/x-tar +xdg-mime default org.gnome.FileRoller.desktop application/gzip +xdg-mime default org.gnome.FileRoller.desktop application/x-gzip +xdg-mime default org.gnome.FileRoller.desktop application/x-compressed-tar +xdg-mime default org.gnome.FileRoller.desktop application/x-bzip2 +xdg-mime default org.gnome.FileRoller.desktop application/x-bzip2-compressed-tar +xdg-mime default org.gnome.FileRoller.desktop application/x-xz +xdg-mime default org.gnome.FileRoller.desktop application/x-xz-compressed-tar +xdg-mime default org.gnome.FileRoller.desktop application/x-7z-compressed +xdg-mime default org.gnome.FileRoller.desktop application/x-rar +xdg-mime default org.gnome.FileRoller.desktop application/vnd.rar +xdg-mime default org.gnome.FileRoller.desktop application/x-zstd-compressed-tar + +# FTP Scheme-Handler: Filezilla +xdg-mime default filezilla.desktop x-scheme-handler/ftp + +# Org-Protocol Scheme-Handler: emacsclient +xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol + +update-desktop-database ~/.local/share/applications/ diff --git a/dotfiles/common/.local/share/icons/notify/alarm.png b/dotfiles/common/.local/share/icons/notify/alarm.png Binary files differnew file mode 100644 index 0000000..23e1374 --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/alarm.png diff --git a/dotfiles/common/.local/share/icons/notify/alert.png b/dotfiles/common/.local/share/icons/notify/alert.png Binary files differnew file mode 100644 index 0000000..7c9fda9 --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/alert.png diff --git a/dotfiles/common/.local/share/icons/notify/bug.png b/dotfiles/common/.local/share/icons/notify/bug.png Binary files differnew file mode 100644 index 0000000..9ea84cf --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/bug.png diff --git a/dotfiles/common/.local/share/icons/notify/fail.png b/dotfiles/common/.local/share/icons/notify/fail.png Binary files differnew file mode 100644 index 0000000..ea0fbbe --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/fail.png diff --git a/dotfiles/common/.local/share/icons/notify/info.png b/dotfiles/common/.local/share/icons/notify/info.png Binary files differnew file mode 100644 index 0000000..e2acdb4 --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/info.png diff --git a/dotfiles/common/.local/share/icons/notify/question.png b/dotfiles/common/.local/share/icons/notify/question.png Binary files differnew file mode 100644 index 0000000..fd1a4ad --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/question.png diff --git a/dotfiles/common/.local/share/icons/notify/security.png b/dotfiles/common/.local/share/icons/notify/security.png Binary files differnew file mode 100644 index 0000000..a48799c --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/security.png diff --git a/dotfiles/common/.local/share/icons/notify/success.png b/dotfiles/common/.local/share/icons/notify/success.png Binary files differnew file mode 100644 index 0000000..892ef3c --- /dev/null +++ b/dotfiles/common/.local/share/icons/notify/success.png diff --git a/dotfiles/common/.local/share/sounds/notify/alarm.ogg b/dotfiles/common/.local/share/sounds/notify/alarm.ogg Binary files differnew file mode 100644 index 0000000..b4dff15 --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/alarm.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/alert.ogg b/dotfiles/common/.local/share/sounds/notify/alert.ogg Binary files differnew file mode 100644 index 0000000..217f33a --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/alert.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/bug.ogg b/dotfiles/common/.local/share/sounds/notify/bug.ogg Binary files differnew file mode 100644 index 0000000..6842082 --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/bug.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/fail.ogg b/dotfiles/common/.local/share/sounds/notify/fail.ogg Binary files differnew file mode 100644 index 0000000..916d88a --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/fail.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/info.ogg b/dotfiles/common/.local/share/sounds/notify/info.ogg Binary files differnew file mode 100644 index 0000000..57900b4 --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/info.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/question.ogg b/dotfiles/common/.local/share/sounds/notify/question.ogg Binary files differnew file mode 100644 index 0000000..8e44c55 --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/question.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/security.ogg b/dotfiles/common/.local/share/sounds/notify/security.ogg Binary files differnew file mode 100644 index 0000000..301287e --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/security.ogg diff --git a/dotfiles/common/.local/share/sounds/notify/success.ogg b/dotfiles/common/.local/share/sounds/notify/success.ogg Binary files differnew file mode 100644 index 0000000..c28da65 --- /dev/null +++ b/dotfiles/common/.local/share/sounds/notify/success.ogg |
