40 Commits

Author SHA1 Message Date
p 9ff110a44e Bump version, update NEWS
Arch Linux AUR Success
OpenBSD 7.8 Success
Alpine 3.24 Success
2026-09-05 17:14:56 +02:00
p 0f30000109 Bump liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-09-05 16:53:57 +02:00
p faf82acc15 Bump version, update NEWS
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-09-04 15:07:37 +02:00
p fc275b0860 Bump liberty 2026-09-04 15:02:04 +02:00
p 2295cab3a4 Bump liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-31 12:14:27 +02:00
p bda11fe9f0 Bump liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Not integrating the clipboard right now because unimportant.
2026-08-11 11:03:40 +02:00
p 7f6d6b24e5 Add an editor action to transpose characters
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Bump liberty.
2026-08-10 13:33:59 +02:00
p 8b2b8bc08f Bump liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Fixes a regression and an old focusing bug.
2026-08-10 10:09:22 +02:00
p b98dffdf46 Bump liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-10 05:37:54 +02:00
p 9420e1c5f1 Bump version
Arch Linux AUR Success
OpenBSD 7.8 Success
Alpine 3.24 Success
2026-08-08 14:45:57 +02:00
p a842b82849 Add some default keyboard shortcuts
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-08 14:38:54 +02:00
p 29f970d135 Make C-q also quit the application
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-08 06:10:43 +02:00
p aa566be6b6 Improve rendering of the X11 editor
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-08 04:55:54 +02:00
p a886221d7d Simplify editor layouting 2026-08-08 04:41:09 +02:00
p ab81899996 Bump liberty 2026-08-08 04:28:25 +02:00
p ba86b859ea Update NEWS
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-08-05 08:45:35 +02:00
p ab0c618991 Bump liberty 2026-08-05 08:45:18 +02:00
p b0a0fc1b69 Move some widgets to liberty
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Overall a clean-up with minor improvements.
2026-07-30 17:40:52 +02:00
p 6eeb1161c9 Fix a few embarrassing bugs
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2026-07-21 14:31:45 +02:00
p 115599a848 Bump liberty and termo 2026-07-20 05:58:29 +02:00
p bb8bea696e Use a nicer application icon on macOS
Alpine 3.23 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Trying out sips for painting rather than Swift.  It works well enough.
2026-07-01 17:18:16 +02:00
p 190149a660 AppKit: integrate with Now Playing
Alpine 3.23 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
Primarily to get media keys working;
neither the API nor the macOS widget is particularly great.

Bump liberty.
2026-05-30 23:41:51 +02:00
p 9ba7a0fce5 Bump version, update NEWS
Arch Linux AUR Success
OpenBSD 7.8 Success
Alpine 3.23 Success
2026-05-26 19:06:22 +02:00
p 1a0f61f6d8 Add an AppKit user interface
Alpine 3.23 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
When enabled, the build will create an application bundle.
2026-05-25 21:12:49 +02:00
p 6aa822fe34 Update .gitignore for newer Qt Creator
Alpine 3.22 Success
Arch Linux AUR Success
OpenBSD 7.8 Success
2025-11-29 00:18:45 +01:00
p 6cf6231282 Bump liberty 2025-11-29 00:17:56 +01:00
p 708b78f145 Bump liberty
Alpine 3.21 Success
Arch Linux AUR Success
OpenBSD 7.6 Success
2025-08-02 18:24:16 +02:00
p 3361df0ccb Bump liberty
Alpine 3.21 Success
Arch Linux AUR Success
OpenBSD 7.6 Success
2025-06-04 22:00:25 +02:00
p 13195e797a Bump liberty and termo
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.6 Success
OpenBSD 7.5 Abandoned
2025-04-23 22:02:50 +02:00
p 7fee01a5c6 Update NEWS 2025-01-08 09:42:31 +01:00
p 8b4300c796 Bump liberty, check the connection while searching
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success
This just prevents immediate assertion failures.
2025-01-08 08:10:19 +01:00
p cd3d4eb1ad README.adoc: update package information 2024-11-13 08:36:52 +01:00
p 641803df35 Enable user-defined actions
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success
Also fix pclose() handling within Info plugins,
and prevent them from screwing up the terminal with error output
on initialization.

This is still rather crude, but at least it's possible.
2024-10-31 21:19:28 +01:00
p eec0706333 Support libunistring versions before 1.2
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success
2024-09-02 23:25:08 +02:00
p 9d0acddf9a Implement font fallbacks in the editor
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Scripts failed
Opting for not making any changes in the XUI.
2024-09-02 21:47:50 +02:00
p ec12e2ac25 Bump liberty, fix calloc argument order
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success
2024-08-08 09:19:29 +02:00
p 24449fe721 Make global search match on filenames
Alpine 3.20 Success
OpenBSD 7.5 Success
Arch Linux AUR Success
2024-08-07 22:12:43 +02:00
p 60171cc5a3 Bump liberty 2024-08-07 22:05:29 +02:00
p 20502200d9 Make global search indicate the search terms
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success
2024-07-21 21:04:17 +02:00
p e6de4f11e7 Be actually able to use a system Termo library
Alpine 3.19 Success
Arch Linux AUR Success
OpenBSD 7.3 Success
2024-04-10 17:31:40 +02:00
15 changed files with 1072 additions and 601 deletions
+1
View File
@@ -2,6 +2,7 @@
/build
# Qt Creator files
/.qtcreator
/CMakeLists.txt.user*
/nncmpp.config
/nncmpp.files
+34 -3
View File
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.0...3.27)
project (nncmpp VERSION 2.1.1 LANGUAGES C)
project (nncmpp VERSION 2.3.2 LANGUAGES C)
# Moar warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
@@ -77,6 +77,15 @@ if (WITH_X11)
list (APPEND extra_libraries ${x11_LIBRARIES})
endif ()
add_option (WITH_APPKIT "Build as a bundle with AppKit support" "${APPLE}")
if (WITH_APPKIT)
enable_language (OBJC)
set (CMAKE_OBJC_FLAGS
"${CMAKE_OBJC_FLAGS} -std=gnu99 -Wall -Wextra -Wno-unused-function")
list (APPEND extra_libraries "-framework AppKit"
"-framework CoreFoundation" "-framework MediaPlayer")
endif ()
include_directories (${Unistring_INCLUDE_DIRS}
${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS}
${fftw_INCLUDE_DIRS} ${libpulse_INCLUDE_DIRS} ${x11_INCLUDE_DIRS})
@@ -120,8 +129,30 @@ add_custom_command (OUTPUT ${actions}
# Build the main executable and link it
add_executable (${PROJECT_NAME} ${PROJECT_NAME}.c ${actions})
target_link_libraries (${PROJECT_NAME} ${Unistring_LIBRARIES}
${Ncursesw_LIBRARIES} termo-static ${curl_LIBRARIES} ${extra_libraries})
if (WITH_APPKIT)
set_source_files_properties (${PROJECT_NAME}.c PROPERTIES LANGUAGE OBJC)
set_target_properties (${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE)
set (MACOSX_BUNDLE_GUI_IDENTIFIER name.janouch.${PROJECT_NAME})
set (MACOSX_BUNDLE_ICON_FILE ${PROJECT_NAME}.icns)
# XXX: This will not normally work from within Nix.
set (icns "${PROJECT_BINARY_DIR}/${MACOSX_BUNDLE_ICON_FILE}")
set (iconset "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.iconset")
add_custom_command (OUTPUT "${icns}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${iconset}"
COMMAND sips --js "${PROJECT_SOURCE_DIR}/gen-icon.js" -o "${iconset}"
COMMAND iconutil -c icns -o "${icns}" "${iconset}"
DEPENDS gen-icon.js
COMMENT "Generating application icon" VERBATIM)
target_sources (${PROJECT_NAME} PRIVATE "${icns}")
set_source_files_properties ("${icns}" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
endif ()
target_link_libraries (${PROJECT_NAME} PRIVATE ${Unistring_LIBRARIES}
${Ncursesw_LIBRARIES} ${Termo_LIBRARIES} ${curl_LIBRARIES}
${extra_libraries})
add_threads (${PROJECT_NAME})
# Installation
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2016 - 2023, Přemysl Eric Janouch <p@janouch.name>
Copyright (c) 2016 - 2026, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
+45
View File
@@ -1,3 +1,48 @@
2.3.2 (2026-09-05)
* X11: fixed doubled Fontconfig substitutions
2.3.1 (2026-09-04)
* Added a Readline-like C-t editor binding
* X11: improved focus handling, improved IME integration
2.3.0 (2026-08-08)
* The "elapsed" attribute is now used for "remaining" as well.
For the typical theme, remove "remaining" and reverse your "elapsed".
* Added "b", "f", "p", "s" bindings for back/forward seek, play/pause, stop
* AppKit: the application now shows up in Now Playing,
and as a consequence responds to media keys
* AppKit: made the application icon look nicer
* X11: improved font lookup of italic and bold variants
2.2.0 (2026-05-26)
* Added an AppKit user interface; the -x (--x11) option has become -g (--gui)
* Made global search indicate the search terms, and match on filenames
* Added ability to configure bindable user-defined actions;
these can launch arbitrary shell commands
* Prevented crashes when the daemon disconnects during search
* X11: added support for font fallbacks to the editor as well
* X11: fixed that XSettings had to be present
* X11: fixed a new Fontconfig warning
2.1.1 (2024-02-27)
* Fixed installation of Info tab plugins
+6 -4
View File
@@ -2,8 +2,8 @@ nncmpp
======
'nncmpp' is yet another MPD client. Its specialty is running equally well in
the terminal, or as an X11 client--it will provide the same keyboard- and
mouse-friendly interface.
the terminal, as an X11 client, or as a macOS application--it will provide
the same keyboard- and mouse-friendly interface.
This project began its life as a simplified TUI version of Sonata. I had
already written a lot of the required code before, so I had the perfect
@@ -33,6 +33,8 @@ You can get a package with the latest development version using Arch Linux's
https://aur.archlinux.org/packages/nncmpp-git[AUR],
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
Stable versions are present in: OpenBSD ports.
Documentation
-------------
See the link:nncmpp.adoc[man page] for information about usage.
@@ -72,8 +74,8 @@ however, tricky to get consistent results on, so be aware of the following:
- Xterm needs `XTerm*metaSendsEscape: true` for the default bindings to work
- urxvt's 'vtwheel' plugin sabotages scrolling
The X11 graphical interface is a second-class citizen, so some limitations of
terminals carry over, such as the plain default theme.
The X11 and macOS graphical interfaces are second-class citizens, so some
limitations of terminals carry over, such as the plain default theme.
Contributing and Support
------------------------
+1
View File
@@ -11,5 +11,6 @@
#cmakedefine WITH_FFTW
#cmakedefine WITH_PULSE
#cmakedefine WITH_X11
#cmakedefine WITH_APPKIT
#endif /* ! CONFIG_H */
+1 -2
View File
@@ -33,8 +33,7 @@
colors = {
normal = "1 0"
highlight = "12 0 bold"
elapsed = "4 4"
remains = "4 8"
elapsed = "4 8"
tab_bar = "8 0"
tab_active = "6 8 bold"
+1 -2
View File
@@ -1,8 +1,7 @@
colors = {
normal = "237 255"
highlight = "16 255 bold"
elapsed = "231 250"
remains = "250 231"
elapsed = "250 231"
tab_bar = "252 16"
tab_active = "231 237 bold"
+74
View File
@@ -0,0 +1,74 @@
// gen-icon.js: generate a program icon for nncmpp as an Apple iconset
//
// Copyright (c) 2026, Přemysl Eric Janouch <p@janouch.name>
// SPDX-License-Identifier: 0BSD
//
// API documentation: https://manicmaniac.github.io/sips-js-api/modules.html
// Apple uses something close to a "quintic superellipse" in their icons,
// but doesn't quite match. Either way, it looks better than rounded rectangles.
function addSquircle(canvas, bounds) {
const midX = bounds.x + bounds.width / 2
const midY = bounds.y + bounds.height / 2
canvas.moveTo(bounds.x + bounds.width, midY)
for (let theta = 0; theta < Math.PI * 2; theta += Math.PI / 1e4) {
const x = Math.pow(Math.abs(Math.cos(theta)), 2 / 5) * bounds.width / 2
* Math.sign(Math.cos(theta)) + midX
const y = Math.pow(Math.abs(Math.sin(theta)), 2 / 5) * bounds.height / 2
* Math.sign(Math.sin(theta)) + midY
canvas.lineTo(x, y)
}
canvas.closePath()
}
function drawIcon(size) {
const canvas = new Canvas(size, size)
const nominal = 1024
const scale = size / nominal
// Drawing in the Postscript coordinate system.
canvas.translate(0, size)
canvas.scale(scale, -scale)
const bounds = new Rect(100, 100, nominal - 200, nominal - 200)
canvas.save()
canvas.beginPath()
addSquircle(canvas, bounds)
canvas.shadowOffsetX = 0
canvas.shadowOffsetY = -12 * scale
canvas.shadowBlur = 28 * scale
canvas.shadowColor = 'rgba(0, 0, 0, 0.375)'
canvas.fillStyle = '#d8d8d8'
canvas.fill()
canvas.restore()
canvas.save()
canvas.beginPath()
addSquircle(canvas, bounds)
canvas.clip()
const gradient = canvas.createLinearGradient(0, 100, 0, nominal - 100)
gradient.addColorStop(0, '#cccccc')
gradient.addColorStop(1, '#ffffff')
canvas.fillStyle = gradient
canvas.fillRect(0, 0, nominal, nominal)
canvas.restore()
// The same shape as in nncmpp.svg.
canvas.beginPath()
canvas.moveTo(nominal * 0.325, nominal * 0.30)
canvas.lineTo(nominal * 0.325, nominal * 0.70)
canvas.lineTo(nominal * 0.725, nominal * 0.50)
canvas.closePath()
canvas.fillStyle = '#000'
canvas.fill()
return canvas
}
// Beware, this is most likely going to be generated in the Display P3 profile,
// and I haven't found a way to change this.
for (const size of [16, 32, 128, 256, 512]) {
new Output(drawIcon(size), `icon_${size}x${size}.png`).addToQueue()
new Output(drawIcon(size * 2), `icon_${size}x${size}@2x.png`).addToQueue()
}
+1 -1
Submodule liberty updated: 969a4cfc3e...eba8ead2b7
+1
View File
@@ -68,6 +68,7 @@ EDITOR_F_WORD, Go forward a word
EDITOR_HOME, Go to start of line
EDITOR_END, Go to end of line
EDITOR_TRANSPOSE_CHARS, Transpose characters
EDITOR_UPCASE_WORD, Convert word to uppercase
EDITOR_DOWNCASE_WORD, Convert word to lowercase
EDITOR_CAPITALIZE_WORD, Capitalize word
+2 -2
View File
@@ -1,6 +1,6 @@
# nncmpp.actions.awk: produce C code for a list of user actions
#
# Copyright (c) 2022, Přemysl Eric Janouch <p@janouch.name>
# Copyright (c) 2022 - 2024, Přemysl Eric Janouch <p@janouch.name>
# SPDX-License-Identifier: 0BSD
#
# Usage: env LC_ALL=C A=0 B=1 awk -f nncmpp.actions.awk \
@@ -91,7 +91,7 @@ END {
print "enum action {"
for (i in Constants)
print "\t" "ACTION_" Constants[i] ","
print "\t" "ACTION_COUNT"
print "\t" "ACTION_USER_0"
print "};"
print ""
print "static const char *g_action_names[] = {"
+19 -8
View File
@@ -14,10 +14,10 @@ Synopsis
Description
-----------
*nncmpp* is a hybrid terminal/X11 MPD client. On start up it will welcome
you with an overview of all key bindings and the actions they're assigned to.
Individual tabs can be switched to either using the mouse or by pressing *M-1*
through *M-9*, corresponding to the order they appear in.
*nncmpp* is a hybrid terminal/X11/AppKit MPD client. On start up it will
welcome you with an overview of all key bindings and the actions they're
assigned to. Individual tabs can be switched to either using the mouse
or by pressing *M-1* through *M-9*, corresponding to the order they appear in.
As a convenience utility, any program arguments are added to the MPD queue.
Note that to add files outside the database, you need to connect to MPD using
@@ -29,8 +29,8 @@ Options
Adds a "Debug" tab showing all MPD communication and other information
that help debug various issues.
*-x*, *--x11*::
Use an X11 interface even when run from a terminal.
*-g*, *--gui*::
Use a graphical interface even when run from a terminal.
Note that the application may be built with this feature disabled.
*-h*, *--help*::
@@ -57,8 +57,7 @@ settings = {
colors = {
normal = ""
highlight = "bold"
elapsed = "reverse"
remains = "ul"
elapsed = "ul"
tab_bar = "reverse"
tab_active = "ul"
even = ""
@@ -85,6 +84,18 @@ To adjust key bindings, put them within a *normal* or *editor* object.
Run *nncmpp* with the *--debug* option to find out key combinations names.
Press *?* in the help tab to learn the action identifiers to use.
You may also define and bind your own actions, launching arbitrary
shell commands. Note that you cannot override internal actions in this manner.
....
actions = {
"pioneer-on-off" = {
description = "Pioneer amplifier: turn on/off"
command = "elksmart-comm --nec A538"
}
}
....
Spectrum visualiser
-------------------
When built against the FFTW library, *nncmpp* can make use of MPD's "fifo"
+884 -577
View File
File diff suppressed because it is too large Load Diff
+1 -1
Submodule termo updated: 2518b53e5a...a8f3f6eca3