add battery tmux plugin to yuzu

This commit is contained in:
caandt 2024-10-31 15:15:52 -05:00
parent 81c7356b24
commit 6fa90af645
4 changed files with 41 additions and 9 deletions

View file

@ -1,7 +1,20 @@
{config, ...}: {
{
config,
pkgs,
...
}: {
imports = [
../../../../user
];
home.username = "ahnwuoa";
home.packages = [pkgs.acpi];
u.tmux = {
plugins = [pkgs.tmuxPlugins.battery];
extraConfig = ''
set -g status-right "#{client_user}@#H | #{battery_percentage} #{battery_remain} | %a %b %d, %H:%M"
set -g status-right-length 60
set -g status-interval 15
'';
};
}

View file

@ -1,11 +1,21 @@
{
config,
pkgs,
lib,
...
}: let
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/config/${x}";
tmuxConfig = config.u.tmux.extraConfig + lib.strings.concatMapStrings (x: "\nrun ${x.rtp}") config.u.tmux.plugins;
in {
imports = [./kde];
u.tmux.plugins = with pkgs.tmuxPlugins; [
vim-tmux-navigator
sessionist
];
fonts.fontconfig.enable = false;
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
xdg.configFile.alacritty.source = mkln "alacritty";
xdg.configFile.awesome.source = mkln "awesome";
xdg.configFile.bash.source = mkln "bash";
@ -25,12 +35,5 @@ in {
xdg.configFile.readline.source = ./readline;
xdg.configFile."starship.toml".source = ./starship.toml;
xdg.configFile.sx.source = mkln "sx";
xdg.configFile."tmux/tmux.conf".text =
(builtins.readFile tmux/tmux.conf)
+ ''
run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp}
run ${pkgs.tmuxPlugins.sessionist.rtp}
'';
fonts.fontconfig.enable = false;
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile tmux/tmux.conf) + tmuxConfig;
}

View file

@ -3,6 +3,7 @@
./bin
./config
./home.nix
./options.nix
./share
./theme.nix
./xdg.nix

15
user/options.nix Normal file
View file

@ -0,0 +1,15 @@
{lib, ...}: {
options.u = {
tmux = {
plugins = lib.mkOption {
type = lib.types.listOf lib.types.package;
description = "tmux plugins to source in config";
};
extraConfig = lib.mkOption {
type = lib.types.lines;
description = "extra config to append to bottom of config";
default = "";
};
};
};
}