Compare commits

..

No commits in common. "1c5581679fb84a939fbbc88af3624183eaa526e9" and "4d3a6b64999ed779212c06795ba510879887a532" have entirely different histories.

13 changed files with 59 additions and 178 deletions

View file

@ -24,7 +24,6 @@
lm_sensors # tools for reading hw sensors lm_sensors # tools for reading hw sensors
p7zip # 7zip fork with some improvements p7zip # 7zip fork with some improvements
e2fsprogs # tools for creating and checking ext filesystems e2fsprogs # tools for creating and checking ext filesystems
lsof # list open files
# Rust replacements # Rust replacements
procs # better ps procs # better ps

View file

@ -4,6 +4,8 @@ _: {
./stremio.nix ./stremio.nix
./nomacs.nix ./nomacs.nix
./qbittorrent.nix ./qbittorrent.nix
./mpv.nix
./obs.nix
./qimgv.nix ./qimgv.nix
]; ];
} }

55
home/packages/gui/mpv.nix Normal file
View file

@ -0,0 +1,55 @@
{
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"
'';
};
};
}

View file

@ -9,13 +9,11 @@
cfg = osConfig.myOptions.home-manager.programs.applications.obs; cfg = osConfig.myOptions.home-manager.programs.applications.obs;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.obs-studio.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
obs-studio
obs-cli obs-cli
]; ];
}; };
} }

View file

@ -3,7 +3,5 @@ _: {
./spotify ./spotify
./vesktop ./vesktop
./webcord ./webcord
./mpv.nix
./obs.nix
]; ];
} }

View file

@ -1,51 +0,0 @@
{
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'";
};
};
};
}

View file

@ -28,10 +28,8 @@ in {
colorScheme = "mocha"; colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [
#adblock # I currently have premium
volumePercentage
fullAppDisplay fullAppDisplay
shuffle shuffle # shuffle+ (special characters are sanitized out of ext names)
hidePodcasts hidePodcasts
playlistIcons playlistIcons
lastfm lastfm

View file

@ -181,12 +181,6 @@
"SUPER_SHIFT, mouse_up, focusmonitor, -1" "SUPER_SHIFT, mouse_up, focusmonitor, -1"
"SUPER_SHIFT, bracketright, focusmonitor, +1" "SUPER_SHIFT, bracketright, focusmonitor, +1"
"SUPER_SHIFT, bracketleft, focusmonitor, -1" "SUPER_SHIFT, bracketleft, focusmonitor, -1"
#
# Global keybinds (passing keys to other programs)
#
"CTRL, F10, pass, ^(com\.obsproject\.Studio)$"
]; ];
# Mouse bindings # Mouse bindings

View file

@ -14,6 +14,5 @@ _: {
./bottom.nix ./bottom.nix
./bat.nix ./bat.nix
./nix-index.nix ./nix-index.nix
./iamb.nix
]; ];
} }

View file

@ -1,48 +0,0 @@
{
lib,
pkgs,
config,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.applications.iamb;
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [ iamb ];
xdg.configFile."iamb/config.json".text = builtins.toJSON {
settings = {
log_level = "warn";
reaction_display = true;
reaction_shortcode_display = false;
read_receipt_send = false;
read_receipt_display = true;
request_timeout = 15000;
typing_notice_send = true;
typing_notice_display = true;
image_preview = {
protocol.type = "kitty";
size = {
width = 80;
height = 24;
};
};
};
default_profile = cfg.defaultProfile;
profiles = lib.mapAttrs (name: profile: {
user_id = profile.userId;
url = profile.homeServer;
}) cfg.profiles;
dirs = {
cache = "${config.xdg.cacheHome}/iamb/";
logs = "${config.xdg.dataHome}/iamb/logs/";
downloads = "${config.xdg.userDirs.download}/";
};
};
};
}

View file

@ -71,7 +71,6 @@
".config/vesktop" ".config/vesktop"
".config/WebCord" ".config/WebCord"
".local/share/Smart Code ltd/Stremio" ".local/share/Smart Code ltd/Stremio"
".config/obs-studio"
# Tools # Tools
".local/share/gnupg" ".local/share/gnupg"
@ -186,13 +185,6 @@
qimgv.enable = true; qimgv.enable = true;
qbittorrent.enable = true; qbittorrent.enable = true;
obs.enable = true; obs.enable = true;
iamb = {
enable = true;
profiles.default = {
userId = "@itsdrike:envs.net";
homeServer = "https://matrix.envs.net";
};
};
}; };
}; };

View file

@ -2,10 +2,6 @@
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in in
{ {
imports = [
./iamb.nix
];
options.myOptions.home-manager.programs = { options.myOptions.home-manager.programs = {
launchers = { launchers = {
wofi.enable = mkEnableOption "Wofi launcher"; wofi.enable = mkEnableOption "Wofi launcher";

View file

@ -1,51 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkOption types mkIf;
cfg = config.myOptions.home-manager.programs.applications.iamb;
in
{
options.myOptions.home-manager.programs.applications.iamb = {
enable = mkEnableOption "iamb (vim-inspired terminal Matrix client)";
defaultProfile = mkOption {
type = types.str;
default = "default";
description = "Default profile to be used when the app starts";
};
profiles = mkOption {
type = types.attrsOf (types.submodule {
options = {
userId = mkOption {
type = types.str;
example = "@itsdrike:envs.net";
description = "Your Matrix user ID";
};
homeServer = mkOption {
type = types.nullOr types.str;
example = "https://matrix.envs.net";
default = null;
description = ''
If your homeserver is located on a different domain than the server part
of the `userId`, then you can explicitly specify a homeserver URL to use.
'';
};
};
});
default = {};
description = "Profiles for the iamb client, keyed by profile name";
};
};
config = mkIf cfg.enable {
assertions = [
{
assertion = builtins.elem cfg.defaultProfile (lib.attrNames cfg.profiles);
message = "Default profile must be present in profiles configuration";
}
];
};
}