This commit is contained in:
simio 2025-06-09 04:34:35 -03:00
parent 6cf3b8fd2b
commit b90574f684
4 changed files with 97 additions and 235 deletions

View File

@ -1,72 +0,0 @@
[Default Applications]
x-scheme-handler/http=userapp-Pale Moon-IPLD22.desktop
x-scheme-handler/https=userapp-Pale Moon-IPLD22.desktop
inode/directory=xfce4-file-manager.desktop
x-scheme-handler/trash=xfce4-file-manager.desktop
application/x-tar=xarchiver.desktop
application/octet-stream=vim.desktop
x-scheme-handler/discord-399779271737868288=discord-399779271737868288.desktop
x-scheme-handler/mailto=xfce4-mail-reader.desktop
x-scheme-handler/ftp=userapp-Pale Moon-IPLD22.desktop
x-scheme-handler/chrome=userapp-Pale Moon-IPLD22.desktop
text/html=userapp-Pale Moon-IPLD22.desktop
application/x-extension-htm=userapp-Pale Moon-IPLD22.desktop
application/x-extension-html=userapp-Pale Moon-IPLD22.desktop
application/x-extension-shtml=userapp-Pale Moon-IPLD22.desktop
application/xhtml+xml=userapp-Pale Moon-IPLD22.desktop
application/x-extension-xhtml=userapp-Pale Moon-IPLD22.desktop
application/x-extension-xht=userapp-Pale Moon-IPLD22.desktop
inode/symlink=thunar.desktop
image/jpeg=feh.desktop
image/png=feh.desktop
[Added Associations]
x-scheme-handler/http=xfce4-web-browser.desktop;userapp-Pale Moon-IPLD22.desktop;
x-scheme-handler/https=xfce4-web-browser.desktop;userapp-Pale Moon-IPLD22.desktop;
application/x-shellscript=kitty-open.desktop;vim.desktop;
application/x-zerosize=org.xfce.mousepad.desktop;vim.desktop;codium.desktop;
inode/directory=xfce4-file-manager.desktop;
x-scheme-handler/trash=xfce4-file-manager.desktop;
application/x-tar=xarchiver.desktop;thunar.desktop;
application/x-theme=nvim.desktop;
application/x-raw-disk-image-xz-compressed=xarchiver.desktop;
audio/x-mpegurl=nvim.desktop;
application/vnd.ms-wpl=nvim.desktop;
video/x-matroska=mpv.desktop;gnac.desktop;org.xfce.Parole.desktop;
audio/midi=audacious.desktop;
text/plain=org.xfce.mousepad.desktop;vim.desktop;codium.desktop;nvim.desktop;
audio/vnd.wave=audacious.desktop;
application/octet-stream=userapp-codium-RWYGX2.desktop;
image/bmp=aseprite.desktop;feh.desktop;
image/jpeg=gimp.desktop;feh.desktop;userapp-catboxupload-A9Q122.desktop;
video/mp4=mpv.desktop;
image/webp=feh.desktop;gimp.desktop;
image/x-gimp-pat=vim.desktop;
application/octet-stream=codium.desktop;feh.desktop;vim.desktop;
video/vnd.avi=mpv.desktop;
image/png=gimp.desktop;feh.desktop;aseprite.desktop;
video/x-ms-wmv=mpv.desktop;
image/gif=feh.desktop;chromium.desktop;
video/quicktime=mpv.desktop;
x-scheme-handler/mailto=xfce4-mail-reader.desktop;
text/html=codium.desktop;vim.desktop;nvim.desktop;chromium.desktop;userapp-Pale Moon-IPLD22.desktop;
audio/AMR-WB=audacious.desktop;
application/x-bat=nvim.desktop;
text/csv=gvim.desktop;
audio/flac=mpv.desktop;
audio/mpeg=mpv.desktop;
text/javascript=codium.desktop;nvim.desktop;
text/css=vim.desktop;gvim.desktop;
text/x-python=codium.desktop;
application/vnd.efi.img=gnome-disk-image-mounter.desktop;
x-scheme-handler/ftp=userapp-Pale Moon-IPLD22.desktop;
x-scheme-handler/chrome=userapp-Pale Moon-IPLD22.desktop;
application/x-extension-htm=userapp-Pale Moon-IPLD22.desktop;
application/x-extension-html=userapp-Pale Moon-IPLD22.desktop;
application/x-extension-shtml=userapp-Pale Moon-IPLD22.desktop;
application/xhtml+xml=userapp-Pale Moon-IPLD22.desktop;
application/x-extension-xhtml=userapp-Pale Moon-IPLD22.desktop;
application/x-extension-xht=userapp-Pale Moon-IPLD22.desktop;
video/mpeg=mpv.desktop;
inode/symlink=vim.desktop;thunar.desktop;
text/x-log=vim.desktop;

View File

@ -1,145 +0,0 @@
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="dark-mode" type="bool" value="false"/>
<property name="panel-1" type="empty">
<property name="autohide-behavior" type="uint" value="0"/>
<property name="background-alpha" type="uint" value="100"/>
<property name="background-style" type="uint" value="0"/>
<property name="enter-opacity" type="uint" value="100"/>
<property name="icon-size" type="uint" value="0"/>
<property name="leave-opacity" type="uint" value="100"/>
<property name="length" type="uint" value="100"/>
<property name="length-adjust" type="bool" value="true"/>
<property name="mode" type="uint" value="0"/>
<property name="nrows" type="uint" value="1"/>
<property name="plugin-ids" type="array">
<value type="int" value="2"/>
<value type="int" value="3"/>
<value type="int" value="4"/>
<value type="int" value="5"/>
<value type="int" value="6"/>
<value type="int" value="7"/>
<value type="int" value="8"/>
<value type="int" value="9"/>
<value type="int" value="10"/>
<value type="int" value="11"/>
<value type="int" value="12"/>
<value type="int" value="13"/>
<value type="int" value="1"/>
</property>
<property name="position" type="string" value="p=6;x=0;y=0"/>
<property name="position-locked" type="bool" value="true"/>
<property name="size" type="uint" value="26"/>
<property name="enable-struts" type="bool" value="true"/>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-10" type="string" value="separator">
<property name="expand" type="bool" value="false"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-11" type="string" value="clock">
<property name="digital-format" type="string" value="%a %d %b, %R"/>
<property name="mode" type="uint" value="2"/>
<property name="show-frame" type="bool" value="true"/>
<property name="tooltip-format" type="string" value="%A %d %B %Y"/>
<property name="digital-time-format" type="string" value="%a %d %b, %R"/>
<property name="digital-layout" type="uint" value="3"/>
</property>
<property name="plugin-12" type="string" value="separator">
<property name="expand" type="bool" value="false"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-13" type="string" value="actions">
<property name="appearance" type="uint" value="1"/>
<property name="ask-confirmation" type="bool" value="true"/>
<property name="button-title" type="uint" value="0"/>
<property name="items" type="array">
<value type="string" value="+lock-screen"/>
<value type="string" value="+switch-user"/>
<value type="string" value="+separator"/>
<value type="string" value="+suspend"/>
<value type="string" value="-hibernate"/>
<value type="string" value="-hybrid-sleep"/>
<value type="string" value="-separator"/>
<value type="string" value="+shutdown"/>
<value type="string" value="-restart"/>
<value type="string" value="+separator"/>
<value type="string" value="+logout"/>
<value type="string" value="-logout-dialog"/>
</property>
</property>
<property name="plugin-2" type="string" value="tasklist">
<property name="flat-buttons" type="bool" value="false"/>
<property name="grouping" type="uint" value="1"/>
<property name="include-all-monitors" type="bool" value="true"/>
<property name="include-all-workspaces" type="bool" value="false"/>
<property name="middle-click" type="uint" value="0"/>
<property name="show-handle" type="bool" value="true"/>
<property name="show-labels" type="bool" value="true"/>
<property name="show-only-minimized" type="bool" value="false"/>
<property name="show-wireframes" type="bool" value="false"/>
<property name="sort-order" type="uint" value="1"/>
<property name="switch-workspace-on-unminimize" type="bool" value="true"/>
<property name="window-scrolling" type="bool" value="true"/>
</property>
<property name="plugin-3" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-4" type="string" value="pager">
<property name="miniature-view" type="bool" value="true"/>
<property name="rows" type="uint" value="1"/>
</property>
<property name="plugin-5" type="string" value="separator">
<property name="expand" type="bool" value="false"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-6" type="string" value="systray">
<property name="hide-new-items" type="bool" value="false"/>
<property name="icon-size" type="int" value="22"/>
<property name="menu-is-primary" type="bool" value="false"/>
<property name="show-frame" type="bool" value="false"/>
<property name="single-row" type="bool" value="false"/>
<property name="size-max" type="uint" value="22"/>
<property name="square-icons" type="bool" value="true"/>
<property name="symbolic-icons" type="bool" value="false"/>
<property name="known-legacy-items" type="array">
<value type="string" value="notes"/>
<value type="string" value="clipman"/>
<value type="string" value="virt-manager"/>
<value type="string" value="gajim"/>
</property>
<property name="known-items" type="array">
<value type="string" value="org.gajim.Gajim"/>
<value type="string" value="Mumble"/>
<value type="string" value="obs"/>
<value type="string" value="flameshot"/>
<value type="string" value="qBittorrent"/>
<value type="string" value="SoulseekQt"/>
<value type="string" value="Fcitx"/>
</property>
</property>
<property name="plugin-7" type="string" value="pulseaudio">
<property name="enable-keyboard-shortcuts" type="bool" value="true"/>
<property name="show-notifications" type="bool" value="true"/>
<property name="known-players" type="string" value="audacious;Chromium"/>
</property>
<property name="plugin-8" type="string" value="power-manager-plugin"/>
<property name="plugin-9" type="string" value="notification-plugin"/>
<property name="notes" type="empty">
<property name="global" type="empty">
<property name="version" type="string" value="1.11.2"/>
</property>
</property>
<property name="plugin-1" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="17398313251.desktop"/>
</property>
</property>
</property>
</channel>

15
.local/bin/allminus Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Loop through all files and directories in the current directory
for item in *; do
# Check if the item is a file or directory
if [ -e "$item" ]; then
# Convert the name to lowercase
lowercase_item=$(echo "$item" | tr '[:upper:]' '[:lower:]')
# Rename the item if the lowercase name is different
if [ "$item" != "$lowercase_item" ]; then
mv "$item" "$lowercase_item"
fi
fi
done

View File

@ -16,6 +16,55 @@ downscale_image() {
fi
}
downscale_webp() {
local img="$1"
local width height
dimensions=$(identify -format "%wx%h" "$img")
width=$(echo $dimensions | cut -d'x' -f1)
height=$(echo $dimensions | cut -d'x' -f2)
if [ "$width" -gt 960 ] || [ "$height" -gt 544 ]; then
gifname="${img}.gif"
magick "$img" "$gifname"
gifsicle --resize _x544 --colors 256 "$gifname" > "${gifname}s"
rm "$img"
rm "$gifname"
magick "${gifname}s" "$img"
rm "${gifname}s"
fi
}
# downscale_apng() {
# local img="$1"
# local width height
# dimensions=$(identify -format "%wx%h" "$img")
# width=$(echo $dimensions | cut -d'x' -f1)
# height=$(echo $dimensions | cut -d'x' -f2)
# if [ "$width" -gt 960 ] || [ "$height" -gt 544 ]; then
# gifname="${img}.gif"
# magick "$img" "$gifname"
# gifsicle --resize _x544 --colors 256 "$gifname" > "${gifname}s"
# rm "$img"
# rm "$gifname"
# magick "${gifname}s" "$img"
# rm "${gifname}s"
# fi
# }
convert_audio_files() {
local audio_file="$1"
local dir=$(dirname "$audio_file")
local base=$(basename "$audio_file")
local filename="${base%.*}"
local opus_file="$dir/$filename.opus"
# Convert to opus format
ffmpeg -i "$audio_file" -c:a libopus -b:a 128k "$opus_file" && \
if [[ "${base,,}" == *.wav ]]; then
rm "$audio_file"
echo "Deleted original WAV file: $audio_file"
fi
}
# Function to resize char_icon to 60x60 if it's bigger
resize_char_icon() {
local img="$1"
@ -69,22 +118,10 @@ delete_files_with_on() {
# Delete all Thumbs.db files recursively
delete_thumbs_db() {
find . -type f -iname "Thumbs.db" -exec rm -f {} \;
echo "Deleted all Thumbs.db files"
}
# Recursively find all image files except those in "emotions" directory
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" -o -iname "*.apng" -o -iname "*.gif" -o -iname "*.bmp" \) | while read -r img; do
# Skip files in "emotions" folder
if [[ "$img" == *"/emotions/"* ]]; then
# Resize image in "emotions" folder if necessary
resize_emotions_images "$img"
continue
fi
# Downscale image if necessary
downscale_image "$img"
done
# Resize the char_icon image to 60x60 if it's larger than that
char_icon="char_icon"
for ext in webp apng jpg jpeg png gif bmp; do
@ -94,16 +131,43 @@ for ext in webp apng jpg jpeg png gif bmp; do
fi
done
# Optimize all images
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" -o -iname "*.apng" -o -iname "*.gif" -o -iname "*.bmp" \) | while read -r img; do
optimize_images "$img"
done
# Delete files containing "_on" in the filename
find . -type f | while read -r img; do
delete_files_with_on "$img"
done
# Optimize all images
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" -o -iname "*.gif" -o -iname "*.bmp" \) | while read -r img; do
# Skip files in "emotions" folder
if [[ "$img" == *"/emotions/"* ]]; then
# Resize image in "emotions" folder if necessary
resize_emotions_images "$img"
continue
fi
if [[ "$img" == *".webp" ]]; then
downscale_webp "$img"
# elif [[ "$img" == *".apng" ]]; then
# downscale_apng "$img"
elif [[ "$img" == *".gif" ]]; then
dimensions=$(identify -format "%wx%h" "$img")
width=$(echo $dimensions | cut -d'x' -f1)
height=$(echo $dimensions | cut -d'x' -f2)
if [ "$width" -gt 960 ] || [ "$height" -gt 544 ]; then
gifsicle --resize _x544 --colors 256 "$img" > "${img}s"
rm "$img"
mv "${img}s" "$img"
fi
else
# Downscale image if necessary
downscale_image "$img"
optimize_images "$img"
fi
done
find . -type f \( -iname "*.wav" -o -iname "*.mp3" \) | while read -r audio; do
convert_audio_files "$audio"
done
# Delete all Thumbs.db files recursively
delete_thumbs_db