This commit is contained in:
unexplrd
2025-02-06 00:33:06 +02:00
commit 2e6e28ef32
254 changed files with 28562 additions and 0 deletions

View File

@ -0,0 +1,68 @@
# with import <nixpkgs> {}; # bring all of Nixpkgs into scope
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
makeWrapper,
dbus,
libpulseaudio,
notmuch,
openssl,
ethtool,
lm_sensors,
iw,
iproute2,
withICUCalendar ? false,
}:
rustPlatform.buildRustPackage rec {
pname = "i3status-rust";
version = "0.33.2";
src = fetchFromGitHub {
owner = "greshake";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-xJm4MsEU0OVX401WvKllg3zUwgCvjLxlAQzXE/oD1J0=";
};
cargoHash = "sha256-9jbJVnZhFbMYldBkRVSIiorUYDNtF3AAwNEpyNJXpjo=";
nativeBuildInputs = [pkg-config makeWrapper];
buildInputs = [dbus libpulseaudio notmuch openssl lm_sensors];
buildFeatures =
[
"notmuch"
"maildir"
"pulseaudio"
]
++ (lib.optionals withICUCalendar ["icu_calendar"]);
prePatch = ''
substituteInPlace src/util.rs \
--replace "/usr/share/i3status-rust" "$out/share"
'';
postInstall = ''
mkdir -p $out/share
cp -R examples files/* $out/share
'';
postFixup = ''
wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [iproute2 ethtool iw]}
'';
# Currently no tests are implemented, so we avoid building the package twice
doCheck = false;
meta = with lib; {
description = "Very resource-friendly and feature-rich replacement for i3status";
homepage = "https://github.com/greshake/i3status-rust";
license = licenses.gpl3Only;
mainProgram = "i3status-rs";
maintainers = with maintainers; [backuitist globin];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,308 @@
{
config,
pkgs,
...
}: {
home.packages = [pkgs.jay];
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
config.jay = {
default = ["gtk"];
"org.freedesktop.impl.portal.ScreenCast" = ["jay"];
"org.freedesktop.impl.portal.RemoteDesktop" = ["jay"];
"org.freedesktop.impl.portal.Inhibit" = ["none"];
"org.freedesktop.impl.portal.FileChooser" = ["gtk4"];
};
};
programs.i3status-rust = {
enable = true;
package = pkgs.callPackage ./i3status-rust-0-33-2.nix {};
bars = {
default = {
theme = "plain";
blocks = [
{
alert = 10.0;
block = "disk_space";
info_type = "available";
interval = 60;
path = "/";
warning = 20.0;
}
{
block = "memory";
format = " $icon mem_used_percents ";
format_alt = " $icon $swap_used_percents ";
}
{
block = "cpu";
interval = 1;
}
{
block = "load";
format = " $icon $1m ";
interval = 1;
}
{
block = "sound";
}
{
block = "time";
format = " $timestamp.datetime(f:'%a %d/%m %R') ";
interval = 60;
}
];
};
};
};
programs.i3status = {
enable = true;
enableDefault = true;
general = {
output_format = "i3bar";
interval = 1;
};
};
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "${pkgs.wezterm}/bin/wezterm -e";
fields = "filename,name,generic,keywords,categories,exec";
dpi-aware = false;
horizontal-pad = 0;
vertical-pad = 0;
show-actions = true;
match-mode = "fuzzy";
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
};
border = {
width = 3;
radius = 12;
};
};
};
xdg.configFile.jay = {
target = "jay/config.toml";
recursive = true;
source = (pkgs.formats.toml {}).generate "jay-config" {
keymap = ''
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
};
'';
on-graphics-initialized = [
# {
# type = "exec";
# exec = "mako";
# }
{
type = "exec";
exec = "~/wl-tray-bridge/target/release/wl-tray-bridge";
}
];
outputs = [
{
match.connector = "eDP-1";
scale = 1.2;
}
];
vrr = {
mode = "always";
cursor-hz = 75;
};
repeat-rate = {
rate = 50;
delay = 200;
};
theme = {
bg-color = "#${config.lib.stylix.colors.base00}";
bar-bg-color = "#${config.lib.stylix.colors.base00}";
border-color = "#${config.lib.stylix.colors.base0D}";
separator-color = "#${config.lib.stylix.colors.base01}";
bar-status-text-color = "#${config.lib.stylix.colors.base05}";
focused-title-text-color = "#${config.lib.stylix.colors.base07}";
focused-title-bg-color = "#${config.lib.stylix.colors.base00}";
focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}";
focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}";
unfocused-title-text-color = "#${config.lib.stylix.colors.base03}";
unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}";
attention-requested-bg-color = "#${config.lib.stylix.colors.base09}";
font = "${config.stylix.fonts.sansSerif.name}";
border-width = 2;
title-height = 24;
};
status = {
format = "pango";
exec = ["i3status-rs" "config-default"];
};
window-management-key = "Super_L";
shortcuts = let
left = "n";
down = "e";
up = "u";
right = "i";
in {
"logo-${left}" = "focus-left";
"logo-${down}" = "focus-down";
"logo-${up}" = "focus-up";
"logo-${right}" = "focus-right";
"logo-shift-${left}" = "move-left";
"logo-shift-${down}" = "move-down";
"logo-shift-${up}" = "move-up";
"logo-shift-${right}" = "move-right";
logo-d = "split-horizontal";
logo-v = "split-vertical";
logo-t = "toggle-split";
logo-m = "toggle-mono";
logo-shift-m = "toggle-fullscreen";
logo-f = "focus-parent";
logo-q = "close";
logo-shift-f = "toggle-floating";
alt-Return = {
type = "exec";
exec = "wezterm";
};
logo-space = {
type = "exec";
exec = "fuzzel";
};
logo-ctrl-q = "quit";
logo-shift-r = "reload-config-toml";
ctrl-alt-F1 = {
type = "switch-to-vt";
num = 1;
};
ctrl-alt-F2 = {
type = "switch-to-vt";
num = 2;
};
ctrl-alt-F3 = {
type = "switch-to-vt";
num = 3;
};
ctrl-alt-F4 = {
type = "switch-to-vt";
num = 4;
};
ctrl-alt-F5 = {
type = "switch-to-vt";
num = 5;
};
ctrl-alt-F6 = {
type = "switch-to-vt";
num = 6;
};
ctrl-alt-F7 = {
type = "switch-to-vt";
num = 7;
};
ctrl-alt-F8 = {
type = "switch-to-vt";
num = 8;
};
ctrl-alt-F9 = {
type = "switch-to-vt";
num = 9;
};
ctrl-alt-F10 = {
type = "switch-to-vt";
num = 10;
};
ctrl-alt-F11 = {
type = "switch-to-vt";
num = 11;
};
ctrl-alt-F12 = {
type = "switch-to-vt";
num = 12;
};
logo-1 = {
type = "show-workspace";
name = "1";
};
logo-2 = {
type = "show-workspace";
name = "2";
};
logo-3 = {
type = "show-workspace";
name = "3";
};
logo-4 = {
type = "show-workspace";
name = "4";
};
logo-5 = {
type = "show-workspace";
name = "5";
};
logo-6 = {
type = "show-workspace";
name = "6";
};
logo-7 = {
type = "show-workspace";
name = "7";
};
logo-8 = {
type = "show-workspace";
name = "8";
};
logo-9 = {
type = "show-workspace";
name = "9";
};
logo-0 = {
type = "show-workspace";
name = "10";
};
logo-shift-1 = {
type = "move-to-workspace";
name = "1";
};
logo-shift-2 = {
type = "move-to-workspace";
name = "2";
};
logo-shift-3 = {
type = "move-to-workspace";
name = "3";
};
logo-shift-4 = {
type = "move-to-workspace";
name = "4";
};
logo-shift-5 = {
type = "move-to-workspace";
name = "5";
};
logo-shift-6 = {
type = "move-to-workspace";
name = "6";
};
logo-shift-7 = {
type = "move-to-workspace";
name = "7";
};
logo-shift-8 = {
type = "move-to-workspace";
name = "8";
};
logo-shift-9 = {
type = "move-to-workspace";
name = "9";
};
logo-shift-0 = {
type = "move-to-workspace";
name = "10";
};
};
};
};
}