mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-14 03:37:18 +00:00
Compare commits
7 commits
4d3a6b6499
...
1c5581679f
Author | SHA1 | Date | |
---|---|---|---|
ItsDrike | 1c5581679f | ||
ItsDrike | 56154c0758 | ||
ItsDrike | bac20edfab | ||
ItsDrike | aa057391a8 | ||
ItsDrike | 6efbedbe7d | ||
ItsDrike | fa9713258a | ||
ItsDrike | d725d12ee0 |
|
@ -24,6 +24,7 @@
|
|||
lm_sensors # tools for reading hw sensors
|
||||
p7zip # 7zip fork with some improvements
|
||||
e2fsprogs # tools for creating and checking ext filesystems
|
||||
lsof # list open files
|
||||
|
||||
# Rust replacements
|
||||
procs # better ps
|
||||
|
|
|
@ -4,8 +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,7 @@ _: {
|
|||
./spotify
|
||||
./vesktop
|
||||
./webcord
|
||||
./mpv.nix
|
||||
./obs.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'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,11 +9,13 @@
|
|||
cfg = osConfig.myOptions.home-manager.programs.applications.obs;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.obs-studio.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
obs-studio
|
||||
obs-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -28,8 +28,10 @@ in {
|
|||
colorScheme = "mocha";
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
#adblock # I currently have premium
|
||||
volumePercentage
|
||||
fullAppDisplay
|
||||
shuffle # shuffle+ (special characters are sanitized out of ext names)
|
||||
shuffle
|
||||
hidePodcasts
|
||||
playlistIcons
|
||||
lastfm
|
||||
|
|
|
@ -181,6 +181,12 @@
|
|||
"SUPER_SHIFT, mouse_up, focusmonitor, -1"
|
||||
"SUPER_SHIFT, bracketright, focusmonitor, +1"
|
||||
"SUPER_SHIFT, bracketleft, focusmonitor, -1"
|
||||
|
||||
#
|
||||
# Global keybinds (passing keys to other programs)
|
||||
#
|
||||
"CTRL, F10, pass, ^(com\.obsproject\.Studio)$"
|
||||
|
||||
];
|
||||
|
||||
# Mouse bindings
|
||||
|
|
|
@ -14,5 +14,6 @@ _: {
|
|||
./bottom.nix
|
||||
./bat.nix
|
||||
./nix-index.nix
|
||||
./iamb.nix
|
||||
];
|
||||
}
|
||||
|
|
48
home/programs/terminal/tools/iamb.nix
Normal file
48
home/programs/terminal/tools/iamb.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
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}/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -71,6 +71,7 @@
|
|||
".config/vesktop"
|
||||
".config/WebCord"
|
||||
".local/share/Smart Code ltd/Stremio"
|
||||
".config/obs-studio"
|
||||
|
||||
# Tools
|
||||
".local/share/gnupg"
|
||||
|
@ -185,6 +186,13 @@
|
|||
qimgv.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
obs.enable = true;
|
||||
iamb = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
userId = "@itsdrike:envs.net";
|
||||
homeServer = "https://matrix.envs.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
inherit (lib) mkEnableOption mkOption types;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./iamb.nix
|
||||
];
|
||||
|
||||
options.myOptions.home-manager.programs = {
|
||||
launchers = {
|
||||
wofi.enable = mkEnableOption "Wofi launcher";
|
||||
|
|
51
options/home/programs/iamb.nix
Normal file
51
options/home/programs/iamb.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue