[-] Andy@programming.dev 7 points 2 years ago

CLI flow: run command, print output below

TUI flow: navigate and interact with a layout that updates in place

[-] Andy@programming.dev 7 points 2 years ago

Ok next time I won't use your computer.

[-] Andy@programming.dev 7 points 2 years ago* (last edited 2 years ago)
grep -E '(^[^B]*$|A)'

EDIT: Whoops, I meant to make this a top-level comment.

EDIT 2: On one client it looked like a nested comment and on this other client it looks top level and now I'm a confused old man.

[-] Andy@programming.dev 6 points 2 years ago* (last edited 2 years ago)

screenshot

Fluent screenshot

screenshot

Papirus screenshot

  • Tela (orange dark)

screenshot

Tela screenshot

screenshot

Vimix screenshot

screenshot

Qogir screenshot

screenshot

Sunity Cursors screenshot

From this thread I tried out Gruvbox Plus Dark, which is nice, but a little low on contrast, and I don't prefer such uniform shapes.

Huh, I only now notice that the Fluent, Tela, Vimix, and Qogir repos are owned by the same user...

1
1
1
1
1
6

This is not my work, but the author (same author as zsh-abbr) posted it elsewhere and it looks good to me.

In his words:

What is zsh-test-runner? A simple testing framework for zsh, and to a degree —thanks to zsh's emulation of other shells— csh, ksh, and sh.

The immediately noticeable difference between zsh-test-runner and other shell script unit test frameworks is it doesn't have a DSL. zsh-test-runner relies entirely on the shell's own testing. For those familiar with other frameworks: nothing like ShellSpec's Describe … When call … The output should, or shUnit2's assertEquals, or ZUnit's assert; zsh-test-runner is closer to Bats if you were to restrict yourself to core and not use helper libraries (there's nothing like bats-assert's assertEquals or bats-file's assert_dir_exists).

Why no special syntax? It means there's little new to learn— For example, if you know how to test numeric equality in your shell, you know how to test equality in zsh-test-runner; if you don't, there are community resources available. It means every possible test is supported equally out of the box— zsh-test-runner is a newcomer, but there are no "shoot my assertion method isn't supported" blockers. It means the cost of porting homegrow framework-less tests to zsh-test-runner is about as low as can be— generally speaking, my_cool_test_code becomes ztr test 'my_cool_test_code'. It means tests can live comfortably in one LOC, making zsh-test-runner pleasant to use in the terminal.

16
submitted 2 years ago* (last edited 2 years ago) by Andy@programming.dev to c/kde@lemmy.kde.social

Hello!

I'm still using X11, and one of the things that's keeping me there is that I make heavy use of a launch-or-focus script, so that I hit a certain hotkey and no matter what a browser/chat/editor/terminal/file-manager/etc. shows up focused on my current desktop.

In the world of Wayland, this isn't so easy. If this can be recreated at all, I think it'll have to be made to rely on some sort of interface to Kwin.

I don't think it's possible now, but might it be in the future?

Here's my script, let's see if the lemmy interface mangles it (EDIT: yes, the last character should be an ampersand, not &):

#!/bin/zsh -ex

# -- Usage --
# ./toggle_window.zsh LAUNCH_CMD [ WM_CLASS [ CHECK_CMD ] ]

# -- Defaults --
# WM_CLASS and CHECK_CMD each default to the value of LAUNCH_CMD

# -- Examples --
# ./toggle_window.zsh dolphin
# ./toggle_window.zsh wezterm-gui org.wezfurlong.wezterm
# ./toggle_window.zsh firefox firefox firefox-bin
# ./toggle_window.zsh \
#   'flatpak run --branch=stable --arch=x86_64 --command=telegram-desktop --file-forwarding org.telegram.desktop' \
#   telegram-desktop telegram-deskto
# Yes, "telegram-deskto" without a final p. Hmm.

# -- Dependencies --
# - procps (pgrep)
# - wmctrl
# - x11-utils (xprop)
# - xdotool

# -- TODO --
# - wayland

launch_cmd=(${(z)1})
wm_class=${2:-$1}
check_cmd=${3:-$1}

if [[ $(xprop -id $(xdotool getactivewindow) WM_CLASS) =~ \"$wm_class\" ]] {
  xdotool getactivewindow windowminimize
} else {
  wmctrl -xR $wm_class || true
}

pgrep -u $USER -x $check_cmd || exec $launch_cmd &
[-] Andy@programming.dev 7 points 2 years ago

ncspot is great, spotify-tui is another, and in the past I've had some success using mopidy-spotify and an mpd frontend (a discontinued but very cool one called Cantata).

1
1
[-] Andy@programming.dev 7 points 2 years ago

TLDR: It happens (by default) for calls between you and someone in your contacts list, because it's a p2p connection. It can be avoided by disabling p2p calls.

The reason Telegram leaks a user’s IP addresses during a call is that, by default, Telegram uses a peer-to-peer connection between callers “for better quality and reduced latency,” Telegram spokesperson Remi Vaughn told TechCrunch.

“The downside of this is that it necessitates that both sides know the IP address of the other (since it is a direct connection). Unlike on other messengers, calls from those who are not your contact list will be routed through Telegram’s servers to obscure that,” Vaughn said.

To avoid leaking your IP address, you have to go to Telegram’s Settings > Privacy and Security > Calls, and then select “Never” in the Peer-to-Peer menu, as shown below.

1
1
2
[-] Andy@programming.dev 6 points 3 years ago

Wezterm, which does everything, with a great developer behind it.

Second choice is Konsole: super solid and great rendering.

Aaand tmux with either of those.

[-] Andy@programming.dev 7 points 3 years ago

I'm a fan. This is where my library card lives.

As you said, it's super clean, no BS at all. In this crazy world, that's a rare pleasure.

[-] Andy@programming.dev 7 points 3 years ago

I appreciate these brave words.

[-] Andy@programming.dev 6 points 3 years ago

Ooh, thanks! I've used rbw successfully in the past.

[-] Andy@programming.dev 7 points 3 years ago

Sublime Text!

[-] Andy@programming.dev 7 points 3 years ago

No doubt p10k is excellent, and the dev knows what he's doing and helps others a lot.

Another great zsh prompt with a simpler implementation is agkozak's: https://github.com/agkozak/agkozak-zsh-prompt

view more: ‹ prev next ›

Andy

0 post score
0 comment score
joined 3 years ago
MODERATOR OF