From 0deb6af2a7a5f133be87c58828c562ffeda66ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 25 Dec 2022 23:02:09 -0300 Subject: [PATCH] bmenu: remove legacy scrpit and add new alternate background option --- scripts/bmenu | 1 + scripts/bmenu.nix | 83 ----------------------------------------------- user/bmenu.nix | 2 ++ 3 files changed, 3 insertions(+), 83 deletions(-) delete mode 100644 scripts/bmenu.nix diff --git a/scripts/bmenu b/scripts/bmenu index d585be6..11e3742 100644 --- a/scripts/bmenu +++ b/scripts/bmenu @@ -55,6 +55,7 @@ dhist wrap -- bemenu \ --tb "$tb" --tf "$tf" \ --fb "$fb" --ff "$ff" \ --nb "$nb" --nf "$nf" \ + --ab "$ab" --af "$af" \ --hb "$hb" --hf "$hf" \ $argv diff --git a/scripts/bmenu.nix b/scripts/bmenu.nix deleted file mode 100644 index 56d7394..0000000 --- a/scripts/bmenu.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in pkgs.writeScriptBin "bmenu" '' - #!${pkgs.fish}/bin/fish - - # wrapper around bemenu - # bmenu * - use as dmenu, -p for custom prompt (man bemenu) - # bmenu run - select from .desktop files and run it - # bmenu start - internal option - - set swaymsg ${pkgs.sway}/bin/swaymsg - set swaymsg ${pkgs.sway}/bin/swaymsg - - if test "$argv[1]" = "run" - test -n "$argv[2]" && set t "$argv[2]" || set t "terminal" - - test -n "$i3SOCK" && set wrapper 'i3-msg exec --' - test -n "$SWAYSOCK" && set wrapper 'swaymsg exec --' - - exec ${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop \ - --dmenu="bmenu start -p Iniciar:" \ - --term "$t" \ - --wrapper="$wrapper" \ - --no-generic - end - - if test -n "$SWAYSOCK" - swaymsg -t get_tree | - ${pkgs.jq}/bin/jq -je '..|select(.focused? and .fullscreen_mode? == 1)|""' && - ${pkgs.sway}/bin/swaymsg -q fullscreen off && - set fullscreen - - ${pkgs.sway}/bin/swaymsg -t get_outputs | - ${pkgs.jq}/bin/jq -r 'map(.focused)|reverse|index(true)' | - read focused_output - - test -n "$focused_output" - and set focused_output "-m $focused_output" - end - - function clean_exit - set -q fullscreen - and swaymsg -q fullscreen on & - end - - trap clean_exit EXIT - - # t title - # f filter - # n normal - # h highlighted - # s selected - # sc scrollbar - - set fn "${font.mono} ${toString font.size.small}" - - set tb "${color.bg}${theme.opacityHex}" - set tf "${accent.color}" - - set fb "${color.bg}${theme.opacityHex}" - set ff "${color.txt}" - - set nb "${color.bg}${theme.opacityHex}" - set nf "${color.txt}" - set hb "${accent.color}" - set hf "${accent.fg}" - - ${pkgs.dhist}/bin/dhist wrap -- ${pkgs.bemenu}/bin/bemenu \ - $focused_output\ - --ignorecase\ - --bottom\ - --no-overlap\ - --list 20\ - --prefix '>'\ - --fn "$fn"\ - --tb "$tb" --tf "$tf" \ - --fb "$fb" --ff "$ff" \ - --nb "$nb" --nf "$nf" \ - --hb "$hb" --hf "$hf" \ - $argv - - # vim: ft=fish -'' diff --git a/user/bmenu.nix b/user/bmenu.nix index 1be3ee7..8ea6499 100644 --- a/user/bmenu.nix +++ b/user/bmenu.nix @@ -14,6 +14,8 @@ in { set nb "${color.bg}${theme.opacityHex}" set nf "${color.txt}" + set ab "${color.bg}${theme.opacityHex}" + set af "${color.txt}" set hb "${accent.color}" set hf "${accent.fg}" '';