add mpv-sm desktop entry
This commit is contained in:
+39
-33
@@ -5,53 +5,53 @@ from argparse import ArgumentParser
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
BASE_PKGS = [
|
BASE_PKGS = [
|
||||||
"clang", # C/C++ development
|
"clang", # C/C++ development
|
||||||
"scripts", # scripts & snippets
|
"scripts", # scripts & snippets
|
||||||
"stow" # --target=~
|
"stow", # --target=~
|
||||||
]
|
]
|
||||||
|
|
||||||
# for TUI only setups
|
# for TUI only setups
|
||||||
# e.g. servers that are accessed via SSH only
|
# e.g. servers that are accessed via SSH only
|
||||||
TUI_PKGS = [
|
TUI_PKGS = [
|
||||||
*BASE_PKGS,
|
*BASE_PKGS,
|
||||||
"fastfetch", # sys info,
|
"fastfetch", # sys info,
|
||||||
"helix", # editor
|
"helix", # editor
|
||||||
"nvim", # editor
|
"nvim", # editor
|
||||||
"shell", # fish & .bash_profile & shell prompt
|
"shell", # fish & .bash_profile & shell prompt
|
||||||
"yazi" # terminal file manager
|
"yazi", # terminal file manager
|
||||||
]
|
]
|
||||||
|
|
||||||
# for all WMs and DEs
|
# for all WMs and DEs
|
||||||
GUI_BASE_PKGS = [
|
GUI_BASE_PKGS = [
|
||||||
*TUI_PKGS,
|
*TUI_PKGS,
|
||||||
"kitty", # terminal emulator
|
"kitty", # terminal emulator
|
||||||
"ghostty", # alternative terminal emulator
|
"ghostty", # alternative terminal emulator
|
||||||
"misc", # miscellaneous GUI configs (e.g. *-flags)
|
"misc", # miscellaneous GUI configs (e.g. *-flags)
|
||||||
"mpv", # media player
|
# "mpv", # media player
|
||||||
"wallpaper", # wallpapers & manager
|
"wallpaper", # wallpapers & manager
|
||||||
"kvantum", # qt theming
|
"kvantum", # qt theming
|
||||||
"nwg-look" # gtk theming
|
"nwg-look", # gtk theming
|
||||||
]
|
]
|
||||||
|
|
||||||
# for Hyprland setup
|
# for Hyprland setup
|
||||||
HYPRLAND_PKGS = [
|
HYPRLAND_PKGS = [
|
||||||
*GUI_BASE_PKGS,
|
*GUI_BASE_PKGS,
|
||||||
"eww", # widgets
|
"eww", # widgets
|
||||||
"hypr", # hypr family
|
"hypr", # hypr family
|
||||||
"mako", # notifications
|
"mako", # notifications
|
||||||
"rofi", # application launcher
|
"rofi", # application launcher
|
||||||
"waybar", # status bar
|
"waybar", # status bar
|
||||||
"wlogout" # logout menu
|
"wlogout", # logout menu
|
||||||
]
|
]
|
||||||
|
|
||||||
# for Niri setup
|
# for Niri setup
|
||||||
NIRI_PKGS = [
|
NIRI_PKGS = [
|
||||||
*GUI_BASE_PKGS,
|
*GUI_BASE_PKGS,
|
||||||
"hypr", # for hyprlock & hypridle
|
"hypr", # for hyprlock & hypridle
|
||||||
"niri", # wm config
|
"niri", # wm config
|
||||||
"quickshell", # widgets & status bar & notifications & ...
|
"quickshell", # widgets & status bar & notifications & ...
|
||||||
"rofi", # application launcher
|
"rofi", # application launcher
|
||||||
"wlogout" # logout menu
|
"wlogout", # logout menu
|
||||||
]
|
]
|
||||||
|
|
||||||
PKGS = {
|
PKGS = {
|
||||||
@@ -59,7 +59,7 @@ PKGS = {
|
|||||||
"tui": TUI_PKGS,
|
"tui": TUI_PKGS,
|
||||||
"gui": GUI_BASE_PKGS,
|
"gui": GUI_BASE_PKGS,
|
||||||
"hyprland": HYPRLAND_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):
|
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"
|
reset = "\033[0m"
|
||||||
print(f"{color}[{level}] {message}{reset}")
|
print(f"{color}[{level}] {message}{reset}")
|
||||||
|
|
||||||
|
|
||||||
def stow(pkg: str):
|
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):
|
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():
|
def main():
|
||||||
parser = ArgumentParser(description="Stow configuration packages in this repository.")
|
parser = ArgumentParser(
|
||||||
|
description="Stow configuration packages in this repository."
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"package",
|
"package", choices=PKGS.keys(), help="The configuration package to stow."
|
||||||
choices=PKGS.keys(),
|
|
||||||
help="The configuration package to stow."
|
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ output "eDP-2" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "DP-1" {
|
output "DP-1" {
|
||||||
|
focus-at-startup
|
||||||
mode "2560x1440@179.845"
|
mode "2560x1440@179.845"
|
||||||
scale 1
|
scale 1
|
||||||
background-color "#1e1e2e"
|
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
|
Type=Application
|
||||||
Name=Play Live Photo
|
Name=Play Live Photo
|
||||||
Comment=Play embedded video from Live Photos
|
Comment=Play embedded video from Live Photos
|
||||||
Exec=~/.local/scripts/playlive %f
|
TryExec=playlive
|
||||||
|
Exec=playlive %f
|
||||||
Icon=multimedia-video-player
|
Icon=multimedia-video-player
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=AudioVideo;Video;Utility;
|
Categories=AudioVideo;Video;Utility;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ hash = "699fe07e0d2d1b4af8dafb84168eeb04"
|
|||||||
|
|
||||||
[[plugin.deps]]
|
[[plugin.deps]]
|
||||||
use = "KKV9/compress"
|
use = "KKV9/compress"
|
||||||
rev = "e2ae983"
|
rev = "e6007f7"
|
||||||
hash = "36b570e2164f6ad2317cfb839e42ef4"
|
hash = "e0b1051849756dd72fca874c320259a"
|
||||||
|
|
||||||
[[plugin.deps]]
|
[[plugin.deps]]
|
||||||
use = "llanosrocas/yaziline"
|
use = "llanosrocas/yaziline"
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
<i>Effortlessly compress your files and folders with style!</i>
|
<i>Effortlessly compress your files and folders with style!</i>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📖 Table of Contents
|
## 📖 Table of Contents
|
||||||
|
|
||||||
- [Features](#-features)
|
- [Features](#-features)
|
||||||
@@ -17,8 +15,6 @@
|
|||||||
- [Tips](#-tips)
|
- [Tips](#-tips)
|
||||||
- [Credits](#-credits)
|
- [Credits](#-credits)
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
|
|
||||||
- 🗂️ **Multi-format support:** zip, 7z, rar, tar, tar.gz, tar.xz, tar.bz2, tar.zst, tar.lz4, tar.lha
|
- 🗂️ **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
|
- 🛑 **Overwrite safety:** Never lose files by accident
|
||||||
- 🎯 **Seamless Yazi integration:** Fast, native-like UX
|
- 🎯 **Seamless Yazi integration:** Fast, native-like UX
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 Supported File Types
|
## 📦 Supported File Types
|
||||||
|
|
||||||
| Extension | Default Command | 7z Command | Bsdtar Command (Win10+ & Unix) |
|
| Extension | Default Command | 7z Command | Bsdtar Command (Win10+ & Unix) |
|
||||||
@@ -46,7 +40,6 @@
|
|||||||
| `.tar.lz4` | `tar rpf + lz4` | | |
|
| `.tar.lz4` | `tar rpf + lz4` | | |
|
||||||
| `.tar.lha` | `tar rpf + lha` | | |
|
| `.tar.lha` | `tar rpf + lha` | | |
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚡️ Installation
|
## ⚡️ Installation
|
||||||
|
|
||||||
@@ -60,9 +53,6 @@ git clone https://github.com/KKV9/compress.yazi.git %AppData%\yazi\config\plugin
|
|||||||
# Or with yazi plugin manager
|
# Or with yazi plugin manager
|
||||||
ya pkg add KKV9/compress
|
ya pkg add KKV9/compress
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 🔧 Extras (Windows)
|
### 🔧 Extras (Windows)
|
||||||
|
|
||||||
To enable additional compression formats and features on Windows, follow these steps:
|
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:**
|
4. **Install Additional Tools:**
|
||||||
To use formats like `lha`, `lz4`, `gzip`, etc., install their respective tools and ensure they are added to your `PATH`.
|
To use formats like `lha`, `lz4`, `gzip`, etc., install their respective tools and ensure they are added to your `PATH`.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎹 Keymap Example
|
## 🎹 Keymap Example
|
||||||
|
|
||||||
Add this to your `keymap.toml`:
|
Add this to your `keymap.toml`:
|
||||||
@@ -115,8 +103,6 @@ run = "plugin compress -phl"
|
|||||||
desc = "Archive selected files (password+header+level)"
|
desc = "Archive selected files (password+header+level)"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🛠️ Usage
|
## 🛠️ Usage
|
||||||
|
|
||||||
1. **Select files/folders** in Yazi.
|
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 _#.
|
6. **Overwrite protect** if a file already exists, the new file will be given a suffix _#.
|
||||||
7. Enjoy your shiny new archive!
|
7. Enjoy your shiny new archive!
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🏳️🌈 Flags
|
## 🏳️🌈 Flags
|
||||||
|
|
||||||
- Combine flags for more power!
|
- Combine flags for more power!
|
||||||
@@ -154,20 +138,14 @@ on = [ "c", "a", "r" ]
|
|||||||
run = "plugin compress '-p -l rar'"
|
run = "plugin compress '-p -l rar'"
|
||||||
desc = "Archive selected files to rar (password+level)"
|
desc = "Archive selected files to rar (password+level)"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 Tips
|
## 💡 Tips
|
||||||
|
|
||||||
- The file extension **must** match a supported type.
|
- The file extension **must** match a supported type.
|
||||||
- The required compression tool **must** be installed and in your `PATH` (7zip/rar etc.).
|
- 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 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
|
## 📣 Credits
|
||||||
|
|
||||||
Made with ❤️ for [Yazi](https://github.com/sxyazi/yazi) by [KKV9](https://github.com/KKV9).
|
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.
|
Contributions are welcome! Feel free to submit a pull request.
|
||||||
|
|
||||||
---
|
|
||||||
|
|||||||
Reference in New Issue
Block a user