mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 18:24:34 +00:00
Use home-manager native mpv program options
This commit is contained in:
parent
fa9713258a
commit
6efbedbe7d
|
@ -4,7 +4,6 @@ _: {
|
|||
./stremio.nix
|
||||
./nomacs.nix
|
||||
./qbittorrent.nix
|
||||
./mpv.nix
|
||||
./obs.nix
|
||||
./qimgv.nix
|
||||
];
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = osConfig.myOptions.home-manager.programs.applications.mpv;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
mpv
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"mpv/mpv.conf".text = ''
|
||||
loop=yes
|
||||
'';
|
||||
|
||||
"mpv/input.conf".text = ''
|
||||
# Vim keys seeking
|
||||
l seek 5
|
||||
h seek -5
|
||||
j seek -60
|
||||
k seek 60
|
||||
|
||||
# Set A-B Loop key to g, since l was rebound
|
||||
g ab-loop
|
||||
|
||||
# Swap i and I, use lowercase for toggle
|
||||
i script-binding stats/display-stats-toggle
|
||||
I script-binding stats/display-stats
|
||||
|
||||
UP add volume 2
|
||||
DOWN add volume -2
|
||||
|
||||
# Zooming
|
||||
- add video-zoom -.25
|
||||
+ add video-zoom .25
|
||||
|
||||
# Moving/panning video
|
||||
kp8 add video-pan-y .05
|
||||
kp6 add video-pan-x -.05
|
||||
kp2 add video-pan-y -.05
|
||||
kp4 add video-pan-x .05
|
||||
kp5 set video-pan-x 0; set video-pan-y 0; set video-zoom 0
|
||||
|
||||
# Rotation
|
||||
ctrl+r cycle_values video-rotate "90" "180" "270" "0"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,5 +3,6 @@ _: {
|
|||
./spotify
|
||||
./vesktop
|
||||
./webcord
|
||||
./mpv.nix
|
||||
];
|
||||
}
|
||||
|
|
51
home/programs/graphical/apps/mpv.nix
Normal file
51
home/programs/graphical/apps/mpv.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = osConfig.myOptions.home-manager.programs.applications.mpv;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
loop = "yes";
|
||||
};
|
||||
|
||||
bindings = {
|
||||
l = "seek 5";
|
||||
h = "seek -5";
|
||||
j = "seek -60";
|
||||
k = "seek 60";
|
||||
|
||||
# Set A-B Loop key to g, since l was rebound
|
||||
g = "ab-loop";
|
||||
|
||||
# Swap i and I, use lowercase for toggle
|
||||
i = "script-binding stats/display-stats-toggle";
|
||||
I = "script-binding stats/display-stats";
|
||||
|
||||
UP = "add volume 2";
|
||||
DOWN = "add volume -2";
|
||||
|
||||
# Zooming
|
||||
"-" = "add video-zoom -.25";
|
||||
"+" = "add video-zoom .25";
|
||||
|
||||
# Moving/panning video
|
||||
kp8 = "add video-pan-y .05";
|
||||
kp6 = "add video-pan-x -.05";
|
||||
kp2 = "add video-pan-y -.05";
|
||||
kp4 = "add video-pan-x .05";
|
||||
kp5 = "set video-pan-x 0; set video-pan-y 0; set video-zoom 0";
|
||||
|
||||
# Rotation
|
||||
"ctrl+r" = "cycle_values video-rotate '90' '180' '270' '0'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue