Expand vertical dmenu to full screen (10 lines, 240x296) and rename St menu item to Terminal
This commit is contained in:
@@ -27,7 +27,7 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (`v
|
|||||||
- **Cross-compiled Xlibre (`X11Libre/xserver` 25.2.0)**: compiled specifically for ARMv7 Cortex-A7 (`-O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fno-plt -fomit-frame-pointer`) with all 3D/GLX/Glamor/VGA/DGA/XVideo bloat stripped out, rootless `elogind` device management, and `modesetting` KMS + `ShadowFB` (`drmModeDirtyFB` partial rectangle SPI updates) with automatic software cursor fallback on `/dev/dri/card0` (`panel-mipi-dbi`).
|
- **Cross-compiled Xlibre (`X11Libre/xserver` 25.2.0)**: compiled specifically for ARMv7 Cortex-A7 (`-O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fno-plt -fomit-frame-pointer`) with all 3D/GLX/Glamor/VGA/DGA/XVideo bloat stripped out, rootless `elogind` device management, and `modesetting` KMS + `ShadowFB` (`drmModeDirtyFB` partial rectangle SPI updates) with automatic software cursor fallback on `/dev/dri/card0` (`panel-mipi-dbi`).
|
||||||
- **Non-Nerd `Fira Code` with OpenType ligatures**: `Fira Code` (`font-fira-code`) is configured as the primary system and terminal font across Fontconfig, Xft, `st`, `dmenu`, `dwm`, `conky`, and `dunst`, with `DejaVu SansM Nerd Font` used strictly as a fallback for Private Use Area icon glyphs.
|
- **Non-Nerd `Fira Code` with OpenType ligatures**: `Fira Code` (`font-fira-code`) is configured as the primary system and terminal font across Fontconfig, Xft, `st`, `dmenu`, `dwm`, `conky`, and `dunst`, with `DejaVu SansM Nerd Font` used strictly as a fallback for Private Use Area icon glyphs.
|
||||||
- **Patched `sxmo-st` (`st`) with HarfBuzz ligatures & XIM**: patched with `libharfbuzz` (`hb.c`/`hb.h`) shaping (`liga`, `calt`, `clig`, `dlig`) so multi-character programming operators (`->`, `=>`, `!=`, `<=`, `>=`, `===`, `::`, `//`, `/*`) render as continuous ligatures at `pixelsize=18`, alongside full `XIM` (`fcitx5-t9`) input support.
|
- **Patched `sxmo-st` (`st`) with HarfBuzz ligatures & XIM**: patched with `libharfbuzz` (`hb.c`/`hb.h`) shaping (`liga`, `calt`, `clig`, `dlig`) so multi-character programming operators (`->`, `=>`, `!=`, `<=`, `>=`, `===`, `::`, `//`, `/*`) render as continuous ligatures at `pixelsize=18`, alongside full `XIM` (`fcitx5-t9`) input support.
|
||||||
- **Patched `sxmo-dmenu` (`dmenu`) (`< 15 ms` startup)**: full-width `240x320` 9-line vertical menu (`lineheight = 26`, positioned flush at `Y = 24` right below the 24px `dwm` bar) with a `#383838` top search bar, `#005577` prompt badge, `#1c1c1c` item list, `XIM` (`XSetLocaleModifiers("")`, `XSetICFocus`, `Xutf8LookupString`) for live `fcitx5-t9` search filtering and `#` mode switching, C-level focus preservation (`prevfocuswin`), and direct Nokia keypad bindings.
|
- **Patched `sxmo-dmenu` (`dmenu`) (`< 15 ms` startup)**: full-screen `240x296` 10-line vertical menu (positioned flush at `Y = 24..320` right below the 24px `dwm` bar, with a `26px` search bar and ten `27px` item rows) with a `#383838` top search bar, `#005577` prompt badge, `#1c1c1c` item list, `XIM` (`XSetLocaleModifiers("")`, `XSetICFocus`, `Xutf8LookupString`) for live `fcitx5-t9` search filtering and `#` mode switching, C-level focus preservation (`prevfocuswin`), and direct Nokia keypad bindings.
|
||||||
- **Patched `sxmo-dwm` (`dwm`) (`< 2 ms` display wake/unlock & native plugin system)**: configured for `240x320` (`bh = 24`, `#323232` top bar, `#005577` active tag/border, vertical `bstack` layout default, overflow-protected Pango status bar rendering keeping the right-aligned clock always visible, and a transparent-backgrounded bottom desktop softkey bar displaying `"Menu"` and `"Names"` over the wallpaper). Directly polls `/dev/input/by-path/platform-gpio-keys-event` (`SW_LID`) and intercepts locked-state wake keys (`XF86PowerOff`, `XF86PickupPhone`, `XF86KbdLcdMenu1`, `XF86KbdLcdMenu2`) in C to toggle `/sys/class/backlight/backlight/brightness` and `/sys/class/leds/white:kbd_backlight/brightness` in `< 2 ms` before running Sxmo state hooks asynchronously.
|
- **Patched `sxmo-dwm` (`dwm`) (`< 2 ms` display wake/unlock & native plugin system)**: configured for `240x320` (`bh = 24`, `#323232` top bar, `#005577` active tag/border, vertical `bstack` layout default, overflow-protected Pango status bar rendering keeping the right-aligned clock always visible, and a transparent-backgrounded bottom desktop softkey bar displaying `"Menu"` and `"Names"` over the wallpaper). Directly polls `/dev/input/by-path/platform-gpio-keys-event` (`SW_LID`) and intercepts locked-state wake keys (`XF86PowerOff`, `XF86PickupPhone`, `XF86KbdLcdMenu1`, `XF86KbdLcdMenu2`) in C to toggle `/sys/class/backlight/backlight/brightness` and `/sys/class/leds/white:kbd_backlight/brightness` in `< 2 ms` before running Sxmo state hooks asynchronously.
|
||||||
- **Preloaded DWM plugins (`src/dwm-plugins/` & `src/xdrawer/`, `< 10 ms` FIFO wakeup)**: `dwm` dynamically loads `.so` plugins from `/usr/lib/dwm/plugins/` and `~/.local/lib/dwm/plugins/` (`xdrawer.so`, `dialer.so`, `calllog.so`, `contacts.so`) and preloads them as resident background daemons (`dwm-plugin <name> --preload`) at startup. Each daemon keeps its X11 window, offscreen `Pixmap`, Xft/Pango layouts (`15px` `Fira Code, DejaVuSansM Nerd Font`), and `stat()`-cached Sxmo TSV state initialized in memory while sleeping at 0% CPU on `/tmp/dwm_plugin_<name>.fifo`.
|
- **Preloaded DWM plugins (`src/dwm-plugins/` & `src/xdrawer/`, `< 10 ms` FIFO wakeup)**: `dwm` dynamically loads `.so` plugins from `/usr/lib/dwm/plugins/` and `~/.local/lib/dwm/plugins/` (`xdrawer.so`, `dialer.so`, `calllog.so`, `contacts.so`) and preloads them as resident background daemons (`dwm-plugin <name> --preload`) at startup. Each daemon keeps its X11 window, offscreen `Pixmap`, Xft/Pango layouts (`15px` `Fira Code, DejaVuSansM Nerd Font`), and `stat()`-cached Sxmo TSV state initialized in memory while sleeping at 0% CPU on `/tmp/dwm_plugin_<name>.fifo`.
|
||||||
2. **Multi-mode `fcitx5-t9` keypad engine (`src/fcitx5-t9/`)**:
|
2. **Multi-mode `fcitx5-t9` keypad engine (`src/fcitx5-t9/`)**:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Bananarchy targets an ultra-lightweight **Sxmo X11 (`sxmo-de-dwm`)** environment
|
|||||||
- **`Dialer` (`dialer.so` / `xdialer`)**: opens automatically from the idle desktop when pressing any **`0`–`9`, `*`, or `#` key** (inserting that character immediately), with live T9/number contact filtering, hold-`0` for `+`, and single-press **Call** dialing.
|
- **`Dialer` (`dialer.so` / `xdialer`)**: opens automatically from the idle desktop when pressing any **`0`–`9`, `*`, or `#` key** (inserting that character immediately), with live T9/number contact filtering, hold-`0` for `+`, and single-press **Call** dialing.
|
||||||
- **`Call Log` (`calllog.so` / `xcalllog`)**: opens automatically from the idle desktop when pressing the **Call (green)** button, with `All` / `Missed` / `In` / `Out` tabs, contact resolution, call durations, and instant redial.
|
- **`Call Log` (`calllog.so` / `xcalllog`)**: opens automatically from the idle desktop when pressing the **Call (green)** button, with `All` / `Missed` / `In` / `Out` tabs, contact resolution, call durations, and instant redial.
|
||||||
- **`Contacts` (`contacts.so` / `xcontacts`)**: full-featured phonebook application opened from the idle desktop via the **Right softkey (`Names`)** or from the Sxmo menu, integrated with `~/.config/sxmo/contacts.tsv` (live T9/number search, call/SMS/dialer actions, built-in contact editor with keypad multi-tap name entry and recent-caller number picker, and contact deletion).
|
- **`Contacts` (`contacts.so` / `xcontacts`)**: full-featured phonebook application opened from the idle desktop via the **Right softkey (`Names`)** or from the Sxmo menu, integrated with `~/.config/sxmo/contacts.tsv` (live T9/number search, call/SMS/dialer actions, built-in contact editor with keypad multi-tap name entry and recent-caller number picker, and contact deletion).
|
||||||
- **Patched `sxmo-dmenu`**: `240x320` full-width 9-line vertical menu flush below the 24px top bar with a `#383838` search bar, `#005577` prompt badge, and `XIM` `fcitx5-t9` text input in `< 15 ms`.
|
- **Patched `sxmo-dmenu`**: `240x320` full-screen 10-line vertical menu (`240x296` flush below the 24px top bar) with a `#383838` search bar, `#005577` prompt badge, and `XIM` `fcitx5-t9` text input in `< 15 ms`.
|
||||||
- **Patched `sxmo-st` terminal (`pixelsize=18`)**: **HarfBuzz (`libharfbuzz`) OpenType ligature shaping** (`liga`, `calt`, `clig`, `dlig`) and `XIM` support.
|
- **Patched `sxmo-st` terminal (`pixelsize=18`)**: **HarfBuzz (`libharfbuzz`) OpenType ligature shaping** (`liga`, `calt`, `clig`, `dlig`) and `XIM` support.
|
||||||
- **Typography**: non-Nerd **`Fira Code` (`font-fira-code`) with ligatures** as the primary system and terminal font (with `DejaVu SansM Nerd Font` used strictly as an icon fallback).
|
- **Typography**: non-Nerd **`Fira Code` (`font-fira-code`) with ligatures** as the primary system and terminal font (with `DejaVu SansM Nerd Font` used strictly as an icon fallback).
|
||||||
- **Custom 6-mode `fcitx5-t9` input engine**: fixed bottom candidate bar (`X=1, Y=290, W=238, H=30`) with a constant 28-character monospace preedit layout supporting lowercase, one-shot Shift, Caps Lock, all 32 ASCII punctuation symbols, terminal control codes (`^A`-`^Z`, `Esc`, `Tab`, `F1`-`F12`), and direct numeric entry with live top-bar mode indication (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`).
|
- **Custom 6-mode `fcitx5-t9` input engine**: fixed bottom candidate bar (`X=1, Y=290, W=238, H=30`) with a constant 28-character monospace preedit layout supporting lowercase, one-shot Shift, Caps Lock, all 32 ASCII punctuation symbols, terminal control codes (`^A`-`^Z`, `Esc`, `Tab`, `F1`-`F12`), and direct numeric entry with live top-bar mode indication (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`).
|
||||||
@@ -92,7 +92,7 @@ bananarchy/
|
|||||||
│ ├── sxmo-dwm/ # Patched sxmo-dwm (240x320 bstack, Pango bar, desktop softkey bar & plugin API)
|
│ ├── sxmo-dwm/ # Patched sxmo-dwm (240x320 bstack, Pango bar, desktop softkey bar & plugin API)
|
||||||
│ ├── dwm-plugins/ # DWM plugins (dialer.so, calllog.so, contacts.so), shared phone/TSV lib & runner
|
│ ├── dwm-plugins/ # DWM plugins (dialer.so, calllog.so, contacts.so), shared phone/TSV lib & runner
|
||||||
│ ├── xdrawer/ # XDrawer global phone controls DWM plugin (xdrawer.so / xdrawer)
|
│ ├── xdrawer/ # XDrawer global phone controls DWM plugin (xdrawer.so / xdrawer)
|
||||||
│ ├── sxmo-dmenu/ # Patched sxmo-dmenu (240x320 vertical 9-line menu, #383838 search bar, XIM fcitx5-t9)
|
│ ├── sxmo-dmenu/ # Patched sxmo-dmenu (240x320 full-screen 10-line menu, #383838 search bar, XIM fcitx5-t9)
|
||||||
│ ├── sxmo-st/ # Patched sxmo-st terminal with HarfBuzz Fira Code ligature shaping & XIM
|
│ ├── sxmo-st/ # Patched sxmo-st terminal with HarfBuzz Fira Code ligature shaping & XIM
|
||||||
│ ├── xf86-input-libinput/ # X11Libre xf86-input-libinput DDX driver
|
│ ├── xf86-input-libinput/ # X11Libre xf86-input-libinput DDX driver
|
||||||
│ ├── xf86-video-fbdev/ # X11Libre xf86-video-fbdev fallback DDX driver
|
│ ├── xf86-video-fbdev/ # X11Libre xf86-video-fbdev fallback DDX driver
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ export SXMO_WM=dwm
|
|||||||
export SXMO_MENU=dmenu
|
export SXMO_MENU=dmenu
|
||||||
export SXMO_TERMINAL=st
|
export SXMO_TERMINAL=st
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export SXMO_WM="dwm"
|
|||||||
export SXMO_MENU="dmenu"
|
export SXMO_MENU="dmenu"
|
||||||
export SXMO_TERMINAL="st"
|
export SXMO_TERMINAL="st"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=9
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export SXMO_WM=dwm
|
|||||||
export SXMO_MENU=dmenu
|
export SXMO_MENU=dmenu
|
||||||
export SXMO_TERMINAL=st
|
export SXMO_TERMINAL=st
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=9
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export SXMO_WM="dwm"
|
|||||||
export SXMO_MENU="dmenu"
|
export SXMO_MENU="dmenu"
|
||||||
export SXMO_TERMINAL="st"
|
export SXMO_TERMINAL="st"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=9
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export SXMO_WM=dwm
|
|||||||
export SXMO_MENU=dmenu
|
export SXMO_MENU=dmenu
|
||||||
export SXMO_TERMINAL=st
|
export SXMO_TERMINAL=st
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=9
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
||||||
|
|||||||
Binary file not shown.
@@ -23,7 +23,7 @@ confirm() {
|
|||||||
|
|
||||||
run_dmenu() {
|
run_dmenu() {
|
||||||
if [ "${SXMO_WM:-dwm}" = "dwm" ] && command -v dmenu >/dev/null 2>&1; then
|
if [ "${SXMO_WM:-dwm}" = "dwm" ] && command -v dmenu >/dev/null 2>&1; then
|
||||||
dmenu -c -l "${SXMO_DMENU_PORTRAIT_LINES:-9}" "$@"
|
dmenu -c -l "${SXMO_DMENU_PORTRAIT_LINES:-10}" "$@"
|
||||||
else
|
else
|
||||||
sxmo_dmenu.sh "$@"
|
sxmo_dmenu.sh "$@"
|
||||||
fi
|
fi
|
||||||
@@ -150,7 +150,7 @@ fast_sys_choices() {
|
|||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CHOICES="$icon_trm St^0^st -e ${SHELL:-/bin/sh}
|
CHOICES="$icon_trm Terminal^0^st -e ${SHELL:-/bin/sh}
|
||||||
$icon_grd Apps^0^sxmo_appmenu.sh applications
|
$icon_grd Apps^0^sxmo_appmenu.sh applications
|
||||||
$icon_grd Scripts^0^sxmo_appmenu.sh scripts
|
$icon_grd Scripts^0^sxmo_appmenu.sh scripts
|
||||||
$icon_dir Files^0^sxmo_files.sh
|
$icon_dir Files^0^sxmo_files.sh
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ export SXMO_NO_VIRTUAL_KEYBOARD=1
|
|||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export KEYBOARD_ARGS="-H 1 -L 1"
|
export KEYBOARD_ARGS="-H 1 -L 1"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ export SXMO_NO_VIRTUAL_KEYBOARD=1
|
|||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export KEYBOARD_ARGS="-H 1 -L 1"
|
export KEYBOARD_ARGS="-H 1 -L 1"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ export SXMO_NO_VIRTUAL_KEYBOARD=1
|
|||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export KEYBOARD_ARGS="-H 1 -L 1"
|
export KEYBOARD_ARGS="-H 1 -L 1"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ export SXMO_NO_VIRTUAL_KEYBOARD=1
|
|||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export KEYBOARD_ARGS="-H 1 -L 1"
|
export KEYBOARD_ARGS="-H 1 -L 1"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ export SXMO_NO_VIRTUAL_KEYBOARD=1
|
|||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export KEYBOARD_ARGS="-H 1 -L 1"
|
export KEYBOARD_ARGS="-H 1 -L 1"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=12
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ if [ -n "$SHOW_OVER_LOCKSCREEN_FLAG" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lines="${SXMO_DMENU_PORTRAIT_LINES:-9}"
|
lines="${SXMO_DMENU_PORTRAIT_LINES:-10}"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
exec dmenu -i $SXMO_DMENU_OPTS -l "$lines" "$@"
|
exec dmenu -i $SXMO_DMENU_OPTS -l "$lines" "$@"
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export SXMO_WM="dwm"
|
|||||||
export SXMO_MENU="dmenu"
|
export SXMO_MENU="dmenu"
|
||||||
export SXMO_TERMINAL="st"
|
export SXMO_TERMINAL="st"
|
||||||
export DMENU_WRAP_AROUND=1
|
export DMENU_WRAP_AROUND=1
|
||||||
export SXMO_DMENU_PORTRAIT_LINES=9
|
export SXMO_DMENU_PORTRAIT_LINES=10
|
||||||
export SXMO_DMENU_LANDSCAPE_LINES=8
|
export SXMO_DMENU_LANDSCAPE_LINES=8
|
||||||
export SXMO_DISABLE_LEDS=1
|
export SXMO_DISABLE_LEDS=1
|
||||||
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
export SXMO_NO_VIRTUAL_KEYBOARD=1
|
||||||
|
|||||||
@@ -763,7 +763,7 @@ case "$WMCLASS" in
|
|||||||
*)
|
*)
|
||||||
# Default system menu (no matches)
|
# Default system menu (no matches)
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_trm St ^ 0 ^ st -e ${SHELL:-/bin/sh}
|
$icon_trm Terminal ^ 0 ^ st -e ${SHELL:-/bin/sh}
|
||||||
$icon_grd Apps ^ 0 ^ sxmo_appmenu.sh applications
|
$icon_grd Apps ^ 0 ^ sxmo_appmenu.sh applications
|
||||||
$icon_grd Scripts ^ 0 ^ sxmo_appmenu.sh scripts
|
$icon_grd Scripts ^ 0 ^ sxmo_appmenu.sh scripts
|
||||||
$icon_dir Files ^ 0 ^ sxmo_files.sh
|
$icon_dir Files ^ 0 ^ sxmo_files.sh
|
||||||
|
|||||||
Binary file not shown.
@@ -23,7 +23,7 @@ static const char *defaultcolors[SchemeLast][2] = {
|
|||||||
[SchemeOut] = { "#ffffff", "#383838" },
|
[SchemeOut] = { "#ffffff", "#383838" },
|
||||||
};
|
};
|
||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
static unsigned int lines = 9;
|
static unsigned int lines = 10;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Characters not considered part of a word while deleting words
|
* Characters not considered part of a word while deleting words
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ static const char *defaultcolors[SchemeLast][2] = {
|
|||||||
[SchemeOut] = { "#ffffff", "#383838" },
|
[SchemeOut] = { "#ffffff", "#383838" },
|
||||||
};
|
};
|
||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
static unsigned int lines = 9;
|
static unsigned int lines = 10;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Characters not considered part of a word while deleting words
|
* Characters not considered part of a word while deleting words
|
||||||
|
|||||||
+21
-14
@@ -45,7 +45,7 @@ struct item {
|
|||||||
static char numbers[NUMBERSBUFSIZE] = "";
|
static char numbers[NUMBERSBUFSIZE] = "";
|
||||||
static char text[BUFSIZ] = "";
|
static char text[BUFSIZ] = "";
|
||||||
static char *embed;
|
static char *embed;
|
||||||
static int bh, mw, mh;
|
static int bh, item_bh, mw, mh;
|
||||||
static int inputw = 0, promptw;
|
static int inputw = 0, promptw;
|
||||||
static int lrpad; /* sum of left and right padding */
|
static int lrpad; /* sum of left and right padding */
|
||||||
static size_t cursor;
|
static size_t cursor;
|
||||||
@@ -182,7 +182,7 @@ drawhighlights(struct item *item, int x, int y, int maxw)
|
|||||||
x + indentx - (lrpad / 2) - 1,
|
x + indentx - (lrpad / 2) - 1,
|
||||||
y,
|
y,
|
||||||
MIN(maxw - indentx, TEXTW(highlight) - lrpad),
|
MIN(maxw - indentx, TEXTW(highlight) - lrpad),
|
||||||
bh, 0, highlight, 0
|
(lines > 0 ? item_bh : bh), 0, highlight, 0
|
||||||
);
|
);
|
||||||
highlight[strlen(token)] = restorechar;
|
highlight[strlen(token)] = restorechar;
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ drawitem(struct item *item, int x, int y, int w)
|
|||||||
else
|
else
|
||||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
|
|
||||||
int r = drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
|
int r = drw_text(drw, x, y, w, (lines > 0 ? item_bh : bh), lrpad / 2, item->text, 0);
|
||||||
drawhighlights(item, x, y, w);
|
drawhighlights(item, x, y, w);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -269,8 +269,11 @@ drawmenu(void)
|
|||||||
if (lines > 0) {
|
if (lines > 0) {
|
||||||
/* draw vertical list */
|
/* draw vertical list */
|
||||||
x -= lrpad / 2;
|
x -= lrpad / 2;
|
||||||
for (item = curr; item != next; item = item->right)
|
y = bh;
|
||||||
drawitem(item, 0, y += bh, mw);
|
for (item = curr; item != next; item = item->right) {
|
||||||
|
drawitem(item, 0, y, mw);
|
||||||
|
y += item_bh;
|
||||||
|
}
|
||||||
} else if (matches) {
|
} else if (matches) {
|
||||||
/* draw horizontal list */
|
/* draw horizontal list */
|
||||||
x += inputw;
|
x += inputw;
|
||||||
@@ -682,13 +685,14 @@ motionnotify(XEvent *e)
|
|||||||
|
|
||||||
if (lines > 0) {
|
if (lines > 0) {
|
||||||
/* vertical list: (ctrl)left-click on item */
|
/* vertical list: (ctrl)left-click on item */
|
||||||
|
y = bh;
|
||||||
for (item = curr; item != next; item = item->right) {
|
for (item = curr; item != next; item = item->right) {
|
||||||
y += h;
|
if (ev->y >= y && ev->y < (y + item_bh)) {
|
||||||
if (ev->y >= y && ev->y <= (y + h)) {
|
|
||||||
sel = item;
|
sel = item;
|
||||||
drawmenu();
|
drawmenu();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
y += item_bh;
|
||||||
}
|
}
|
||||||
/* display page up/down or jump top/bottom as appropriate */
|
/* display page up/down or jump top/bottom as appropriate */
|
||||||
if(ev->y > mh || ev->y < 0){
|
if(ev->y > mh || ev->y < 0){
|
||||||
@@ -810,9 +814,9 @@ buttonpress(XEvent *e)
|
|||||||
if (lines > 0) {
|
if (lines > 0) {
|
||||||
/* vertical list: (ctrl)left-click on item */
|
/* vertical list: (ctrl)left-click on item */
|
||||||
w = mw - x;
|
w = mw - x;
|
||||||
|
y = bh;
|
||||||
for (item = curr; item != next; item = item->right) {
|
for (item = curr; item != next; item = item->right) {
|
||||||
y += h;
|
if (ev->y >= y && ev->y < (y + item_bh)) {
|
||||||
if (ev->y >= y && ev->y <= (y + h)) {
|
|
||||||
puts(item->text);
|
puts(item->text);
|
||||||
if (!(ev->state & ControlMask))
|
if (!(ev->state & ControlMask))
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -823,6 +827,7 @@ buttonpress(XEvent *e)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
y += item_bh;
|
||||||
}
|
}
|
||||||
} else if (matches) {
|
} else if (matches) {
|
||||||
/* left-click on left arrow */
|
/* left-click on left arrow */
|
||||||
@@ -910,7 +915,6 @@ readstdin(void)
|
|||||||
if (items)
|
if (items)
|
||||||
items[i].text = NULL;
|
items[i].text = NULL;
|
||||||
inputw = (items && lines == 0 && !centered) ? TEXTW(items[imax].text) : 0;
|
inputw = (items && lines == 0 && !centered) ? TEXTW(items[imax].text) : 0;
|
||||||
lines = MIN(lines, i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
@@ -1154,6 +1158,7 @@ setup(void)
|
|||||||
const int bar_h = 24;
|
const int bar_h = 24;
|
||||||
bh = drw->fonts->h + 2;
|
bh = drw->fonts->h + 2;
|
||||||
bh = MAX(bh, lineheight);
|
bh = MAX(bh, lineheight);
|
||||||
|
item_bh = bh;
|
||||||
lines = MAX(lines, 0);
|
lines = MAX(lines, 0);
|
||||||
mh = (lines + 1) * bh;
|
mh = (lines + 1) * bh;
|
||||||
promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
|
promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
|
||||||
@@ -1185,9 +1190,10 @@ setup(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
avail_h = MAX((int)bh * 2, (int)info[i].height - bar_h);
|
avail_h = MAX((int)bh * 2, (int)info[i].height - bar_h);
|
||||||
if (lines > 0 && (int)mh > avail_h) {
|
if (lines > 0) {
|
||||||
lines = MAX(1, (avail_h / (int)bh) - 1);
|
lines = MAX(1, (avail_h / (int)bh) - 1);
|
||||||
mh = (lines + 1) * bh;
|
mh = avail_h;
|
||||||
|
item_bh = (mh - bh) / (int)lines;
|
||||||
}
|
}
|
||||||
x = info[i].x_org;
|
x = info[i].x_org;
|
||||||
mw = info[i].width;
|
mw = info[i].width;
|
||||||
@@ -1203,9 +1209,10 @@ setup(void)
|
|||||||
parentwin);
|
parentwin);
|
||||||
|
|
||||||
avail_h = MAX((int)bh * 2, (int)wa.height - bar_h);
|
avail_h = MAX((int)bh * 2, (int)wa.height - bar_h);
|
||||||
if (lines > 0 && (int)mh > avail_h) {
|
if (lines > 0) {
|
||||||
lines = MAX(1, (avail_h / (int)bh) - 1);
|
lines = MAX(1, (avail_h / (int)bh) - 1);
|
||||||
mh = (lines + 1) * bh;
|
mh = avail_h;
|
||||||
|
item_bh = (mh - bh) / (int)lines;
|
||||||
}
|
}
|
||||||
x = 0;
|
x = 0;
|
||||||
mw = wa.width;
|
mw = wa.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user