Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
9ff110a44e
|
|||
|
0f30000109
|
|||
|
faf82acc15
|
|||
|
fc275b0860
|
|||
|
2295cab3a4
|
|||
|
bda11fe9f0
|
|||
|
7f6d6b24e5
|
|||
|
8b2b8bc08f
|
|||
|
b98dffdf46
|
|||
|
9420e1c5f1
|
|||
|
a842b82849
|
|||
|
29f970d135
|
|||
|
aa566be6b6
|
|||
|
a886221d7d
|
|||
|
ab81899996
|
|||
|
ba86b859ea
|
|||
|
ab0c618991
|
|||
|
b0a0fc1b69
|
|||
|
6eeb1161c9
|
|||
|
115599a848
|
|||
|
bb8bea696e
|
|||
|
190149a660
|
+17
-8
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required (VERSION 3.0...3.27)
|
||||
project (nncmpp VERSION 2.2.0 LANGUAGES C)
|
||||
project (nncmpp VERSION 2.3.2 LANGUAGES C)
|
||||
|
||||
# Moar warnings
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||
@@ -82,8 +82,8 @@ 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")
|
||||
list (APPEND extra_libraries "-framework AppKit"
|
||||
"-framework CoreFoundation" "-framework MediaPlayer")
|
||||
endif ()
|
||||
|
||||
include_directories (${Unistring_INCLUDE_DIRS}
|
||||
@@ -136,12 +136,21 @@ if (WITH_APPKIT)
|
||||
set (MACOSX_BUNDLE_GUI_IDENTIFIER name.janouch.${PROJECT_NAME})
|
||||
set (MACOSX_BUNDLE_ICON_FILE ${PROJECT_NAME}.icns)
|
||||
|
||||
include (IconUtils)
|
||||
icon_to_icns (${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.svg
|
||||
"${MACOSX_BUNDLE_ICON_FILE}" icon)
|
||||
target_sources (${PROJECT_NAME} PRIVATE ${icon})
|
||||
# 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} ${Unistring_LIBRARIES}
|
||||
target_link_libraries (${PROJECT_NAME} PRIVATE ${Unistring_LIBRARIES}
|
||||
${Ncursesw_LIBRARIES} ${Termo_LIBRARIES} ${curl_LIBRARIES}
|
||||
${extra_libraries})
|
||||
add_threads (${PROJECT_NAME})
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
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)
|
||||
|
||||
@@ -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,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
@@ -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: d7c70bd43a...eba8ead2b7
@@ -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
|
||||
|
||||
+1
-2
@@ -57,8 +57,7 @@ settings = {
|
||||
colors = {
|
||||
normal = ""
|
||||
highlight = "bold"
|
||||
elapsed = "reverse"
|
||||
remains = "ul"
|
||||
elapsed = "ul"
|
||||
tab_bar = "reverse"
|
||||
tab_active = "ul"
|
||||
even = ""
|
||||
|
||||
+1
-1
Submodule termo updated: f9a102456f...a8f3f6eca3
Reference in New Issue
Block a user