From 7dc7435b1a39865e08e202411c94f13a9ddc4515 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 13 Feb 2025 22:04:38 +0800 Subject: [PATCH] docs: add suggest wofi config --- README.md | 1 + config.def.h | 4 ++-- wofi/config | 16 +++++++++++++ wofi/menu | 16 +++++++++++++ wofi/menu.css | 5 ++++ wofi/style.css | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 104 insertions(+), 2 deletions(-) create mode 100755 wofi/config create mode 100755 wofi/menu create mode 100755 wofi/menu.css create mode 100755 wofi/style.css diff --git a/README.md b/README.md index 4ad0c9f..8ac009f 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ mkdir -p ~/.config/maomao/ # some suggest config cp autostart.sh ~/.config/maomao/ cp waybar ~/.config/maomao/ -r +cp wofi ~/.config/maomao/ -r cp wallpaper ~/.config/maomao/ -r diff --git a/config.def.h b/config.def.h index 864151f..51cfb56 100644 --- a/config.def.h +++ b/config.def.h @@ -190,12 +190,12 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA /* commands */ static const char *termcmd[] = { "foot", NULL }; -static const char *menucmd[] = { "wofi", NULL }; +/* static const char *menucmd[] = { "wofi", NULL }; */ static const Key keys[] = { /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */ /* modifier key function argument */ - { MODKEY, XKB_KEY_space, spawn, {.v = menucmd} }, + { MODKEY, XKB_KEY_space, spawn, SHCMD("wofi --normal-window ~/.config/maomao/wofi/config") }, { MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} }, // add your custom cmd key bind like this diff --git a/wofi/config b/wofi/config new file mode 100755 index 0000000..990bdc4 --- /dev/null +++ b/wofi/config @@ -0,0 +1,16 @@ +width=660 +height=325 +#location=center +show=drun +prompt=Search... +filter_rate=100 +allow_markup=true +no_actions=true +halign=fill +orientation=vertical +content_halign=fill +insensitive=true +allow_images=true +image_size=40 +gtk_dark=true +layer=overlay diff --git a/wofi/menu b/wofi/menu new file mode 100755 index 0000000..a0cf646 --- /dev/null +++ b/wofi/menu @@ -0,0 +1,16 @@ +# Config for wofi-wifi-menu + +# position values: +# 1 2 3 +# 8 0 4 +# 7 6 5 +POSITION=3 + +#y-offset +YOFF=15 + +#x-offset +XOFF=-30 + +#fields to be displayed +FIELDS=SSID,IN-USE,BARS,SECURITY diff --git a/wofi/menu.css b/wofi/menu.css new file mode 100755 index 0000000..aae4053 --- /dev/null +++ b/wofi/menu.css @@ -0,0 +1,5 @@ +@import ".config/wofi/style.css"; +window { + font-family: "FiraCode Nerd Font Mono"; + font-size: 13px; +} diff --git a/wofi/style.css b/wofi/style.css new file mode 100755 index 0000000..2a39af6 --- /dev/null +++ b/wofi/style.css @@ -0,0 +1,64 @@ +#window { + margin: 0px; + border: 2px solid #bca0cc; + background-color: rgba(14, 15, 0, 0.8); + border-radius: 15px; +} + +#test { + margin: 0px; + border: 2px solid rgba(93, 74, 22, 0.7); + background-color: #C66E25; + border-radius: 15px; +} + +#input { + margin: 5px; + padding-bottom: 10px; + border: none; + color: #d3d3ce; + border-radius: 15px; + background-color: rgba(14, 15, 0, 0.2); +} + +#outer-box { + margin: 5px; + border: none; + border-radius: 15px; + padding-left: 15px; + padding-right: 15px; + padding-top: 15px; + padding-bottom: 15px; + background-color:rgba(0, 0, 0, 0); + } + +#scroll { + margin: 0px; + border-radius: 15px; + border: none; +} + +#text { + border-radius: 15px; + margin: 5px; + border: none; + color: #d3d3ce; +} + +/* #entry.activatable #text { + color: #282a36; + } + + #entry > * { + color: #d3d3ce; + } */ + +#entry:selected { + border-radius: 15px; + background-color: #a68ebd; +} + +#entry:selected #text { + color: #000000; + border-radius: 15px; +}