some improvements, dmenu.conf is now theme.conf compatible

This commit is contained in:
speedie 2023-05-01 18:01:47 +02:00
parent 5f54e20a2b
commit be13a65ff5
3 changed files with 10 additions and 19 deletions

View file

@ -518,7 +518,7 @@ togglehighlight(Arg *arg)
void void
setprofile(Arg *arg) setprofile(Arg *arg)
{ {
if (!system("spmenu_profile --spmenu-set-profile")) if (!system("command -v spmenu_profile > /dev/null && spmenu_profile --spmenu-set-profile"))
die("spmenu: failed to run profile menu\n"); die("spmenu: failed to run profile menu\n");
else else
exit(0); exit(0);

View file

@ -1,12 +1,12 @@
/* spmenu dmenu theme /* spmenu dmenu theme
* *
* This config should match vanilla dmenu as closely as possible. I am unable to tell the difference between the two. It should be noted though that SGR sequences are still displayed, so for this reason I've set them all to white. * This config should match vanilla dmenu as closely as possible. I am unable to tell the difference between the two. Note that neither Pango markup or SGR sequences are interpreted and they will be displayed as-is. You can change this if you want.
*
* Also note that this config disables .Xresources, Pango and SGR sequence support, you can reenable it below if you want.
* For perfect dmenu compatibility, you may want to remap keybindings, making sure all of them work in "any mode". * For perfect dmenu compatibility, you may want to remap keybindings, making sure all of them work in "any mode".
*
* To use, simply copy to ~/.config/spmenu/theme.conf
*/ */
spmenu = { theme = {
// General window options // General window options
window = ( { alpha = 0; window = ( { alpha = 0;
} ); } );
@ -125,18 +125,6 @@ spmenu = {
image = 1; image = 1;
} ); } );
// Match options
match = ( { sort = 1;
casesensitive = 1;
fuzzy = 0;
} );
// Xrdb
// .Xresources is disabled by default
xrdb = ( { xresources = 0;
global = 0;
} );
// Pango // Pango
pango = ( { item = 0; pango = ( { item = 0;
highlight = 0; highlight = 0;

View file

@ -1,7 +1,10 @@
/* This is a sample theme. /* This is a sample theme.
* It simply sets the font to Terminus. * It simply sets the font to Terminus.
* *
* You can include this from your spmenu.conf using `@include "path/to/sample.theme`. Put it inside `text = ();` * Simply copy this to ~/.config/spmenu/theme.conf to apply.
*/ */
font = "Terminus 8"; theme = {
text = ( { font = "Terminus 8";
} );
};