add mpv-sm desktop entry
This commit is contained in:
+39
-33
@@ -5,53 +5,53 @@ from argparse import ArgumentParser
|
||||
from pathlib import Path
|
||||
|
||||
BASE_PKGS = [
|
||||
"clang", # C/C++ development
|
||||
"clang", # C/C++ development
|
||||
"scripts", # scripts & snippets
|
||||
"stow" # --target=~
|
||||
"stow", # --target=~
|
||||
]
|
||||
|
||||
# for TUI only setups
|
||||
# e.g. servers that are accessed via SSH only
|
||||
TUI_PKGS = [
|
||||
*BASE_PKGS,
|
||||
"fastfetch", # sys info,
|
||||
"helix", # editor
|
||||
"nvim", # editor
|
||||
"shell", # fish & .bash_profile & shell prompt
|
||||
"yazi" # terminal file manager
|
||||
"fastfetch", # sys info,
|
||||
"helix", # editor
|
||||
"nvim", # editor
|
||||
"shell", # fish & .bash_profile & shell prompt
|
||||
"yazi", # terminal file manager
|
||||
]
|
||||
|
||||
# for all WMs and DEs
|
||||
GUI_BASE_PKGS = [
|
||||
*TUI_PKGS,
|
||||
"kitty", # terminal emulator
|
||||
"ghostty", # alternative terminal emulator
|
||||
"misc", # miscellaneous GUI configs (e.g. *-flags)
|
||||
"mpv", # media player
|
||||
"wallpaper", # wallpapers & manager
|
||||
"kvantum", # qt theming
|
||||
"nwg-look" # gtk theming
|
||||
"kitty", # terminal emulator
|
||||
"ghostty", # alternative terminal emulator
|
||||
"misc", # miscellaneous GUI configs (e.g. *-flags)
|
||||
# "mpv", # media player
|
||||
"wallpaper", # wallpapers & manager
|
||||
"kvantum", # qt theming
|
||||
"nwg-look", # gtk theming
|
||||
]
|
||||
|
||||
# for Hyprland setup
|
||||
HYPRLAND_PKGS = [
|
||||
*GUI_BASE_PKGS,
|
||||
"eww", # widgets
|
||||
"hypr", # hypr family
|
||||
"mako", # notifications
|
||||
"rofi", # application launcher
|
||||
"waybar", # status bar
|
||||
"wlogout" # logout menu
|
||||
"eww", # widgets
|
||||
"hypr", # hypr family
|
||||
"mako", # notifications
|
||||
"rofi", # application launcher
|
||||
"waybar", # status bar
|
||||
"wlogout", # logout menu
|
||||
]
|
||||
|
||||
# for Niri setup
|
||||
NIRI_PKGS = [
|
||||
*GUI_BASE_PKGS,
|
||||
"hypr", # for hyprlock & hypridle
|
||||
"niri", # wm config
|
||||
"quickshell", # widgets & status bar & notifications & ...
|
||||
"rofi", # application launcher
|
||||
"wlogout" # logout menu
|
||||
"hypr", # for hyprlock & hypridle
|
||||
"niri", # wm config
|
||||
"quickshell", # widgets & status bar & notifications & ...
|
||||
"rofi", # application launcher
|
||||
"wlogout", # logout menu
|
||||
]
|
||||
|
||||
PKGS = {
|
||||
@@ -59,7 +59,7 @@ PKGS = {
|
||||
"tui": TUI_PKGS,
|
||||
"gui": GUI_BASE_PKGS,
|
||||
"hyprland": HYPRLAND_PKGS,
|
||||
"niri": NIRI_PKGS
|
||||
"niri": NIRI_PKGS,
|
||||
}
|
||||
|
||||
|
||||
@@ -68,25 +68,31 @@ DEST_PATH = Path.home().expanduser()
|
||||
|
||||
|
||||
def _log(level: str, message: str):
|
||||
color = "\033[92m" if level == "INFO" else "\033[91m" if level == "ERROR" else "\033[0m"
|
||||
color = (
|
||||
"\033[92m" if level == "INFO" else "\033[91m" if level == "ERROR" else "\033[0m"
|
||||
)
|
||||
reset = "\033[0m"
|
||||
print(f"{color}[{level}] {message}{reset}")
|
||||
|
||||
|
||||
def stow(pkg: str):
|
||||
subprocess.run(["stow", "-v", "-d", str(PKGS_PATH), "-t", str(DEST_PATH), pkg], check=True)
|
||||
subprocess.run(
|
||||
["stow", "-v", "-d", str(PKGS_PATH), "-t", str(DEST_PATH), pkg], check=True
|
||||
)
|
||||
|
||||
|
||||
def switch(session: str):
|
||||
subprocess.run([str(Path("~/.local/scripts/config-switch").expanduser()), session], check=True)
|
||||
subprocess.run(
|
||||
[str(Path("~/.local/scripts/config-switch").expanduser()), session], check=True
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(description="Stow configuration packages in this repository.")
|
||||
parser = ArgumentParser(
|
||||
description="Stow configuration packages in this repository."
|
||||
)
|
||||
parser.add_argument(
|
||||
"package",
|
||||
choices=PKGS.keys(),
|
||||
help="The configuration package to stow."
|
||||
"package", choices=PKGS.keys(), help="The configuration package to stow."
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ output "eDP-2" {
|
||||
}
|
||||
|
||||
output "DP-1" {
|
||||
focus-at-startup
|
||||
mode "2560x1440@179.845"
|
||||
scale 1
|
||||
background-color "#1e1e2e"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=mpv (with Smooth-Motion)
|
||||
GenericName=Multimedia player
|
||||
Comment=Play movies and songs
|
||||
Icon=mpv
|
||||
TryExec=mpv-sm
|
||||
Exec=mpv-sm --player-operation-mode=pseudo-gui -- %U
|
||||
Terminal=false
|
||||
Categories=AudioVideo;Audio;Video;Player;TV;
|
||||
MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/aiff;audio/x-aiff;audio/m4a;audio/x-m4a;application/x-extension-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/mpeg2;audio/mpeg3;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/musepack;audio/x-musepack;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;audio/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;audio/x-matroska;application/x-matroska;video/webm;audio/webm;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-audio;application/x-ogm-video;application/x-shorten;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/eac3;audio/amr-wb;video/mp2t;audio/flac;audio/mp4;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;audio/x-pn-au;video/3gp;video/3gpp;video/3gpp2;audio/3gpp;audio/3gpp2;video/dv;audio/dv;audio/opus;audio/vnd.dts;audio/vnd.dts.hd;audio/x-adpcm;application/x-cue;audio/m3u;audio/vnd.wave;video/vnd.avi;
|
||||
X-KDE-Protocols=appending,file,ftp,hls,http,https,mms,mpv,rtmp,rtmps,rtmpt,rtmpts,rtp,rtsp,rtsps,sftp,srt,srtp,webdav,webdavs
|
||||
StartupWMClass=mpv
|
||||
Keywords=mpv;media;player;video;audio;tv;
|
||||
@@ -2,7 +2,8 @@
|
||||
Type=Application
|
||||
Name=Play Live Photo
|
||||
Comment=Play embedded video from Live Photos
|
||||
Exec=~/.local/scripts/playlive %f
|
||||
TryExec=playlive
|
||||
Exec=playlive %f
|
||||
Icon=multimedia-video-player
|
||||
Terminal=false
|
||||
Categories=AudioVideo;Video;Utility;
|
||||
|
||||
@@ -15,8 +15,8 @@ hash = "699fe07e0d2d1b4af8dafb84168eeb04"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "KKV9/compress"
|
||||
rev = "e2ae983"
|
||||
hash = "36b570e2164f6ad2317cfb839e42ef4"
|
||||
rev = "e6007f7"
|
||||
hash = "e0b1051849756dd72fca874c320259a"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "llanosrocas/yaziline"
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
<i>Effortlessly compress your files and folders with style!</i>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## 📖 Table of Contents
|
||||
|
||||
- [Features](#-features)
|
||||
@@ -17,8 +15,6 @@
|
||||
- [Tips](#-tips)
|
||||
- [Credits](#-credits)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- 🗂️ **Multi-format support:** zip, 7z, rar, tar, tar.gz, tar.xz, tar.bz2, tar.zst, tar.lz4, tar.lha
|
||||
@@ -29,8 +25,6 @@
|
||||
- 🛑 **Overwrite safety:** Never lose files by accident
|
||||
- 🎯 **Seamless Yazi integration:** Fast, native-like UX
|
||||
|
||||
---
|
||||
|
||||
## 📦 Supported File Types
|
||||
|
||||
| Extension | Default Command | 7z Command | Bsdtar Command (Win10+ & Unix) |
|
||||
@@ -46,7 +40,6 @@
|
||||
| `.tar.lz4` | `tar rpf + lz4` | | |
|
||||
| `.tar.lha` | `tar rpf + lha` | | |
|
||||
|
||||
---
|
||||
|
||||
## ⚡️ Installation
|
||||
|
||||
@@ -60,9 +53,6 @@ git clone https://github.com/KKV9/compress.yazi.git %AppData%\yazi\config\plugin
|
||||
# Or with yazi plugin manager
|
||||
ya pkg add KKV9/compress
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 🔧 Extras (Windows)
|
||||
|
||||
To enable additional compression formats and features on Windows, follow these steps:
|
||||
@@ -81,8 +71,6 @@ To enable additional compression formats and features on Windows, follow these s
|
||||
4. **Install Additional Tools:**
|
||||
To use formats like `lha`, `lz4`, `gzip`, etc., install their respective tools and ensure they are added to your `PATH`.
|
||||
|
||||
---
|
||||
|
||||
## 🎹 Keymap Example
|
||||
|
||||
Add this to your `keymap.toml`:
|
||||
@@ -115,8 +103,6 @@ run = "plugin compress -phl"
|
||||
desc = "Archive selected files (password+header+level)"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Usage
|
||||
|
||||
1. **Select files/folders** in Yazi.
|
||||
@@ -132,8 +118,6 @@ desc = "Archive selected files (password+header+level)"
|
||||
6. **Overwrite protect** if a file already exists, the new file will be given a suffix _#.
|
||||
7. Enjoy your shiny new archive!
|
||||
|
||||
---
|
||||
|
||||
## 🏳️🌈 Flags
|
||||
|
||||
- Combine flags for more power!
|
||||
@@ -154,20 +138,14 @@ on = [ "c", "a", "r" ]
|
||||
run = "plugin compress '-p -l rar'"
|
||||
desc = "Archive selected files to rar (password+level)"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 💡 Tips
|
||||
|
||||
- The file extension **must** match a supported type.
|
||||
- The required compression tool **must** be installed and in your `PATH` (7zip/rar etc.).
|
||||
- If no extention is provided, the default extention (zip) will be appended automatically.
|
||||
|
||||
---
|
||||
- If you leave the filename blank, the plugin will use the selected filename or parent directory, when multiple files are selected, to name the archive.
|
||||
|
||||
## 📣 Credits
|
||||
|
||||
Made with ❤️ for [Yazi](https://github.com/sxyazi/yazi) by [KKV9](https://github.com/KKV9).
|
||||
Contributions are welcome! Feel free to submit a pull request.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user