mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
Add docker and fish to murk
Fix i3status
This commit is contained in:
parent
0b2342ff13
commit
6478868ff0
2 changed files with 153 additions and 135 deletions
|
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, lib, config, osConfig, inputs, ... }:
|
||||
let cfg = osConfig.mods;
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = osConfig.mods;
|
||||
in {
|
||||
imports = [ inputs.impermanence.homeManagerModules.impermanence ];
|
||||
imports = [inputs.impermanence.homeManagerModules.impermanence];
|
||||
|
||||
# Modules
|
||||
mods.xdg.enable = true;
|
||||
|
|
@ -20,11 +27,12 @@ in {
|
|||
pulseaudio
|
||||
pavucontrol
|
||||
alsa-utils
|
||||
|
||||
docker
|
||||
fish
|
||||
]
|
||||
|
||||
# Non-free </3
|
||||
|
||||
++ [ google-cloud-sdk ];
|
||||
++ [google-cloud-sdk];
|
||||
|
||||
# Hardware preferences
|
||||
## Monitors
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
{ pkgs, lib, config, osConfig, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
fsss = with pkgs;
|
||||
writeShellApplication {
|
||||
name = "fsss";
|
||||
runtimeInputs = [ flameshot curl xsel ];
|
||||
runtimeInputs = [flameshot curl xsel];
|
||||
text = ''
|
||||
flameshot gui -r -s > /tmp/ss.png;if [ ! -s /tmp/ss.png ]; then
|
||||
exit 1
|
||||
|
|
@ -12,137 +17,142 @@ let
|
|||
curl -H "authorization: $AUTH" https://share.muon.host/api/upload -F file=@/tmp/ss.png -H "Content-Type: multipart/form-data" -H "Format: date" -H "Image-Compression-Percent: 90" -H "No-JSON: true" | tr -d '\n' | xsel -ib;
|
||||
'';
|
||||
};
|
||||
in with lib; {
|
||||
options.mods.i3.enable = mkEnableOption "enables i3";
|
||||
options.mods.battery.enable = mkEnableOption "enables battery";
|
||||
in
|
||||
with lib; {
|
||||
options.mods.i3.enable = mkEnableOption "enables i3";
|
||||
options.mods.battery.enable = mkEnableOption "enables battery";
|
||||
|
||||
config = mkIf config.mods.i3.enable {
|
||||
services.unclutter.enable = true;
|
||||
programs.rofi.enable = true;
|
||||
config = mkIf config.mods.i3.enable {
|
||||
services.unclutter.enable = true;
|
||||
programs.rofi.enable = true;
|
||||
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars.default = lib.mkMerge [
|
||||
{
|
||||
blocks = lib.mkBefore [
|
||||
{
|
||||
block = "privacy";
|
||||
driver = [ { name = "v4l"; } { name = "pipewire"; } ];
|
||||
}
|
||||
{
|
||||
block = "net";
|
||||
format = " $icon ";
|
||||
inactive_format = " $icon ";
|
||||
}
|
||||
];
|
||||
}
|
||||
(lib.mkIf config.mods.battery.enable {
|
||||
blocks = [{
|
||||
block = "battery";
|
||||
format = " $icon $percentage ";
|
||||
# format_alt =
|
||||
# " $icon $percentage {$time_remaining.dur(hms:true, min_unit:m) |}";
|
||||
}];
|
||||
})
|
||||
{
|
||||
settings.theme.overrides = lib.mkMerge [
|
||||
{ separator = ""; }
|
||||
config.lib.stylix.i3status-rust.bar
|
||||
];
|
||||
icons = "awesome5";
|
||||
blocks = lib.mkAfter [
|
||||
{
|
||||
block = "sound";
|
||||
format = " $icon {$volume |} ";
|
||||
click = [{
|
||||
button = "left";
|
||||
cmd = "${lib.getExe pkgs.pavucontrol}";
|
||||
}];
|
||||
}
|
||||
{
|
||||
block = "time";
|
||||
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
|
||||
# format_alt = "$icon $timestamp.datetime(f:'%Y-%m-%d %H:%M') ";
|
||||
interval = 1;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars.default = lib.mkMerge [
|
||||
{
|
||||
blocks = lib.mkBefore [
|
||||
{
|
||||
block = "privacy";
|
||||
driver = [{name = "v4l";} {name = "pipewire";}];
|
||||
}
|
||||
# {
|
||||
# block = "net";
|
||||
# format = " $icon ";
|
||||
# inactive_format = " $icon ";
|
||||
# }
|
||||
];
|
||||
}
|
||||
(lib.mkIf config.mods.battery.enable {
|
||||
blocks = [
|
||||
{
|
||||
block = "battery";
|
||||
format = " $icon $percentage ";
|
||||
# format_alt =
|
||||
# " $icon $percentage {$time_remaining.dur(hms:true, min_unit:m) |}";
|
||||
}
|
||||
];
|
||||
})
|
||||
{
|
||||
settings.theme.overrides = lib.mkMerge [
|
||||
{separator = "";}
|
||||
config.lib.stylix.i3status-rust.bar
|
||||
];
|
||||
icons = "awesome5";
|
||||
blocks = lib.mkAfter [
|
||||
{
|
||||
block = "sound";
|
||||
format = " $icon {$volume |} ";
|
||||
click = [
|
||||
{
|
||||
button = "left";
|
||||
cmd = "${lib.getExe pkgs.pavucontrol}";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
block = "time";
|
||||
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
|
||||
# format_alt = "$icon $timestamp.datetime(f:'%Y-%m-%d %H:%M') ";
|
||||
interval = 1;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
xsession.windowManager.i3 = let
|
||||
modifier = "Mod4";
|
||||
wsAmount = 10;
|
||||
genSpaces = f: map builtins.toString (builtins.genList f wsAmount);
|
||||
workspaces = genSpaces (x: x + 1);
|
||||
xsession.windowManager.i3 = let
|
||||
modifier = "Mod4";
|
||||
wsAmount = 10;
|
||||
genSpaces = f: map builtins.toString (builtins.genList f wsAmount);
|
||||
workspaces = genSpaces (x: x + 1);
|
||||
in {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = modifier;
|
||||
terminal = "alacritty";
|
||||
menu = "rofi -show drun";
|
||||
|
||||
in {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = modifier;
|
||||
terminal = "alacritty";
|
||||
menu = "rofi -show drun";
|
||||
window = {
|
||||
titlebar = false;
|
||||
hideEdgeBorders = "smart";
|
||||
};
|
||||
|
||||
window = {
|
||||
titlebar = false;
|
||||
hideEdgeBorders = "smart";
|
||||
defaultWorkspace = "workspace number 1";
|
||||
workspaceAutoBackAndForth = true;
|
||||
focus.wrapping = "yes";
|
||||
|
||||
# startup = [ ] ++ lib.optionals config.mods.social.enable [{
|
||||
# command = "exec vesktop";
|
||||
# }];
|
||||
|
||||
assigns = {
|
||||
"2" = [{class = "Vesktop";}];
|
||||
"3" = [{class = "^Steam$";}];
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
# modKeyComb: string -> valueAction: string
|
||||
# -> keys: [string] -> values: [string]
|
||||
# -> keybindings: attrSet { string -> string }
|
||||
zipBinds = comb: action: keys: values: (builtins.listToAttrs (zipListsWith (k: v: {
|
||||
name = "${modifier}${comb}${k}";
|
||||
value = "${action} ${v}";
|
||||
})
|
||||
keys
|
||||
values));
|
||||
|
||||
moveKeys = ["h" "j" "k" "l"];
|
||||
moveDirs = ["left" "down" "up" "right"];
|
||||
|
||||
workspKeys = genSpaces (x: mod (x + 1) wsAmount);
|
||||
in
|
||||
mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
|
||||
// (zipBinds "+Shift+" "move" moveKeys moveDirs)
|
||||
// (zipBinds "+" "workspace number" workspKeys workspaces)
|
||||
// (zipBinds "+Shift+" "move container to workspace number" workspKeys
|
||||
workspaces)
|
||||
// {
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +2%";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -2%";
|
||||
"Print" = "exec ${getExe fsss}";
|
||||
});
|
||||
|
||||
bars = let
|
||||
status_conf = "${config.xdg.configHome}/i3status-rust/config-default.toml";
|
||||
stylix_bar =
|
||||
{
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
statusCommand = "${getExe pkgs.i3status-rust} ${status_conf}";
|
||||
command = "${pkgs.i3}/bin/i3bar";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
trayOutput = "primary";
|
||||
}
|
||||
// config.lib.stylix.i3.bar;
|
||||
in [stylix_bar];
|
||||
};
|
||||
|
||||
defaultWorkspace = "workspace number 1";
|
||||
workspaceAutoBackAndForth = true;
|
||||
focus.wrapping = "yes";
|
||||
|
||||
# startup = [ ] ++ lib.optionals config.mods.social.enable [{
|
||||
# command = "exec vesktop";
|
||||
# }];
|
||||
|
||||
assigns = {
|
||||
"2" = [{ class = "Vesktop"; }];
|
||||
"3" = [{ class = "^Steam$"; }];
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
# modKeyComb: string -> valueAction: string
|
||||
# -> keys: [string] -> values: [string]
|
||||
# -> keybindings: attrSet { string -> string }
|
||||
zipBinds = comb: action: keys: values:
|
||||
(builtins.listToAttrs (zipListsWith (k: v: {
|
||||
name = "${modifier}${comb}${k}";
|
||||
value = "${action} ${v}";
|
||||
}) keys values));
|
||||
|
||||
moveKeys = [ "h" "j" "k" "l" ];
|
||||
moveDirs = [ "left" "down" "up" "right" ];
|
||||
|
||||
workspKeys = genSpaces (x: mod (x + 1) wsAmount);
|
||||
|
||||
in mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
|
||||
// (zipBinds "+Shift+" "move" moveKeys moveDirs)
|
||||
// (zipBinds "+" "workspace number" workspKeys workspaces)
|
||||
// (zipBinds "+Shift+" "move container to workspace number" workspKeys
|
||||
workspaces) // {
|
||||
"XF86AudioRaiseVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 +2%";
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 -2%";
|
||||
"Print" = "exec ${getExe fsss}";
|
||||
});
|
||||
|
||||
bars = let
|
||||
status_conf =
|
||||
"${config.xdg.configHome}/i3status-rust/config-default.toml";
|
||||
stylix_bar = {
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
statusCommand = "${getExe pkgs.i3status-rust} ${status_conf}";
|
||||
command = "${pkgs.i3}/bin/i3bar";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
trayOutput = "primary";
|
||||
} // config.lib.stylix.i3.bar;
|
||||
in [ stylix_bar ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue