this post was submitted on 18 Jul 2024
273 points (98.2% liked)

Linux

47597 readers
1418 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

to my shame i did not know how to customize the nmtui default colors (for the sake of my own health and mental stability). after reading a bit, i found out it uses the so-called newt backend with the whiptail app.

long story short... turns out it reads some of the env variables for that backend to setup the colors (if you're interested, here's where this happens in the code).

so you can simply set these env variables before calling nmtui. here's a combination i came up with:

NEWT_COLORS='root=black,black;window=black,black;border=white,black;listbox=white,black;label=blue,black;checkbox=red,black;title=green,black;button=white,red;actsellistbox=white,red;actlistbox=white,gray;compactbutton=white,gray;actcheckbox=white,blue;entry=lightgray,black;textbox=blue,black' nmtui

enjoy and keep your eyes healthy!

all 37 comments
sorted by: hot top controversial new old
[–] hayk@lemmy.ml 60 points 2 months ago (1 children)

for comparison, here's the default

[–] eager_eagle@lemmy.world 29 points 2 months ago* (last edited 2 months ago)

Another option is to change your terminal color profile. Here's what the default looks like on Kitty's Misterioso theme:

imo more tolerable than the default colors, and it applies to other terminal apps too.

To preview themes: kitty +kitten themes

[–] Cowbee@lemmy.ml 42 points 2 months ago (3 children)

Please don't use "rape" as a casual negative verb, there are better, more accurate words to use that don't needlessly reference SA.

[–] hayk@lemmy.ml 78 points 2 months ago* (last edited 2 months ago) (4 children)

i really apologize if the use of that word was perceived as offensive, that was obviously not my intent. i'm usually quite straightforward in picking words (i come from a completely different culture, where sexual assaults are extremely uncommon).

PS. for the context of others reading this comment, the original title of this post was: "nmtui that does not rape your eyes."

[–] davel@lemmy.ml 42 points 2 months ago

Thank you, OP.

[–] Cowbee@lemmy.ml 24 points 2 months ago
[–] richieadler@lemmy.myserv.one 20 points 2 months ago (1 children)

(i come from a completely different culture, where sexual assaults are extremely uncommon)

What culture is that? I wasn't aware such a thing existed.

[–] tyler@programming.dev 2 points 2 months ago

Probably a Scandinavian country if I had to guess.

[–] uzay@infosec.pub 17 points 2 months ago

(i come from a completely different culture, where sexual assaults are extremely uncommon).

It is more likely that you are just not aware of it.

[–] wesker@lemmy.sdf.org 10 points 2 months ago (1 children)

This is great, bookmarking for later. My polybar config opens nmtui in a floating kitty terminal when you click the networking icons. It'd be awesome to theme it accordingly.

[–] hayk@lemmy.ml 5 points 2 months ago

same here (except it's waybar in my case) ( :

[–] p0wer@lemmy.zip 6 points 2 months ago

Thanks. I'll use it my config. you're an eye saver.

[–] h0bbl3s@lemmy.world 6 points 2 months ago

I'm not sure where this software comes from, but you should try to get a merge to fix this to default. I'd give it a thumbs up after some testing for sure.

[–] phantomwise@lemmy.ml 4 points 2 months ago

Wow thanks, I'm definitely going to alias that :)

[–] gramgan@lemmy.ml 4 points 2 months ago

Thank you! I was just suffering from this an hour ago…

[–] ColdWater@lemmy.ca 3 points 2 months ago (1 children)

Luckily I don't have to use nmtui all that much but this look nice, I might try it

[–] xavier666@lemm.ee 5 points 2 months ago (1 children)

It's very useful for people who don't use a desktop environment, such as TWM (tiling window manager) users. I use nmtui all the time.

[–] JubilantJaguar@lemmy.world 5 points 2 months ago (1 children)

Agreed. But for such a simple tool I find it so ugly and unintuitive that I ended up rolling my own 3-line script using nmcli and fzf that does exactly the same thing more logically and in less keystrokes.

[–] xavier666@lemm.ee 3 points 2 months ago (2 children)

I would be interested in seeing the script. I really need to learn fzf now.

[–] JubilantJaguar@lemmy.world 3 points 2 months ago

Sure.

wn=$(nmcli dev wifi list | fzf)
ssid="$(echo $wn | awk '{print $2}')"
read -e -p "Password: " pw
nmcli dev wifi connect "$ssid" password $pw
[–] beeng@discuss.tchncs.de 1 points 2 months ago
[–] yogurtwrong@lemmy.world 1 points 1 month ago

That's the kind of innovation I expect from the Linux community