Compare commits
2 commits
1b6a3b9ac6
...
b218264db7
Author | SHA1 | Date | |
---|---|---|---|
b218264db7 | |||
2f90414bff |
4 changed files with 41 additions and 2 deletions
|
@ -9,12 +9,14 @@ with lib; let
|
||||||
hm = config.home-manager.users.${config.custom.username};
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
|
|
||||||
cliphist = getExe hm.services.cliphist.package;
|
cliphist = getExe hm.services.cliphist.package;
|
||||||
|
echo = getExe' pkgs.coreutils "echo";
|
||||||
networkmanager_dmenu = getExe pkgs.networkmanager_dmenu;
|
networkmanager_dmenu = getExe pkgs.networkmanager_dmenu;
|
||||||
notify-send = getExe pkgs.libnotify;
|
notify-send = getExe pkgs.libnotify;
|
||||||
pkill = getExe' pkgs.procps "pkill";
|
pkill = getExe' pkgs.procps "pkill";
|
||||||
rofi = getExe hm.programs.rofi.finalPackage;
|
rofi = getExe hm.programs.rofi.finalPackage;
|
||||||
rofi-rbw = getExe pkgs.rofi-rbw;
|
rofi-rbw = getExe pkgs.rofi-rbw;
|
||||||
rofimoji = getExe pkgs.rofimoji;
|
rofimoji = getExe pkgs.rofimoji;
|
||||||
|
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||||
in {
|
in {
|
||||||
options.custom.menus.rofi = {
|
options.custom.menus.rofi = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
|
@ -26,7 +28,14 @@ in {
|
||||||
quit = "${pkill} --exact rofi";
|
quit = "${pkill} --exact rofi";
|
||||||
in {
|
in {
|
||||||
show = "${quit} || ${rofi} -show drun -show-icons";
|
show = "${quit} || ${rofi} -show drun -show-icons";
|
||||||
calculator.show = "${quit} || ${rofi} -show calc";
|
|
||||||
|
calculator.show = concatStringsSep " " [
|
||||||
|
"${quit} || ${rofi}"
|
||||||
|
"-show calc"
|
||||||
|
"-no-history"
|
||||||
|
"-calc-error-color '#dc322f'"
|
||||||
|
''-calc-command "${echo} -n '{result}' | ${wl-copy}"''
|
||||||
|
];
|
||||||
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
show = "${quit} || ${rofi} -show clipboard -show-icons";
|
show = "${quit} || ${rofi} -show clipboard -show-icons";
|
||||||
|
|
|
@ -21,6 +21,7 @@ with lib; {
|
||||||
nixgl.enable = true;
|
nixgl.enable = true;
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
|
qalculate.enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
sudo.enable = true;
|
sudo.enable = true;
|
||||||
|
|
30
options/custom/programs/qalculate.nix
Normal file
30
options/custom/programs/qalculate.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.custom.programs.qalculate;
|
||||||
|
in {
|
||||||
|
options.custom.programs.qalculate = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# https://github.com/Qalculate/libqalculate
|
||||||
|
# https://qalculate.github.io/manual/qalc.html
|
||||||
|
environment.systemPackages = [pkgs.libqalculate];
|
||||||
|
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
|
xdg.configFile = {
|
||||||
|
# https://github.com/svenstaro/rofi-calc?tab=readme-ov-file#advanced-usage
|
||||||
|
"qalculate/qalc.cfg".text = ''
|
||||||
|
digit_grouping=2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -28,7 +28,6 @@ in {
|
||||||
fzf # Fuzzy search
|
fzf # Fuzzy search
|
||||||
jq # JSON parser
|
jq # JSON parser
|
||||||
killport # Kill processes on port
|
killport # Kill processes on port
|
||||||
libqalculate # Calculator
|
|
||||||
lf # Terminal file manager
|
lf # Terminal file manager
|
||||||
lm_sensors # System sensors
|
lm_sensors # System sensors
|
||||||
nix-output-monitor # Nix build parser
|
nix-output-monitor # Nix build parser
|
||||||
|
|
Loading…
Add table
Reference in a new issue