Replace wofi with tofi.
This commit is contained in:
parent
dcffced35a
commit
1535800e2f
@ -6,7 +6,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
# TODO: Maybe replace wofi with tofi (with config to make it start quickly)
|
||||
sway-config = pkgs.writeTextFile {
|
||||
name = "config";
|
||||
text = ''
|
||||
@ -31,7 +30,8 @@ let
|
||||
# Your preferred application launcher
|
||||
# Note: it's recommended that you pass the final command to sway
|
||||
# set $menu dmenu_path | dmenu | xargs swaymsg exec
|
||||
set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark
|
||||
set $menu ${pkgs.tofi}/bin/tofi-drun | xargs swaymsg exec --
|
||||
#set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark
|
||||
|
||||
# Do not show a title bar on windows
|
||||
default_border pixel 2
|
||||
@ -332,7 +332,8 @@ in
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
files = [
|
||||
".cache/wofi-drun" # Execution history for wofi to sort results
|
||||
".local/state/tofi-drun-history" # A cache of the desktop files for tofi
|
||||
".cache/tofi-drun" # Execution history for tofi to sort results
|
||||
];
|
||||
};
|
||||
};
|
||||
|
3
nix/configuration/roles/sway/files/tofi-config
Normal file
3
nix/configuration/roles/sway/files/tofi-config
Normal file
@ -0,0 +1,3 @@
|
||||
border-width = 4
|
||||
outline-width = 1
|
||||
border-color = #FF6600
|
@ -10,7 +10,7 @@ let
|
||||
name = "rofimoji.conf";
|
||||
text = ''
|
||||
# Emoji selector
|
||||
bindsym $mod+backslash exec ${pkgs.rofimoji}/bin/rofimoji --selector wofi
|
||||
bindsym $mod+backslash exec ${pkgs.rofimoji}/bin/rofimoji --selector tofi
|
||||
'';
|
||||
};
|
||||
in
|
||||
@ -39,14 +39,31 @@ in
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
rofimoji = prev.rofimoji.overrideAttrs (old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.wofi ];
|
||||
# postPatch =
|
||||
# old.postPatch
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.tofi ];
|
||||
# postInstall =
|
||||
# old.postInstall
|
||||
# + ''
|
||||
# wrapProgram $out/bin/rofimoji --prefix PATH : ${lib.makeBinPath [ pkgs.wofi ]}
|
||||
# '';
|
||||
src = builtins.fetchGit {
|
||||
# https://github.com/fdw/rofimoji/issues/209
|
||||
url = "https://github.com/fdw/rofimoji.git";
|
||||
rev = "615f00abeb984f3e648ef712164aa4e61f2e1808";
|
||||
};
|
||||
});
|
||||
})
|
||||
(final: prev: {
|
||||
tofi = prev.tofi.overrideAttrs (old: {
|
||||
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.makeWrapper ];
|
||||
postInstall =
|
||||
old.postInstall or ""
|
||||
+ ''
|
||||
wrapProgram $out/bin/tofi-drun --add-flags --font=${pkgs.source-sans-pro}/share/fonts/opentype/SourceSansPro-Regular.otf --add-flags --config=${./files/tofi-config}
|
||||
wrapProgram $out/bin/tofi --add-flags --config=${./files/tofi-config}
|
||||
'';
|
||||
});
|
||||
})
|
||||
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user