Compare commits
5 Commits
a1696ee49b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
673a30e1df
|
|||
|
809de7f5a3
|
|||
|
8fc4fd63ff
|
|||
|
d5ed8744f6
|
|||
| 915dc9faf0 |
@@ -73,11 +73,11 @@ This setup is currently only adapted for Niri.
|
|||||||
- `lyrics`, scrolling lyrics player, depends on [a small utility](https://github.com/Uyanide/Spotify_Lyrics) from myself <small>(which also happens to be my frist Golang program :D)</small>.
|
- `lyrics`, scrolling lyrics player, depends on [a small utility](https://github.com/Uyanide/Spotify_Lyrics) from myself <small>(which also happens to be my frist Golang program :D)</small>.
|
||||||
- `lyrics-single`, similar to `lyrics`, but only with a single line and can be easily embeded into the status bar.
|
- `lyrics-single`, similar to `lyrics`, but only with a single line and can be easily embeded into the status bar.
|
||||||
|
|
||||||
## Swww
|
## Awww (Swww)
|
||||||
|
|
||||||
The wallpaper will be automatically blurred when there is a window in focus, which is implemented in the [wallpaper-daemon](https://github.com/Uyanide/dotfiles/blob/main/scripts/wallpaper-daemon) script.
|
The wallpaper will be automatically blurred when there is a window in focus, which is implemented in the [wallpaper-daemon](https://github.com/Uyanide/dotfiles/blob/main/config/scripts/.local/scripts/wallpaper-daemon) script.
|
||||||
|
|
||||||
This feature is only enabled in Niri. Swww also manages wallpapers of the Hyprland setup, yet only in the regular way.
|
This feature is only enabled in Niri. Awww also manages wallpapers of the Hyprland setup, yet only in the regular way.
|
||||||
|
|
||||||
## Wallpaper & Colortheme
|
## Wallpaper & Colortheme
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
output "eDP-1" {
|
output "eDP-1" {
|
||||||
// off
|
// off
|
||||||
mode "2560x1600@60.002"
|
mode "2560x1600@240"
|
||||||
scale 1.25
|
scale 1.25
|
||||||
background-color "#1e1e2e"
|
background-color "#1e1e2e"
|
||||||
backdrop-color "#1e1e2e"
|
backdrop-color "#1e1e2e"
|
||||||
|
|||||||
56
config/scripts/.local/scripts/playlive
Executable file
56
config/scripts/.local/scripts/playlive
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Description:
|
||||||
|
# Play the video embedded in a live photo file (or so-called Motion Photo).
|
||||||
|
# The literal tags differ between manufacturers, so this script looks for
|
||||||
|
# the common 'ftyp' box that indicates the start of an MP4 video stream
|
||||||
|
# instead of "MotionPhotoVideo" or "EmbeddedVideo" or something.
|
||||||
|
#
|
||||||
|
# Requirements:
|
||||||
|
# - mpv or vlc media player installed.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# - playlive <file>
|
||||||
|
# - case `config/scripts/.local/share/applications/playlive.desktop` is installed,
|
||||||
|
# right-click on a live photo file in file manager and choose "Open With..." ->
|
||||||
|
# "Play Live Photo".
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ -z "${1:-}" ]; then
|
||||||
|
echo "Usage: $0 <file>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
play_cmd=()
|
||||||
|
if command -v mpv >/dev/null 2>&1; then
|
||||||
|
play_cmd=(mpv --title="Live Photo View" --keep-open=no --loop-file=no --loop-playlist=no --idle=no)
|
||||||
|
elif command -v vlc >/dev/null 2>&1; then
|
||||||
|
play_cmd=(vlc --play-and-exit)
|
||||||
|
else
|
||||||
|
echo "Error: No suitable media player found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
file="$1"
|
||||||
|
|
||||||
|
if [ ! -f "$file" ]; then
|
||||||
|
echo "Error: File '$file' not found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmp_video=$(mktemp --suffix=.mp4)
|
||||||
|
trap 'rm -f "$tmp_video"' EXIT
|
||||||
|
|
||||||
|
offset=$(grep -aobP "ftyp(mp42|isom)" "$file" | tail -n 1 | cut -d: -f1 || true)
|
||||||
|
|
||||||
|
if [ -z "$offset" ]; then
|
||||||
|
echo "Error: No valid video stream found in '$file'." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mp4_offset=$((offset - 3))
|
||||||
|
|
||||||
|
tail -c "+$mp4_offset" "$file" > "$tmp_video"
|
||||||
|
|
||||||
|
"${play_cmd[@]}" "$tmp_video"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Play Live Photo
|
||||||
|
Comment=Play embedded video from Live Photos
|
||||||
|
Exec=/home/kolkas/.local/scripts/playlive %f
|
||||||
|
Icon=multimedia-video-player
|
||||||
|
Terminal=false
|
||||||
|
Categories=AudioVideo;Video;Utility;
|
||||||
|
MimeType=image/jpeg;image/heic;image/heif;
|
||||||
@@ -91,12 +91,11 @@ if type -q tty-clock
|
|||||||
end
|
end
|
||||||
|
|
||||||
if type -q git
|
if type -q git
|
||||||
function acp
|
function gcp
|
||||||
git add . || return 1
|
|
||||||
if test (count $argv) -eq 0
|
if test (count $argv) -eq 0
|
||||||
git commit -m "👐 foo: too lazy to come up with a helpful commit message :)" || return 1
|
git commit -a -m "👐 foo: too lazy to come up with a helpful commit message :)" || return 1
|
||||||
else
|
else
|
||||||
git commit -m "$argv" || return 1
|
git commit -a -m "$argv" || return 1
|
||||||
end
|
end
|
||||||
git push
|
git push
|
||||||
end
|
end
|
||||||
@@ -110,7 +109,7 @@ if type -q git
|
|||||||
set -l repo (wl-paste)
|
set -l repo (wl-paste)
|
||||||
git clone $repo || return 1
|
git clone $repo || return 1
|
||||||
set -l repo_name (basename $repo .git)
|
set -l repo_name (basename $repo .git)
|
||||||
nohup idea $repo_name > /dev/null 2>&1 & disown
|
nohup idea $repo_name >/dev/null 2>&1 & disown
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
if string match -q '*ghostty*' $TERM; and test -n "$XDG_CURRENT_DESKTOP"; and test "$XDG_CURRENT_DESKTOP" = "niri"
|
|
||||||
if test "$ghostty_niri_initialized" != "1"
|
|
||||||
set -xg ghostty_niri_initialized 1
|
|
||||||
niri msg action set-column-width 50%
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -27,8 +27,6 @@
|
|||||||
<edit mode="assign" name="hinting"><bool>true</bool></edit>
|
<edit mode="assign" name="hinting"><bool>true</bool></edit>
|
||||||
<edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
|
<edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
|
||||||
<edit mode="assign" name="rgba"><const>none</const></edit>
|
<edit mode="assign" name="rgba"><const>none</const></edit>
|
||||||
<edit mode="assign" name="embeddedbitmap"><bool>false</bool></edit>
|
|
||||||
<edit mode="assign" name="lcdfilter"><const>lcddefault</const></edit>
|
|
||||||
</match>
|
</match>
|
||||||
|
|
||||||
<!-- For danmuku -->
|
<!-- For danmuku -->
|
||||||
@@ -46,7 +44,7 @@
|
|||||||
<prefer>
|
<prefer>
|
||||||
<family>Sarasa UI SC</family>
|
<family>Sarasa UI SC</family>
|
||||||
<family>Sarasa UI J</family>
|
<family>Sarasa UI J</family>
|
||||||
<family>Noto color Emoji</family>
|
<family>Noto Color Emoji</family>
|
||||||
<family>Symbols Nerd Font</family>
|
<family>Symbols Nerd Font</family>
|
||||||
</prefer>
|
</prefer>
|
||||||
</alias>
|
</alias>
|
||||||
|
|||||||
Reference in New Issue
Block a user