1
0
Fork 0
forked from murx/murx

Fix Configuration menu toggles

This commit is contained in:
Johannes Findeisen 2026-11-23 11:55:50 +01:00
commit 636d5b239c
4 changed files with 16 additions and 14 deletions

View file

@ -26,10 +26,10 @@ package() {
}
sha512sums="
275a6a517689726858f106f27a921aab726d21260b876ef7d228d62f38800dd549dbeccea680b1f9261b01dda1c72860bb147e95270d66a8aa08a7b3a2e9823e murx.c
bc093a0e3f748d16ecec21363cb3ab07ae4bd733ea8d0ddcd2a646bd5a1372bd419bab7ea9474aea63f6c4cc588b43ed635a0e016c1d468a8242a31d074462db murx.c
ebce5c1268253d4dbf1cc1c7d6200c3bad97cba6361d8ff3c5d4563b670565a1a70d83d7bcb2dc0b1ca9fad9ca49d2ff8366b21ac73fb26cb7b46730d0acc425 Makefile
219082e6277ee8c226cdd61a5b17d4e3c6893adf04b2f59ea84a6b6421dbd5a6d0ff38b93d8dd8ae41ed037e77252058dacadd5ff1f0c36c7c1ff95503e1e7a8 murx.1
11c39781332eab62dc36125ed4b72df12208b73f3d9201a8a3f16b8b9c09f9e32069597f15160efd52d97609e7d322a09db7ce249361c0c84f7e22dc013e55d8 README.md
5b0da48df43e7c13ac8447dda8fb0f57bf4c5bacb630e39d9f2105a4ee4a0485b80fb0e3c4a7f88ac16411f5e4c88bdf81ac67ccf4805af3beb68cf7e1725f0d README.md
2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE
4d32dba475e5f9818fcd008068b011cbae9fc4b8e29897c933775d6660f44a7992d08a1550320d83233af729a42b241ef1d182bf5983ef2f64deab76cab2260d AUTHORS
"

View file

@ -8,10 +8,10 @@ url='https://codeberg.org/armin/murx'
license=('Apache-2.0')
depends=('glibc')
source=('murx.c' 'Makefile' 'murx.1' 'README.md' 'LICENSE' 'AUTHORS')
sha256sums=('a13edd7ca2da2d431ecd9e8fa1a4cae0a6e99a6a074893df204a73e8b3b19fc0'
sha256sums=('a19c6d5edf4ef832184e6c18ab222b689b8fa9bdeacb70cc1fc66430b7d637d7'
'4301fe8afe6a6e7cc665d8820ec43047f6af6f3b394a3a3a4f6e52dcf32fdec2'
'953966bfdd0b49cb26c11220e1e2bf6b5862aaa1b2d0bf002cde9d276f0ae96b'
'6411f0a1129e0436fd2b86372ac58adb6336eb4b7eacff268650d5188626e8ff'
'ce2b324f9524663b1c0af9b9d064aa5dd80fc0a5cdfe6eff10c416c2faf9acae'
'31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4'
'dbc8a4fc569d4cd7bcd45516ccc98c1396fce0682c262103069c8f5150538cdb')

View file

@ -328,7 +328,8 @@ scrollback, forced resize and kill server. `Configuration...` contains:
titles.
- `Reset display/status defaults`.
Settings changes apply immediately. Session settings affect all attached
Press Enter on a toggle to turn it on or off. Settings changes apply
immediately. Session settings affect all attached
clients; the prefix is per-client. Nothing is written to disk, so changes
last until the session ends or you change them again. The command-line
options still decide the initial values when a session starts.

19
murx.c
View file

@ -3502,27 +3502,28 @@ static void fit_session_to_client(Client *c, Session *s) {
}
static void menu_apply_setting(Client *c, Session *s, const MenuItem *it) {
int value = it->type == MI_TOGGLE ? !menu_setting_on(s, c, it) : it->arg;
switch (it->id) {
case SET_STATUS_BOTTOM:
s->status_bottom = it->arg ? 1 : 0;
s->status_bottom = value;
session_layout(s);
s->redraw = 1;
break;
case SET_STATUS_BG:
s->status_bg = it->arg == 1 ? (int32_t)RGB_FLAG :
it->arg == 2 ? (int32_t)(RGB_FLAG | 0x191a1c) : 0;
s->status_bg = value == 1 ? (int32_t)RGB_FLAG :
value == 2 ? (int32_t)(RGB_FLAG | 0x191a1c) : 0;
s->redraw = 1;
break;
case SET_SHOW_CWD: s->display.show_cwd = it->arg ? 1 : 0; break;
case SET_SHOW_CLOCK: s->display.show_clock = it->arg ? 1 : 0; break;
case SET_SHOW_MURX: s->display.show_murx = it->arg ? 1 : 0; break;
case SET_SHOW_HOSTNAME: s->display.show_hostname = it->arg ? 1 : 0; break;
case SET_SHOW_CWD: s->display.show_cwd = value; break;
case SET_SHOW_CLOCK: s->display.show_clock = value; break;
case SET_SHOW_MURX: s->display.show_murx = value; break;
case SET_SHOW_HOSTNAME: s->display.show_hostname = value; break;
case SET_SHOW_PANE_TITLES:
s->display.show_pane_titles = it->arg ? 1 : 0;
s->display.show_pane_titles = value;
session_layout(s);
s->redraw = 1;
break;
case SET_PREFIX: c->prefix = (unsigned char)it->arg; break;
case SET_PREFIX: c->prefix = (unsigned char)value; break;
default: return;
}
/* Window names carry the hostname setting, so refresh them at once. */