Skip to content

Commit

Permalink
feat: tofi improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Aug 17, 2024
1 parent e518b99 commit be0fa79
Show file tree
Hide file tree
Showing 6 changed files with 1,982 additions and 332 deletions.
4 changes: 2 additions & 2 deletions system/wayland/desktop/wrapped/river/binds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# note that we call footclient from vanilla unwrapped foot package
"Super+Shift Return spawn ${pkgs.foot}/bin/footclient"
"None XF86Favorites spawn infoscript"
"None XF86Keyboard spawn tofi-emoji"
"None XF86Display spawn waylock"
"None XF86Keyboard spawn 'launcher -show emoji'"
"Super Space spawn 'launcher -show drun'"
"Super Space spawn 'tofi-drun | xargs -0 riverctl spawn'"
"Super+Shift S spawn '${getExe pkgs.slurp} | ${getExe pkgs.grim} -g - - | ${pkgs.wl-clipboard}/bin/wl-copy'"

"Super Q close"
Expand Down
25 changes: 0 additions & 25 deletions system/wayland/desktop/wrapped/rofi/default.nix

This file was deleted.

305 changes: 0 additions & 305 deletions system/wayland/desktop/wrapped/rofi/rasi.nix

This file was deleted.

46 changes: 46 additions & 0 deletions system/wayland/desktop/wrapped/tofi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
pkgs,
colors,
...
}: let
config = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue {} (with colors; {
anchor = "center";
width = 500;
height = 300;
horizontal = false;
font-size = 14;
prompt-text = "> ";
font = "monospace";
ascii-input = false;
outline-width = 5;
outline-color = "#${base02}";
border-width = 2;
border-color = "#${base05}";
background-color = "#${base00}";
text-color = "#${base05}";
selection-color = "#${base0B}";
min-input-width = 120;
late-keyboard-init = true;
result-spacing = 10;
padding-top = 15;
padding-bottom = 15;
padding-left = 15;
padding-right = 15;
}));
in
pkgs.symlinkJoin {
name = "tofi-wrapped";
paths =
[
pkgs.tofi
]
++ (import ./scripts.nix {inherit pkgs;});
buildInputs = [pkgs.makeWrapper];
# we don't want to wrap tofi-emoji, yet we want it wrapped in the same package
# NOTE: {this,type,of} syntax is undefined in posix :c
postBuild = ''
wrapProgram $out/bin/tofi --add-flags "--config ${config}";
wrapProgram $out/bin/tofi-run --add-flags "--config ${config}";
wrapProgram $out/bin/tofi-drun --add-flags "--config ${config}";
'';
}
Loading

0 comments on commit be0fa79

Please sign in to comment.