summaryrefslogtreecommitdiff
path: root/gui_theme.c (follow)
Commit message (Collapse)AuthorAge
* exec: Rename para_exec_cmdline_pid() to xexec().Andre Noll2026-08-01
| | | | | This is shorter and conveys enough information. Rename the static para_exec() as well.
* gui: Rename curses windows.Andre Noll2026-07-14
| | | | | Rename in to sbar and sb to vbar, as this is still short but conveys the meaning of both one-line windows better.
* gui: New theme: figlet.Andre Noll2026-07-14
| | | | | This adds another theme for para_gui which displays the artist and title of the current file using large ascii art characters produced by the figlet(1) utility.
* gui: Introduce ->print_status_items() of struct gui_theme.Andre Noll2026-07-14
| | | | | | | | | | | | | | This replaces the array of struct stat_item_data by a function pointer. The array approach is still used by the colorful blackness theme, which now defines its own array in gui_theme.c. This allows the definition of struct stat_item_data to be private to gui_theme.c. The "simple" theme now tries to display a suitable string to describe the current audio file rather than always showing the basename. Drop the server and audiod status items it used to show. It's called "simple", after all. Both themes need to align the strings they print, so align_str() has to become public.
* gui: Replace separator by progress bar.Andre Noll2026-05-25
| | | | | | | This replaces the separator bar and its associated curses window by a progress bar, using the characters "▒" and "░". The duration of the current file is shown next to the bar. The colors of the bar and the duration are configurable in the theme.
* gui: Remove unused theme author field.Andre Noll2026-05-25
| | | | In contrast to what the comment says, this is not printed at startup.
* gui: Reformat the meta tags of the colorful blackness theme.Andre Noll2026-05-25
| | | | The tabular form of the four tags looks a bit nicer. YMMV.
* gui: Introduce separate colors for top and bottom window.Andre Noll2026-05-25
| | | | It's more natural to use the .dflt colors only for color pair 0.
* gui: Use standard include order for gui_theme.c.Andre Noll2026-05-25
| | | | System headers come before local headers.
* gui: Constify the themes array.Andre Noll2026-05-25
| | | | | | | | | There is no point in having an init function for each theme that just initializes the theme structure with values which are compile-time constant. Make the array constant and change theme_init() to just set the static global current_theme_num. Also make current_theme_num unsigned, as we perform decrement and modulo operations on it.
* Merge topic branch t/gui into masterAndre Noll2026-04-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improvements to para_gui A short series which implements the new clear_bot_win internal gui command. On top of that follow a bunch of other small improvements. Nothing scary here. * t/gui: gui: Drop terminating dummy command from command_list[]. gui: Remove dead post-schedule code. gui: Drop SIGUSR1 handling. gui: Ignore SIGINT. gui: Do not request minimal timeout on notifications. gui: Drop refresh_window(). gui: Use normal output color for help text. gui: Show file size in human-readable form. gui: New internal command: clear_bot_win.
| * gui: Show file size in human-readable form.Andre Noll2026-03-23
| | | | | | | | That's easy to do, and quite useful.
* | Switch to SPDX identifiers.Andre Noll2026-03-17
|/ | | | | | | | Generated with sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h followed by manually tweaking the result a bit. No license change intended.
* gui: Switch to white foreground for command output.Andre Noll2025-01-22
| | | | The new color scheme is easier to read, and is more pleasant on the eye.
* gui: Fix formatting of amp value.Andre Noll2024-09-10
| | | | | | | | | | It was observed on a 178 column wide xterm window that for the colorful blackness theme the amp value shown in the top window of para_gui wrapped into the subsequent line under some circumstances. Adjust the corresponding value in gui_theme.c to fix this. Also add the missing space character to the prefix and fix a whitespace issue while at it.
* gui: Fix off-by-one in colorful blackness theme.Andre Noll2024-03-12
| | | | | Without this, on a 80 character window and the three-digit amp value, the value gets truncated unnecessarily.
* gui: Allow for 4-digit image IDs on 80-character terminals.Andre Noll2022-10-24
| | | | | | | | | Currently, the first digit of a 4-digit image ID get truncated to three characters if the width of the terminal window is at its minimal size of 80 characters. We can squeeze out two more characters from the previous field, so this is easy to fix. This only affects the colorful blackness theme.
* gui: Fix length of audio format field.Andre Noll2021-01-01
| | | | | Without this, the contents of the subsequent item (numplayed) are overwritten by spaces. This only affects the colorful blackness theme.
* gui: Adjust position of num_played value.Andre Noll2020-06-17
| | | | | | | | | If the terminal window is only 80 characters wide, the num_played value may be adjacent to the bitrate value, with no space between. This happens only if the num_played value is bigger than 99, and only with the "colorful blackness" theme. This simple patch should fix the issue.
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* Define status items in para.h.Andre Noll2017-07-21
| | | | | | | | | | | | | | | | | | | | | The only reason the status item enum and string array are defined in configure.ac is that upper case identifiers and lower case strings are not easy to do in cpp as it lacks toupper(). However, configure.ac is not the right place for defining C language constructs as the configure script should only check for installed packages. This commit moves the definition of the status item enum and array to para.h and modifies all users to use lower case for the item names. This was automated with a script which essentially did upper=${i^^} sed -i "s/\<SI_$upper/SI_$i/g" $files for each status item $i. Care has been taken to leave the order of the status items unchanged. This is important because the item numbers must be considered part of the API between server and client.
* Update year in copyright headers.Andre Noll2015-01-12
| | | | | | | | | | | | | | | | Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
* Assorted typo fixes in comments.Andre Noll2015-01-11
| | | | Quite a few..
* doc: Change email address to maan@tuebingen.mpg.deAndre Noll2014-08-18
| | | | | | | | | | | | | | The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
* gui: Simplify color handling.Andre Noll2014-05-04
| | | | | | | | | | | | | Various gui elements of para_gui can be customized through struct gui_theme. Currently this structure contains two integers for each each element, one for the foreground and one for the background color of the element. This is a bit clumsy and repetitive. This commit cuts down the number of fields of struct gui_theme by a factor of two by introducing struct gui_color_spec as a pair of integers. The patch is quite large but also simple.
* Doxify para_gui.Andre Noll2014-05-04
| | | | | Now that para_gui is in a much better shape, let's make it a first class citizen and document all public functions and data structures.
* gui: Remove change_theme().Andre Noll2014-05-04
| | | | It's silly to have a function for this.
* gui: Rename public gui theme functions.Andre Noll2014-05-04
| | | | Prefix all functions related to themes with "theme_".
* gui: Use whline() for drawing the separator.Andre Noll2014-05-04
| | | | | | | | | | | | This should be slightly more efficient. This patch also changes the type of struct gui_theme->sep_str from const char * to plain char and renames the field to sep_char. It must be a single-character string anyway. For the colorful blackness theme we now use the default character from curses.h rather than '-'. This looks nicer. Tested with ncurses on Linux and the curses implementation that ships with NetBSD.
* gui: Remove welcome message.Andre Noll2014-05-04
| | | | | | | The only information shown by print_welcome() that is not already contained in the status bar is the name of the current theme. This is not very interesting, so remove the function and the corresponding color pair.
* Change copyright year to 2014.Andre Noll2014-02-22
| | | | | | | | | This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
* Change copyright year to 2013.Andre Noll2013-03-25
| | | | Better late than never.
* Change year in copyright message to 2012.Andre Noll2012-01-07
|
* Always include stdbool.h.Andre Noll2011-12-18
| | | | | | | | | This adds the #include statement for stdbool.h to para.h. This allows to get rid of the individual includes in *.c. More importantly, since all *.c files include para.h, booleans will now be available everywhere so that we won't need to touch dozens of files anymore whenever a boolean is added to a public structure.
* Make some variables static.Andre Noll2011-04-22
| | | | Found by sparse.
* gui_theme: Make set_theme() static.Andre Noll2011-02-21
|
* gui: Allow selecting a startup theme.Andre Noll2011-02-11
| | | | | This implements the --theme option which allows to start para_gui with a theme different than the default theme.
* Replace 2010 in copyright message by 2011.Andre Noll2011-01-17
|
* Change year in COPYRIGHT to 2010.Andre Noll2010-04-05
| | | | Hey, this is earlier than last year :)
* gui: Make album/comment layout look nicer.Andre Noll2009-09-20
|
* Major audio format handler cleanups.Andre Noll2009-06-26
| | | | | | | | | | | | | | | | | | | | | The main change is the replacement of afhi->taginfo by more specific fields: This patch adds struct taginfo to the audio format handler info struct. The prefix is no longer stored inside the osl database, i.e. it is no longer duplicated for each audio file. The tag information is only stored in memory as a dynamically allocated string if it is new, i.e. if the struct was generated by the audio format handler. If it was retrieved from the database, pointers to the memory mapped table are used instead. The crappy fixup_info_string() function is gone. It was too ugly to live. Of course, this re-introduces the bug it fixed, but as we broke the on disk format with this patch anyway, we might as well fix it right(TM). This will be done in a subsequent patch. afhi->eof_tv is gone as well. It was not useful at all.
* Change year of copyright from 2008 to 2009.Andre Noll2009-01-10
|
* gui: Add the amplification value to output.Andre Noll2008-11-16
|
* Change year in Copyright comment from 2007 to 2008.Andre Noll2008-01-08
|
* Add new status items num_chunks and chunk_time.Andre Noll2007-12-08
|
* gui: Reorder display of status items.Andre Noll2007-11-24
|
* Add more status items.Andre Noll2007-11-11
|
* Use FOR_EACH_STATUS_ITEM everywhere.Andre Noll2007-11-10
|
* More status item renames.Andre Noll2007-11-02
| | | | | | | SI_LENGTH_MIN -> SI_BITRATE SI_LENGTH_SEC -> SI_FREQUENCY SI_ATTRIBUTES -> SI_ATTRIBUTES_BITMAP SI_UPTIME -> SI_ATTRIBUTES_TXT
* Rename audio_info status items and get rid of duplicate afh info.Andre Noll2007-11-02
| | | | | | | | SI_AUDIO_INFO1 -> SI_AUDIO_FILE_INFO SI_AUDIO_INFO2 -> SI_TAG_INFO1 SI_AUDIO_INFO3 -> SI_TAG_INFO2 The mp3 and the ogg afh stored bits of information in the info string. Only store there what is not already contained in afh_info.