Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
0a03272
Better handling of CRLF line endings
roberthawdon Mar 15, 2024
abbc18d
Started work on mouse support
roberthawdon Mar 16, 2024
1b1b481
Fixed sf screen size refresh
roberthawdon Mar 16, 2024
3e13a8f
Improved scrolling on SF
roberthawdon Mar 17, 2024
2f2f8a8
Started work on show scrolling
roberthawdon Mar 18, 2024
c4f5846
Added macOS config to use Homebrew version of ncurses
roberthawdon Mar 19, 2024
d71677f
Working on clickable menus
roberthawdon Mar 23, 2024
d4ed87e
Fixing builds with LTO #172
roberthawdon Apr 7, 2024
868f309
Remove LTO check for CLANG, ensure ncurses has wide char support
roberthawdon Apr 7, 2024
8920e98
Add flto to linker
roberthawdon Apr 7, 2024
3abc09d
correctly find and link to ncurses dependency (#175)
roberthawdon Apr 8, 2024
efd26d7
Some more makefile improvements
roberthawdon Apr 8, 2024
4aed9f8
Updated gitignore
roberthawdon Apr 8, 2024
f28e780
Updated mouse scrolling behaviour in show
roberthawdon Apr 8, 2024
2397b37
Updated pot files
roberthawdon Apr 8, 2024
a65e7b0
Better scrolling feel in show
roberthawdon Apr 13, 2024
26da3f5
Using correct variable
roberthawdon Apr 13, 2024
40fbb83
Ignore mouse on text input
roberthawdon Apr 13, 2024
4787804
Making items in show clickable
roberthawdon Apr 26, 2024
1a3df88
Making items in show openable by click
roberthawdon Apr 26, 2024
8cbdc30
Backend code change to allow editing from mouse click
roberthawdon Apr 27, 2024
804ca9a
Start working on menu buttons
roberthawdon Apr 27, 2024
8f584e9
Removed mouse lag
roberthawdon Apr 28, 2024
cfbbab2
Unfinished work on menu buttons
roberthawdon Apr 28, 2024
0e19b02
Added basic calculations, breaks everything
roberthawdon May 4, 2024
89d05d4
Fixed crash
roberthawdon May 4, 2024
c873cea
Start working on lookup function
roberthawdon May 4, 2024
1ae247c
Global Menu clickable
roberthawdon May 4, 2024
009fa86
Function Menu clickable
roberthawdon May 4, 2024
d9bab49
Fix error messages disappearing when using mouse
roberthawdon May 5, 2024
ab98ed7
Making sorting menu clickable
roberthawdon May 5, 2024
b2bb30e
Setting menuButtonLookup defult to null
roberthawdon May 5, 2024
7e46e59
Added more clickable menus in both show and sf
roberthawdon May 8, 2024
967c822
Added clickable menu buttons on the Settings screen
roberthawdon May 11, 2024
c1d2a3a
Allow for escape key on blank menu click
roberthawdon Jun 13, 2024
3a8cbd5
Fixed function menu buttons
roberthawdon Jun 13, 2024
5971df3
Fixed (hopefully) automake
roberthawdon Jun 15, 2024
43e51df
Only return escape when clicking after last menu item
roberthawdon Jun 15, 2024
ba18dc8
Added initial menu clicking in colors/theme builder
roberthawdon Jun 15, 2024
124b4a0
Updated colors page
roberthawdon Jun 16, 2024
74933b3
Updated colors page to be more dynamic
roberthawdon Jun 19, 2024
edf058f
More cleanup of Colors menu
roberthawdon Jun 19, 2024
0da0c85
Started work on clickable themebuilder
roberthawdon Jun 20, 2024
7d8319d
Added clickable color buttons
roberthawdon Jun 20, 2024
8060646
Fixed color label
roberthawdon Jun 20, 2024
b67bbcc
Click to cancel text input
roberthawdon Jun 23, 2024
5498b95
Improvements to mouse navigation with macOS Extended attributes
roberthawdon Sep 7, 2024
cbca74b
Configurable mouse scroll and mouse enable/disable switch
roberthawdon Sep 8, 2024
9442167
Working on clickable settings
roberthawdon Sep 22, 2024
372940b
Click to change settings
roberthawdon Sep 23, 2024
6a10ca8
Modify SETTING_SELECT type with mouse
roberthawdon Sep 28, 2024
6e8ea96
Scroll settings, working on new common confirmation dialogue
roberthawdon Dec 10, 2024
e2c2cb3
Fixing commonConfirmMenu
roberthawdon Dec 11, 2024
65041bc
Hunt using commonConfirmMenu
roberthawdon Dec 11, 2024
152dabb
Replacing more menus with commonConfirmMenu
roberthawdon Dec 11, 2024
c742971
Cut v1 branch, fixed mouse scroll down issue
roberthawdon Dec 14, 2024
ccbf33c
Added scrolling support for the colors theme editor
roberthawdon Dec 17, 2024
4e93981
Fixed menu disappearing, mouse modifications
roberthawdon Dec 18, 2024
066dc2a
Updated default config file
roberthawdon Dec 18, 2024
f4852bd
Happy New Year
roberthawdon Jan 2, 2025
e4ee36d
Fixed issue with Carriage return characters in filenames
roberthawdon Jan 4, 2025
d23cd25
Added scroll settings for show
roberthawdon Jan 24, 2025
18685a9
Added scroll settings for sf
roberthawdon Jan 24, 2025
7fdd3a6
Storing scrollStep as an Int
roberthawdon Jan 25, 2025
ee09580
Added enabling mouse to settings
roberthawdon Jan 26, 2025
0f73f67
Updated language files
roberthawdon Feb 6, 2025
481e0de
Started on settings sections
roberthawdon Mar 13, 2025
334f81a
Adding bare bone function
roberthawdon Mar 23, 2025
bb322a4
Populating struct
roberthawdon Mar 26, 2025
c73abdb
Referencing the new sections
roberthawdon Mar 27, 2025
31544f9
Started reworking display of settings function
roberthawdon Apr 1, 2025
9f05475
Fix mouse click postiion
roberthawdon Apr 1, 2025
94a739b
Further rework on settings routines
roberthawdon Apr 2, 2025
e4e1d61
Reworking the lookup function
roberthawdon Apr 2, 2025
11e8c6b
Fixed navigation with grouping
roberthawdon Apr 5, 2025
942c3a4
Prevent settings crashing DF-SHOW from sf within show
roberthawdon Apr 5, 2025
c09064a
Reset count
roberthawdon Apr 6, 2025
17cd24b
Updated translation
roberthawdon Apr 6, 2025
7c13336
Fixes settings not showing on macOS
roberthawdon Apr 6, 2025
522f71f
Fixed menu bar in settings
roberthawdon Apr 20, 2025
61a82c2
Settings menu scrolling on smaller terminals
roberthawdon Apr 23, 2025
6335d10
Updated translation
roberthawdon Apr 23, 2025
fb76177
Jump to the top of settings if screen is resized smaller than selecte…
roberthawdon Apr 24, 2025
3b7f420
Cleaned up commented code, updated translation files
roberthawdon Apr 24, 2025
e3475b5
Fixed bad data in conf file, fixed free text positions
roberthawdon May 4, 2025
272ba93
Removed some old commented code
roberthawdon May 6, 2025
95d2c02
Reworked a bit of sf's file loading routine
roberthawdon May 8, 2025
d2a48cc
Made select and multi options clickable
roberthawdon Aug 8, 2025
0fdabe6
Update i8n
roberthawdon Aug 8, 2025
7427216
Corrected malloc
roberthawdon Aug 8, 2025
3a94820
Removed over-reading memory bug
roberthawdon Aug 10, 2025
91ed9e7
Auto versioning, added GH workflow
roberthawdon Aug 10, 2025
7f670a6
Updated bootstrap
roberthawdon Aug 10, 2025
bc72d13
Updated bootstrap with aclocal fix
roberthawdon Aug 10, 2025
65387e4
Updated bootstrap with backward compatability
roberthawdon Aug 10, 2025
9263d79
Updated documention script
roberthawdon Aug 10, 2025
fa729e4
Updated documention and added French
roberthawdon Aug 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Create Release with Tarball

on:
push:
tags:
- 'v*.*.*' # Standard releases: v1.0.0, v2.1.3
- 'v*.*.*-alpha*' # Alpha releases: v1.0.0-alpha, v1.0.0-alpha1
- 'v*.*.*-beta*' # Beta releases: v1.0.0-beta, v1.0.0-beta2
- 'v*.*.*-rc*' # Release candidates: v1.0.0-rc1, v1.0.0-rc10

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for git describe

- name: Install development dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autotools-dev \
autoconf \
automake \
libtool \
build-essential \
pkg-config \
ncurses-dev \
libncursesw5-dev \
libconfig-dev \
libacl1-dev \
gettext \
gettext-base \
autopoint

- name: Create tarball version file
run: |
# Create version file for tarball distributions
git describe --tags --dirty --always > .tarball-version

- name: Run bootstrap script
run: ./bootstrap

- name: Configure the build
run: ./configure

- name: Create distribution tarball
run: make dist

- name: Find generated tarball
id: find-tarball
run: |
TARBALL=$(ls *.tar.gz | head -n1)
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
echo "Found tarball: $TARBALL"

- name: Determine if pre-release
id: prerelease
run: |
if [[ "${{ github.ref_name }}" =~ -alpha|-beta|-rc ]]; then
echo "prerelease=true" >> $GITHUB_OUTPUT
echo "This is a pre-release version"
else
echo "prerelease=false" >> $GITHUB_OUTPUT
echo "This is a stable release"
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: ${{ steps.find-tarball.outputs.tarball }}
prerelease: ${{ steps.prerelease.outputs.prerelease }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ po/*.gmo
valgrind*
*.#*
ABOUT-NLS
*.tar.gz
13 changes: 9 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dfshowdatadir = $(datadir)/dfshow
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = -DSYSCONFIG=\"$(dfshowconfdir)\" -DDATADIR=\"$(dfshowdatadir)\" -D_XOPEN_SOURCE_EXTENDED -fno-common

EXTRA_CFLAGS = -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=odr -Werror=strict-aliasing

LDADD = -lm -lconfig $(LIBINTL)

ACLOCAL_AMFLAGS = -I m4
Expand All @@ -33,17 +35,20 @@ endif
bin_PROGRAMS = bin/show bin/sf
bin_show_SOURCES = src/show.c src/showfunctions.c src/sffunctions.c src/showmenus.c src/sfmenus.c src/colors.c src/common.c src/menu.c src/input.c src/display.c src/settings.c src/i18n.c
bin_show_LDADD = $(LDADD)
bin_show_CFLAGS = $(AM_CFLAGS) -DAPPLICATION_SHOW -DAPPLICATION_SF
bin_show_CFLAGS = $(NCURSES_CFLAGS) $(EXTRA_CFLAGS) $(AM_CFLAGS) -DAPPLICATION_SHOW -DAPPLICATION_SF
bin_show_LDFLAGS = $(NCURSES_LIBS) $(AM_LDFLAGS)
bin_sf_SOURCES = src/sf.c src/sffunctions.c src/sfmenus.c src/colors.c src/common.c src/menu.c src/input.c src/display.c src/settings.c src/i18n.c
bin_sf_LDFLAGS = $(NCURSES_LIBS) $(AM_LDFLAGS)
bin_sf_LDADD = $(LDADD)
bin_sf_CFLAGS = $(AM_CFLAGS) -DAPPLICATION_SF
bin_sf_CFLAGS = $(NCURSES_CFLAGS) $(EXTRA_CFLAGS) $(AM_CFLAGS) -DAPPLICATION_SF
dfshowconf_DATA = conf/dfshow.conf
dfshowdata_DATA = themes/*
dist_data_DATA = conf/dfshow.conf themes/*

man_MANS = man/show.1 man/sf.1
noinst_HEADERS = src/show.h src/sf.h src/showfunctions.h src/showmenus.h src/sfmenus.h src/colors.h src/common.h src/banned.h src/display.h src/input.h src/menu.h src/settings.h src/i18n.h src/gettext.h
noinst_HEADERS = src/banned.h src/colors.h src/common.h src/customtypes.h src/display.h src/gettext.h src/i18n.h src/input.h src/menu.h src/settings.h src/sffunctions.h src/sf.h src/sfmenus.h src/showfunctions.h src/show.h src/showmenus.h

EXTRA_DIST = doc
EXTRA_DIST = LICENSE man

check-gettext:
@if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \
Expand Down
10 changes: 8 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env sh

autoreconf --install
automake --add-missing
if [ -d /usr/share/gettext/m4 ]; then
aclocal -I /usr/share/gettext/m4
else
aclocal
fi

autoconf --force # Force regeneration even if configure exists
automake --add-missing --copy
2 changes: 2 additions & 0 deletions conf/dfshow.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ common:
theme = "default";
# Enable SIGINT - quit on Ctrl-C (default: 0)
sigint = 0;
# Enable Mouse mode (default: 0)
enable-mouse = 0;
};

show:
Expand Down
28 changes: 26 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
AC_INIT([dfshow],[0.10.3],[https://github.com/roberthawdon/dfshow/issues])
AC_INIT([dfshow],
m4_esyscmd_s([
if test -d .git; then
git describe --tags --dirty --always 2>/dev/null || echo "1.0.0-unknown"
elif test -f .tarball-version; then
cat .tarball-version
else
echo "1.0.0-unknown"
fi
]),
[https://github.com/roberthawdon/dfshow/issues])
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h:config.hin])
AC_SUBST([AM_LDFLAGS])

# Adjust CFLAGS depending on the compiler
case "$CC" in
*gcc*)
CFLAGS="$CFLAGS -flto=auto -Werror=lto-type-mismatch"
LDFLAGS="$LDFLAGS -flto=auto"
;;
*clang*)
CFLAGS="$CFLAGS"
;;
*)
AC_MSG_WARN([Unknown compiler, using default CFLAGS])
;;
esac

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.17.18)
AM_GNU_GETTEXT_REQUIRE_VERSION(0.17.18)
Expand Down Expand Up @@ -31,10 +55,10 @@ AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]])
AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]])
AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set)

PKG_CHECK_MODULES([NCURSES], [ncursesw])

AC_CHECK_MEMBERS([struct stat.st_author])
AC_CHECK_HEADERS([stdio.h limits.h signal.h ctype.h wctype.h getopt.h sys/types.h sys/stat.h dirent.h fcntl.h pwd.h string.h stdlib.h unistd.h time.h sys/statvfs.h libgen.h errno.h wchar.h hurd.h math.h sys/sysmacros.h regex.h utime.h sys/xattr.h acl/libacl.h stdint.h])
AC_CHECK_HEADERS(ncurses.h, , AC_MSG_ERROR(ncurses header (ncurses.h) not found. You may need to install an ncurses development package.))
AC_CHECK_HEADERS(libconfig.h, , AC_MSG_ERROR(libconfig header (libconfig.h) not found. You may need to install a libconfig development package.))
AC_CHECK_HEADERS(sys/acl.h, , AC_MSG_ERROR(libacl header (sys/acl.h) not found. You may need to install a libacl development package.))

Expand Down
62 changes: 59 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,74 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import subprocess
import os
import re

# -- Functions ---------------------------------------------------------------

def get_version():
"""Get version from git describe or fallback file."""
# Get the repository root (two levels up from docs/source/)
repo_root = os.path.join(os.path.dirname(__file__), '..', '..')
repo_root = os.path.abspath(repo_root)

try:
# Try to get version from git
if os.path.exists(os.path.join(repo_root, '.git')) or os.environ.get('GITHUB_ACTIONS'):
result = subprocess.run(
['git', 'describe', '--tags', '--dirty', '--always'],
cwd=repo_root, # Run git command from repository root
capture_output=True,
text=True,
check=True
)
full_version = result.stdout.strip()

# Remove 'v' prefix if present
if full_version.startswith('v'):
full_version = full_version[1:]

# Extract short version (X.Y) from full version
version_match = re.match(r'(\d+\.\d+)', full_version)
short_version = version_match.group(1) if version_match else '1.0'

return short_version, full_version

except (subprocess.CalledProcessError, FileNotFoundError):
pass

# Fallback: try to read from tarball version file
try:
tarball_version_path = os.path.join(repo_root, '.tarball-version')
if os.path.exists(tarball_version_path):
with open(tarball_version_path, 'r') as f:
full_version = f.read().strip()
if full_version.startswith('v'):
full_version = full_version[1:]

version_match = re.match(r'(\d+\.\d+)', full_version)
short_version = version_match.group(1) if version_match else '1.0'

return short_version, full_version
except (IOError, OSError):
pass

# Final fallback
return '1.0', '1.0.0-unknown'

# -- Project information -----------------------------------------------------

project = 'Directory File Show (DF-SHOW)'
copyright = '2024, Robert Ian Hawdon'
copyright = '2025, Robert Ian Hawdon'
author = 'Robert Ian Hawdon'

# The short X.Y version
version = '0.10'
# version = '1.0'
# The full version, including alpha/beta/rc tags
release = '0.10.3-beta'
# release = '1.0.0-b.1'

version, release = get_version()

# -- General configuration ---------------------------------------------------

Expand Down
24 changes: 18 additions & 6 deletions docs/source/sf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,24 @@ the file window after the last line of the file.
Command line arguments
----------------------

``-w``, ``--wrap`` Enables line wrapping.
``-w``, ``--wrap``
Enables line wrapping.

``--theme``\ =[THEME]: Color themes. Passsing this argument
``--theme``\ =[THEME]
Color themes. Passsing this argument
without an option will display available themes.

``--settings-menu``
Launch ``sf`` directly into the settings menu.
Launch ``sf`` directly into the settings menu.

``--help``: Displays help message, then exits.
``--help``
Displays help message, then exits.

``--version``: Displays program version, then exits.
``--version``
Displays program version, then exits.

``--enable-mouse``\ =BOOLEAN
Launches ``sf`` with mouse support.

Commands
--------
Expand Down Expand Up @@ -136,7 +143,12 @@ The following screen is displayed.

SF Settings Menu - Quit, Revert, Save

[ ] Enable text wrapping
Global Settings
[ ] Enable mouse (Requires restart)

Behavior Settings
[ ] Enable text wrapping
<-> Mouse scroll interval size: <1> <2> <3> <4> <5> <6> <7> <8> <9>

The menu is made up of toggle switches. When active, the switch will display
``[*]``, when inactive ``[ ]`` is displayed. To toggle a value, press *SPACE*
Expand Down
Loading