This commit is contained in:
coolnsx
2024-05-03 16:06:38 +05:30
parent 7183d3becd
commit 7f905cc49f
19 changed files with 127 additions and 72 deletions

View File

@@ -33,18 +33,17 @@
origin = top-center
# Offset from the origin
#offset = -14x50
offset = 10x50
offset = (10, 50)
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
notification_limit = 20
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# Turn on the progress bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
@@ -61,6 +60,19 @@
# Set the maximum width for the progress bar
progress_bar_max_width = 400
# Corner radius for the progress bar. 0 disables rounded corners.
progress_bar_corner_radius = 0
# Define which corners to round when drawing the progress bar. If progress_bar_corner_radius
# is set to 0 this option will be ignored.
progress_bar_corners = all
# Corner radius for the icon image.
icon_corner_radius = 0
# Define which corners to round when drawing the icon image. If icon_corner_radius
# is set to 0 this option will be ignored.
icon_corners = all
# Show how many messages are currently hidden (because of
# notification_limit).
@@ -80,8 +92,6 @@
# Padding between text and separator.
padding = 8
highlight = "#D81860"
# Horizontal padding.
horizontal_padding = 8
@@ -109,7 +119,12 @@
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
# Sort type.
# possible values are:
# * id: sort by id
# * urgency_ascending: sort by urgency (low then normal then critical)
# * urgency_descending: sort by urgency (critical then normal then low)
# * update: sort by update (most recent always at the top)
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
@@ -214,7 +229,7 @@
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 128
# Paths to default icons (only neccesary when not using recursive icon lookup)
# Paths to default icons (only necessary when not using recursive icon lookup)
icon_path = /usr/share/icons/Papirus/16x16/status/:/usr/share/icons/Papirus/16x16/devices/:/usr/share/icons/Papirus/16x16/panel/:/usr/share/icons/Papirus/22x22/status/
### History ###
@@ -237,10 +252,10 @@
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
# Define the title of the windows spawned by dunst (X11 only)
title = Dunst
# Define the class of the windows spawned by dunst
# Define the class of the windows spawned by dunst (X11 only)
class = Dunst
# Define the corner radius of the notification window
@@ -250,6 +265,13 @@
# notification height to avoid clipping text and/or icons.
corner_radius = 20
# Define which corners to round when drawing the window. If the corner radius
# is set to 0 this option will be ignored.
#
# Comma-separated list of the corners. The accepted corner values are bottom-right,
# bottom-left, top-right, top-left, top, bottom, left, right or all.
corners = all
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
@@ -259,7 +281,7 @@
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# Uncomment this if you want to let notifications appear under fullscreen
# applications (default: overlay)
# layer = top
@@ -310,6 +332,7 @@
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#2b2b2b"
foreground = "#ffffff"
timeout = 5
@@ -320,6 +343,7 @@
background = "#2b2b2b"
foreground = "#ffffff"
timeout = 5
override_pause_level = 30
# Icon for notifications with normal urgency, uncomment to enable
#default_icon = /path/to/icon
@@ -328,6 +352,7 @@
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 5
override_pause_level = 60
# Icon for notifications with critical urgency, uncomment to enable
#default_icon = /path/to/icon
@@ -365,6 +390,7 @@
# ellipsize
# alignment
# hide_text
# override_pause_level
#
# Shell-like globbing will get expanded.
#
@@ -372,6 +398,10 @@
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# You can also allow a notification to appear even when paused. Notification will appear whenever notification's override_pause_level >= dunst's paused level.
# This can be used to set partial pause modes, where more urgent notifications get through, but less urgent stay paused. To do that, you can override the following in the rules:
# override_pause_level = X
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
@@ -390,9 +420,9 @@
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
[transient_history_ignore]
match_transient = yes
history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened

View File

@@ -55,11 +55,19 @@
.btn_play:hover {
color: #A2A852;
}
.btn_controls {
.btn_controls_seek {
color: #EBCB8B;
font-size : 26px;
font-family: IosevkaTerm Nerd Font;
}
.btn_controls_seek:hover {
font-size : 35px;
}
.btn_controls {
color: #EBCB8B;
font-size : 40px;
font-family: IosevkaTerm Nerd Font;
}
.btn_controls:hover {
font-size : 50px;
}

View File

@@ -43,7 +43,7 @@
:y "50"
:width "30%"
:height "40px"
:anchor "bottom left")
:anchor "top left")
:stacking "bg"
:reserve (struts :distance "10px" :side "bottom")
:windowtype "dock"
@@ -56,14 +56,14 @@
:y "50"
:width "30%"
:height "40px"
:anchor "bottomleft")
:anchor "bottom left")
:stacking "bg"
:reserve (struts :distance "10px" :side "bottom")
:windowtype "dock"
:wm-ignore true
(music))
(defpoll song :interval "2s" "./script songdata")
(defpoll song :interval "1s" "./script songdata")
(defpoll STATUS :interval "0.3s" "./script status")
(defpoll CURRENT :interval "0.3s" "./script time")
(defpoll LYRICS :interval "0.4s" "./script lyrics")
@@ -78,9 +78,9 @@
(label :halign "center" :class "artist" :wrap "false" :limit-width 20 :text "${song.artist}")
(box :orientation "h" :spacing 80 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_controls" :tooltip "History : ${song.prev}" :onclick "./script prev" "󰒮")
(button :class "btn_controls" :tooltip "Seek -1%" :onclick "./script seek '-1'" "")
(button :class "btn_controls_seek" :tooltip "Seek -1%" :onclick "./script seek '-1'" "")
(button :class "btn_play" :onclick "./script play_toggle" STATUS)
(button :class "btn_controls" :tooltip "Seek +1%" :onclick "./script seek '1'" "")
(button :class "btn_controls_seek" :tooltip "Seek +1%" :onclick "./script seek '1'" "")
(button :class "btn_controls" :tooltip "Upcoming : ${song.next}" :onclick "./script next" "󰒭"))
(label :wrap "true" :class "lyrics" :text LYRICS))))

View File

@@ -49,7 +49,7 @@ box-drawings-uses-font-glyphs=yes
# indicator-format=
[url]
launch=google-chrome-stable ${url}
launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher

View File

@@ -1,7 +1,7 @@
#!/bin/sh
remind() {
notify-send -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$1 % Battery $2, Please Plugin Charger!!" -u "$2"
notify-send -e -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$1 % Battery $2, Please Plugin Charger!!" -u "$2"
}
print_sleep() {

View File

@@ -5,7 +5,7 @@ menu() {
}
notify() {
notify-send "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
notify-send -e "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
}
download_emoji_file(){

View File

@@ -14,22 +14,22 @@ menu() {
case $1 in
add)
if [ -z "$data" ]; then
notify-send "Please select anything to bookmark"
notify-send -e "Please select anything to bookmark"
elif grep -q "${data}" "$file"; then
notify-send -i "bookmark-missing" "Already bookmarked"
notify-send -e -i "bookmark-missing" "Already bookmarked"
else
printf "%s" "$data" >>"$file"
notify-send -i "user-bookmarks" "Bookmarked" "$data"
notify-send -e -i "user-bookmarks" "Bookmarked" "$data"
fi
;;
rm)
data="$(sed '/^$/d' "$file" | nl -n'ln')"
[ -z "$data" ] && notify-send "Bookmark is empty" && exit 0
[ -z "$data" ] && notify-send -e "Bookmark is empty" && exit 0
del=$(printf "%s" "$data" | menu "delete-bookmark :" | cut -f1)
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -i "bookmark-missing" "Bookmark deleted" -u critical)
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -e -i "bookmark-missing" "Bookmark deleted" -u critical)
;;
copy)
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n' | wl-copy && notify-send "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n' | wl-copy && notify-send -e "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
;;
*)
result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "Put-bookmark :" | tr '\`' '\n')"

View File

@@ -36,7 +36,7 @@ increment=${2:-5} # [ default:5, optional] "around 2% brightness"
[ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0
#validation
(! printf '%s' "$opr" | grep -qE '[+-]') && notify-send -u critical "Unknown Operator, use only + or -" && exit 1
(! printf '%s' "$opr" | grep -qE '[+-]') && notify-send -e -u critical "Unknown Operator, use only + or -" && exit 1
#shellcheck disable=SC2086,SC1102
new="$(( $current $opr $increment ))"
@@ -49,4 +49,4 @@ new="$(( $current $opr $increment ))"
printf '%s' "$new" > "$brightness_file"
#shellcheck disable=SC2004
notify-send -i "lol" "☀️ $((${new}00/${max}))" -t 1000 -h "string:x-canonical-private-synchronous:${0##*/}"
notify-send -e -i "lol" "☀️ $((${new}00/${max}))" -t 1000 -h "string:x-canonical-private-synchronous:${0##*/}"

View File

@@ -2,7 +2,7 @@
i=5
while [ $i -gt 0 ]; do
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1200 &
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1200 &
sleep 1
: $((i -= 1))
done

View File

@@ -1,11 +1,11 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,highrr,auto,1.5,bitdepth,10
#monitor=,2880x1800@120.000999,auto,1.5,bitdepth,10
monitor=HDMI-A-1,3840x2160,auto,2,bitdepth,10
$hypr_dir="$HOME/.config/hypr"
$accent=D81860
#$browser=google-chrome-stable
$browser=firefox
$accent=6FAAFF
$browser=google-chrome-stable
#$browser=firefox
#envs
env = BROWSER,$browser
@@ -219,7 +219,7 @@ exec-once=dbus-update-activation-environment --systemd --all
exec-once=ssh-agent
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once=node $HOME/github/arrpc/src > /tmp/arrpc-log
exec-once=swaybg -i $HOME/.config/wall/4.png -m fill
exec-once=swaybg -i $HOME/.config/wall/3.png -m fill
exec-once=sleep 5 && xrdb -merge $HOME/.config/.Xresource
exec-once=$hypr_dir/workspace 'focus'
exec-once=$hypr_dir/battery

View File

@@ -14,6 +14,6 @@ top -ibn5 -d1 | while read -r line;do
charge=$(cat /sys/class/power_supply/BAT0/capacity)
[ "$bat_stats" = "Discharging" ] && { [ "$charge" -lt 20 ] && bat_icon=🪫 || bat_icon=🔋 ;} || bat_icon=🔌
[ "$vol_stats" = "muted" ] && vol_icon=🔇 || vol_icon=🔊
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
notify-send -e -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
fi
done

View File

@@ -4,15 +4,15 @@ gamedir="$HOME/games"
games=$(find "$gamedir" -maxdepth 2 -type f -name '*.exe' -executable | sed "s|$gamedir/||g;/[U|u]nin.*/d")
[ -z "$games" ] && notify-send -u critical "No games installed" && exit 1
[ -z "$games" ] && notify-send -e -u critical "No games installed" && exit 1
game=$(printf '%s\n' "$games" | bemenu --fn 'JetBrainsMono Nerd Font 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
[ -z "$game" ] && notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1
[ -z "$game" ] && notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1
cd "$(dirname "$gamedir"/"$game")" || (notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "Directory Not found" && exit 1)
cd "$(dirname "$gamedir"/"$game")" || (notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "Directory Not found" && exit 1)
gamename=$(basename "$game")
notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename"
notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename"
WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 gamemoderun wine "$gamename"

View File

@@ -2,6 +2,6 @@
icon="/usr/share/icons/Papirus/16x16/apps/applets-screenshooter.svg"
killall grim slurp
[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png && notify-send -i "$icon" "Screenshot copied to clipboard"
[ "$*" = "fullsave" ] && grim "$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png" && notify-send -i "$icon" "Screenshot saved"
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -i "$icon" "Screenshot copied to clipboard"
[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png && notify-send -e -i "$icon" "Screenshot copied to clipboard"
[ "$*" = "fullsave" ] && grim "$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png" && notify-send -e -i "$icon" "Screenshot saved"
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -e -i "$icon" "Screenshot copied to clipboard"

View File

@@ -6,4 +6,4 @@ vol_icon="low"
[ "$vol_int" -gt 33 ] && vol_icon="medium"
[ "$vol_int" -gt 66 ] && vol_icon="high"
pamixer --get-mute | sh && vol_icon="muted"
notify-send -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1000
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1000

View File

@@ -6,4 +6,4 @@ else
nmcli radio wifi on
wifi_icon="acquiring"
fi
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:${0##*/}"
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:${0##*/}"

View File

@@ -4,7 +4,7 @@ setup_dual_monitor() {
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highrr,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
sleep 2
if hyprctl monitors | grep -q "HDMI-A-1"; then
notify-send "Setting up dual monitor workflow"
notify-send -e "Setting up dual monitor workflow"
hyprctl dispatch moveworkspacetomonitor "1 0"
hyprctl dispatch moveworkspacetomonitor "2 0"
hyprctl dispatch moveworkspacetomonitor "3 0"
@@ -15,10 +15,10 @@ setup_dual_monitor() {
}
handle_it() {
[ -z "$1" ] || notify-send "$1"
[ -z "$1" ] || notify-send -e "$1"
choice=$(printf "Mirror\nExtend" | bemenu --fn 'Roboto 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1 --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
[ -z "$choice" ] && return 0
notify-send "${choice}ing screen"
notify-send -e "${choice}ing screen"
if [ "$choice" = "Extend" ]; then
setup_dual_monitor
else
@@ -31,7 +31,7 @@ case $1 in
#only lists the open applications with their workspace number so u can safely close them
i=4
while [ $i -gt 0 ]; do
notify-send -i "lol" "Running Apps" "$(hyprctl clients | tr '\n' ',' | sed 's|,,|\n|g' | sed -nE 's|.*workspace: ([0-9]).*class: ([^,]*).*xwayland: ([^,]).*|workspace \1: \2 (xway: \3)|p')" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500
notify-send -e -i "lol" "Running Apps" "$(hyprctl clients | tr '\n' ',' | sed 's|,,|\n|g' | sed -nE 's|.*workspace: ([0-9]).*class: ([^,]*).*xwayland: ([^,]).*|workspace \1: \2 (xway: \3)|p')" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500
: $((i -= 1))
sleep 1
done
@@ -47,7 +47,7 @@ case $1 in
cat /tmp/workcurr >/tmp/workprev
printf "%s" "$current" >/tmp/workcurr
fi
notify-send -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -h "string:x-canonical-private-synchronous:monitor" -t 700 2>/dev/null
notify-send -e -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -h "string:x-canonical-private-synchronous:monitor" -t 700 2>/dev/null
done
;;
toggle)

View File

@@ -2,9 +2,9 @@
inode/directory=pcmanfm.desktop
image/jpeg=nsxiv.desktop
application/pdf=org.pwmt.zathura.desktop
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
image/png=nsxiv.desktop
@@ -29,26 +29,26 @@ video/x-matroska=mpv.desktop
application/json=nvim.desktop;
video/vnd.radgamettools.bink=mpv.desktop
x-scheme-handler/mailto=google-chrome.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
x-scheme-handler/chrome=google-chrome.desktop
application/x-extension-htm=google-chrome.desktop
application/x-extension-html=google-chrome.desktop
application/x-extension-shtml=google-chrome.desktop
application/xhtml+xml=google-chrome.desktop
application/x-extension-xhtml=google-chrome.desktop
application/x-extension-xht=google-chrome.desktop
[Added Associations]
video/x-matroska=mpv.desktop;
application/octet-stream=google-chrome.desktop;
video/vnd.radgamettools.bink=mpv.desktop;
x-scheme-handler/mailto=google-chrome.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
text/html=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;
x-scheme-handler/chrome=google-chrome.desktop;
text/html=google-chrome.desktop;
application/x-extension-htm=google-chrome.desktop;
application/x-extension-html=google-chrome.desktop;
application/x-extension-shtml=google-chrome.desktop;
application/xhtml+xml=google-chrome.desktop;
application/x-extension-xhtml=google-chrome.desktop;
application/x-extension-xht=google-chrome.desktop;

View File

@@ -9,6 +9,7 @@ ShowInfoMessages = true
[HeaderOption]
UseFahrenheit = false
EncodeHideTimer = 3.000000e+01
GPUInfoBar = true
[ChartOption]
ReverseChart = false

View File

@@ -50,6 +50,21 @@ b64() {
printf "%s" "$1" | tr "._-" '=/+' | base64 -w 0 $2
}
mpv_jellyfin() {
url=${1:-$(wl-paste)}
uuid=$(printf '%s' "$url" | sed -nE 's|.*/Items/([^/]*)/Download.*|\1|p')
key=$(printf '%s' "$url" | sed -nE 's|.*api_key=([^&]*)|\1|p')
formatted_uuid=$(printf '%s' "$uuid" | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{12})/\1-\2-\3-\4-\5/')
subtitle="$(printf '%s' "$url" | sed -nE 's|(.*)/Items/.*|\1|p')/Videos/$formatted_uuid/$uuid/Subtitles/0/0/Stream.ass?api_key=$key"
if ! curl -s "$subtitle" | grep -q "Error processing request.";then
sub_arg="--sub-file=$subtitle"
fi
setsid -f mpv "$url" $sub_arg
unset subtitle sub_arg uuid formatted_uuid key
}
mkvcinemas() {
local base_url="https://mkvcinemas.tokyo"
local agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
@@ -150,6 +165,7 @@ alias ll="lsd --color=auto -alh"
alias ls="lsd --color=auto"
alias nchh="nvim ~/.config/hypr/hyprland.conf"
alias shfmt="shfmt -ci -d -w"
alias reboot_firmware="systemctl reboot --firmware-setup"
HISTFILE=~/.histfile
HISTSIZE=500