Sway : Use fuzzel for launcher.

This commit is contained in:
Dmitry Voronin 2024-06-23 00:40:52 +03:00
parent 8dda43271e
commit b9cb5480b3
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
7 changed files with 44 additions and 21 deletions

View file

@ -1,9 +1,10 @@
{ pkgs, ... }: {
{ pkgs, setting, ... }: {
variables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
NIXPKGS_ALLOW_UNFREE = "1";
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
TERM = "xterm-256color";
TERMINAL = setting.terminal;
};
}

View file

@ -10,7 +10,8 @@ in {
# Application launcher.
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "${fontName} ${fontSize}" -M ${bg}D9 -S ${bg}D9 -N ${bg}D9 -m ${accent} -s ${accent} -n ${fg} | xargs swaymsg exec --
# set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "${fontName} ${fontSize}" -M ${bg}D9 -S ${bg}D9 -N ${bg}D9 -m ${accent} -s ${accent} -n ${fg} | xargs swaymsg exec --
set $menu fuzzel
bindsym $mod+${key.action.launch} exec $menu
'';

View file

@ -53,9 +53,6 @@ in {
# timezone = "America/New_York";
tooltip-format = "<big><tt>{calendar}</tt></big>";
format-alt = "{:%d %a %H:%M}";
calendar = {
on-scroll = 1;
};
};
battery = {
states = {

View file

@ -45,7 +45,6 @@
foot = {
font = {
step = 1;
dpi = true;
};
};
@ -64,5 +63,8 @@
ollama.primaryModel = "llama3";
browser = "firefox-esr";
browser = "firefox-esr";
terminal = "foot";
dpiAware = true;
}

View file

@ -13,6 +13,7 @@
btop = import ./top/btop args;
editor = import ./editorconfig args;
foot = import ./foot args;
fuzzel = import ./fuzzel args;
gtk3 = import ./gtk/3 args;
htop = import ./top/htop args;
keyd = import ./keyd args;
@ -29,18 +30,19 @@ in {
homeDirectory = homeDir;
stateVersion = const.stateVersion;
file = {
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".source = foot.file;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.text;
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".source = mako.file;
".config/yazi/init.lua".source = yazi.init;
".config/yazi/keymap.toml".source = yazi.keymap;
".config/yazi/yazi.toml".source = yazi.yazi;
".editorconfig".source = editor.file;
".parallel/will-cite".text = "";
"media/template".source = ./template;
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".source = foot.file;
".config/fuzzel/fuzzel.ini".source = fuzzel.file;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.text;
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".source = mako.file;
".config/yazi/init.lua".source = yazi.init;
".config/yazi/keymap.toml".source = yazi.keymap;
".config/yazi/yazi.toml".source = yazi.yazi;
".editorconfig".source = editor.file;
".parallel/will-cite".text = "";
"media/template".source = ./template;
};
};

View file

@ -1,5 +1,5 @@
{ style, setting, pkgs, ... }: let
dpiaware = if setting.foot.font.dpi then "yes" else "no";
dpiAware = if setting.dpiAware then "yes" else "no";
in {
file = (pkgs.formats.iniWithGlobalSection {}).generate "FootConfig" {
globalSection = {
@ -7,7 +7,7 @@ in {
# font-bold = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
font-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
font-bold-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
dpi-aware = dpiaware;
dpi-aware = dpiAware;
font-size-adjustment = setting.foot.font.step;
};

View file

@ -0,0 +1,20 @@
{ pkgs, style, setting, ... }: let
dpiAware = if setting.dpiAware then "yes" else "no";
in {
file = (pkgs.formats.ini {}).generate "FuzzelConfig" {
main = {
font = "${style.font.serif.name}:size=${toString style.font.size.popup}";
dpi-aware = dpiAware;
show-actions = "yes";
terminal = setting.terminal;
list-executables-in-path = "no";
lines = 20;
width = 40;
# prompt = "\"$ \""
};
border = {
radius = 0;
width = 1;
};
};
}