diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | docs/README.md | 34 | ||||
-rw-r--r-- | docs/terminal-media-launcher-config.5.gz | bin | 0 -> 2383 bytes | |||
-rw-r--r-- | docs/terminal-media-launcher-config.md (renamed from docs/tml-config.md) | 10 | ||||
-rw-r--r-- | docs/terminal-media-launcher.1.gz | bin | 0 -> 1022 bytes | |||
-rw-r--r-- | docs/tml-config.5.gz | bin | 2330 -> 0 bytes | |||
-rw-r--r-- | docs/tml.1.gz | bin | 971 -> 0 bytes | |||
-rw-r--r-- | docs/windows_compile_instructions.md | 6 | ||||
-rw-r--r-- | read_cfg.c | 2 | ||||
-rw-r--r-- | unix/cache.c | 4 | ||||
-rw-r--r-- | unix/read_cfg.c | 10 | ||||
-rw-r--r-- | windows/cache.c | 4 | ||||
-rw-r--r-- | windows/read_cfg.c | 10 |
13 files changed, 45 insertions, 45 deletions
@@ -1,5 +1,5 @@ CC = gcc -NAME = tml +NAME = terminal-media-launcher LIBS = -lncurses PREFIX = /usr/local @@ -57,18 +57,18 @@ desktop-entry: echo "Categories=Utility" >> icon/$(NAME).desktop mkdir -p $(DESTDIR)$(PREFIX)/share/applications mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps - cp -i icon/icon.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/tml.svg + cp icon/icon.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/$(NAME).svg desktop-file-install --dir=$(DESTDIR)$(PREFIX)/share/applications icon/$(NAME).desktop update-desktop-database $(DESTDIR)$(PREFIX)/share/applications .PHONY: install install: mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -i $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) + cp $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 - cp -i docs/$(NAME).1.gz $(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1.gz + cp docs/$(NAME).1.gz $(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1.gz mkdir -p $(DESTDIR)$(PREFIX)/share/man/man5 - cp -i docs/$(NAME)-config.5.gz $(DESTDIR)$(PREFIX)/share/man/man5/$(NAME)-config.5.gz + cp docs/$(NAME)-config.5.gz $(DESTDIR)$(PREFIX)/share/man/man5/$(NAME)-config.5.gz .PHONY: uninstall uninstall: diff --git a/docs/README.md b/docs/README.md index 97b414a..08a5784 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,28 +1,28 @@ ## Introduction -**Terminal Media Launcher** is a command line utility to help streamline launching applications and other media. The goal of tml is to provide a fast, minimal, command line frontend with a Unix-like approach to setup and configuration. The program looks for a configuration file listing different groups of media and creates an ncurses menu from which to select from. If a configuration file is found, the program will draw two columns: one for groups, and one for entries. At the bottom of the window, a preview of the command execution is displayed. +**Terminal Media Launcher** is a command line utility to help streamline launching applications and other media. The goal of this program is to provide a fast, minimal, command line frontend with a Unix-like approach to setup and configuration. The program looks for a configuration file listing different groups of media and creates an ncurses menu from which to select from. If a configuration file is found, the program will draw two columns: one for groups, and one for entries. At the bottom of the window, a preview of the command execution is displayed. ## Compiling and Running For Windows instructions, see [here](windows_compile_instructions.md) -tml can be compiled on any system with make, gcc, and the ncurses library (libncurses-dev) installed. It can be compiled and installed on any Linux distribution, and can also be compiled and run on Windows 10. To compile and run tml: +terminal-media-launcher can be compiled on any system with make, gcc, and the ncurses library (libncurses-dev) installed. It can be compiled and installed on any Linux distribution, and can also be compiled and run on Windows 10. To compile and run terminal-media-launcher: 1. Clone the repository -2. Run `make` in the directory the repository was cloned into. This will create a file called `tml` -3. `./tml` to run the program +2. Run `make` in the directory the repository was cloned into. This will create a file called `terminal-media-launcher` +3. `./terminal-media-launcher` to run the program -Note that tml will not run until you have created a configuration file. +Note that terminal-media-launcher will not run until you have created a configuration file. ### Installation -tml can be installed on Linux by running: +terminal-media-launcher can be installed on Linux by running: ``` sudo make install ``` -This will install `tml` to `/usr/local/bin/tml` as well as man pages `tml` and `tml-config`. +This will install `terminal-media-launcher` to `/usr/local/bin/terminal-media-launcher` as well as man pages `terminal-media-launcher` and `terminal-media-launcher-config`. To uninstall these files: ``` @@ -31,13 +31,13 @@ sudo make uninstall ### Create Desktop Entry -If tml is installed (see above), a Desktop Entry can be created on Linux by running: +If terminal-media-launcher is installed (see above), a Desktop Entry can be created on Linux by running: ``` sudo make desktop-entry ``` -This will create a desktop entry at `/usr/local/share/applications/tml.desktop`. +This will create a desktop entry at `/usr/local/share/applications/terminal-media-launcher.desktop`. ## Screenshots @@ -46,23 +46,23 @@ This will create a desktop entry at `/usr/local/share/applications/tml.desktop`. ## Configuration File -By default, tml searches in the following order for a configuration file: +By default, terminal-media-launcher searches in the following order for a configuration file: ### Linux -1. `$HOME/.config/tml/config` -2. `$HOME/.tml/config` +1. `$HOME/.config/terminal-media-launcher/config` +2. `$HOME/.terminal-media-launcher/config` ### Windows -1. `%APPDATA%\tml\config` +1. `%APPDATA%\terminal-media-launcher\config` A different configuration file location can also be specified with the `-c` flag: ``` -tml -c /path/to/config +terminal-media-launcher -c /path/to/config ``` -For Documentation of the configuration file, see [tml-config](tml-config.md). -For a help message and list of flags, `tml --help`. -If you installed tml, you can also consult **tml**(1) and **tml-config**(5). +For Documentation of the configuration file, see [terminal-media-launcher-config](terminal-media-launcher-config.md). +For a help message and list of flags, `terminal-media-launcher --help`. +If you installed terminal-media-launcher, you can also consult **terminal-media-launcher**(1) and **terminal-media-launcher-config**(5). diff --git a/docs/terminal-media-launcher-config.5.gz b/docs/terminal-media-launcher-config.5.gz Binary files differnew file mode 100644 index 0000000..23250a5 --- /dev/null +++ b/docs/terminal-media-launcher-config.5.gz diff --git a/docs/tml-config.md b/docs/terminal-media-launcher-config.md index 41398c1..3d12f97 100644 --- a/docs/tml-config.md +++ b/docs/terminal-media-launcher-config.md @@ -1,6 +1,6 @@ ## Introduction -**config** specifies settings for Terminal Media Launcher, including preferences, groups, entries, and file locations. Each line of `config` is read by tml unless the line is empty or the line begins with a '#'. tml can automatically generate a configuration file if no such file is found. An automatically generated configuration file will create groups for Music, Pictures, and Videos, and add entries to each group from the respective directory in the user's home directory. It is highly recommended that the user edit the configuration file manually. +**config** specifies settings for Terminal Media Launcher, including preferences, groups, entries, and file locations. Each line of `config` is read by terminal-media-launcher unless the line is empty or the line begins with a '#'. terminal-media-launcher can automatically generate a configuration file if no such file is found. An automatically generated configuration file will create groups for Music, Pictures, and Videos, and add entries to each group from the respective directory in the user's home directory. It is highly recommended that the user edit the configuration file manually. ## Table of Contents @@ -25,7 +25,7 @@ ## Creating a Group <a name="CreatingAGroup"></a> -tml will not work without any groups, so you will need to know how to create a group. +terminal-media-launcher will not work without any groups, so you will need to know how to create a group. ### addGroup @@ -37,7 +37,7 @@ tml will not work without any groups, so you will need to know how to create a g - **setLauncher** *group* */path/to/launcher* -`setLauncher` will set a group's launching application. If no launching application is specified for a group, tml will treat each entry in that group as an executable file. If there is a space in the path to the launching application, it must be written in quotes (ex. "/usr/bin/my launcher"). *Keep in mind that the path to the launching application should be absolute*. +`setLauncher` will set a group's launching application. If no launching application is specified for a group, terminal-media-launcher will treat each entry in that group as an executable file. If there is a space in the path to the launching application, it must be written in quotes (ex. "/usr/bin/my launcher"). *Keep in mind that the path to the launching application should be absolute*. ### setLauncherRaw @@ -53,7 +53,7 @@ tml will not work without any groups, so you will need to know how to create a g ## Adding Entries <a name=AddingEntries></a> -tml will hide empty groups, so you will need to know how to add entries to a group. +terminal-media-launcher will hide empty groups, so you will need to know how to add entries to a group. ### add @@ -118,7 +118,7 @@ If any of the following settings are specified, they should be at the top of the - **foldCase** *on/off* -Entering any non-traversal input in tml can be used to jump to a group or entry. For instance, hitting 'f' on the keyboard will jump the cursor to the next group or entry that starts with an 'f'. *foldCase* determines whether or not this functionality is **case insensitive (on)** or **case sensitive (off)**. *foldCase* is turned on by default. +Entering any non-traversal input in terminal-media-launcher can be used to jump to a group or entry. For instance, hitting 'f' on the keyboard will jump the cursor to the next group or entry that starts with an 'f'. *foldCase* determines whether or not this functionality is **case insensitive (on)** or **case sensitive (off)**. *foldCase* is turned on by default. ### sort diff --git a/docs/terminal-media-launcher.1.gz b/docs/terminal-media-launcher.1.gz Binary files differnew file mode 100644 index 0000000..de27be3 --- /dev/null +++ b/docs/terminal-media-launcher.1.gz diff --git a/docs/tml-config.5.gz b/docs/tml-config.5.gz Binary files differdeleted file mode 100644 index fde914d..0000000 --- a/docs/tml-config.5.gz +++ /dev/null diff --git a/docs/tml.1.gz b/docs/tml.1.gz Binary files differdeleted file mode 100644 index 33c4e83..0000000 --- a/docs/tml.1.gz +++ /dev/null diff --git a/docs/windows_compile_instructions.md b/docs/windows_compile_instructions.md index 8966263..21530fb 100644 --- a/docs/windows_compile_instructions.md +++ b/docs/windows_compile_instructions.md @@ -10,13 +10,13 @@ Compiling on Windows requires access to the MinGW toolchain. The easiest way to 4. `pacman -S git mingw-w64-x86_64-gcc mingw-w64-x86_64-ncurses make` to install necessary packages -5. `git clone https://github.com/lshprung/tml` to clone the repository +5. `git clone https://github.com/lshprung/terminal-media-launcher` to clone the repository -6. `cd tml` to enter the repository +6. `cd terminal-media-launcher` to enter the repository 7. `make` to compile -If you did everything correctly, compilation should succeed. Open File Explorer in the current directory (can be done by running `explorer .` in MSYS2 terminal) and double click the generated executable (should be called tml.exe) +If you did everything correctly, compilation should succeed. Open File Explorer in the current directory (can be done by running `explorer .` in MSYS2 terminal) and double click the generated executable (should be called terminal-media-launcher.exe) ## Resolving Missing .dll Files @@ -103,7 +103,7 @@ bool get_case_sensitivity(){ } void refer_to_doc(){ - printf("Refer to documentation on how to create tml config file\n"); + printf("Refer to documentation on how to create terminal-media-launcher config file\n"); return; } diff --git a/unix/cache.c b/unix/cache.c index efd7cdf..e618602 100644 --- a/unix/cache.c +++ b/unix/cache.c @@ -25,11 +25,11 @@ char *get_cache_path(bool create){ sprintf(path, "%s%c.cache%c", home, sep, sep); mkdir(path, 0755); - sprintf(path, "%s%c.cache%ctml%c", home, sep, sep, sep); + sprintf(path, "%s%c.cache%cterminal-media-launcher%c", home, sep, sep, sep); mkdir(path, 0755); } - sprintf(path, "%s%c.cache%ctml%cdata.bin", home, sep, sep, sep); + sprintf(path, "%s%c.cache%cterminal-media-launcher%cdata.bin", home, sep, sep, sep); return path; } diff --git a/unix/read_cfg.c b/unix/read_cfg.c index 3da4b4d..4d98c82 100644 --- a/unix/read_cfg.c +++ b/unix/read_cfg.c @@ -20,8 +20,8 @@ char *find_config(){ int check_count = 2; int i; - sprintf(choices[0], "%s%c.config%ctml%cconfig", home, sep, sep, sep); - sprintf(choices[1], "%s%c.tml%cconfig", home, sep, sep); + sprintf(choices[0], "%s%c.config%cterminal-media-launcher%cconfig", home, sep, sep, sep); + sprintf(choices[1], "%s%c.terminal-media-launcher%cconfig", home, sep, sep); for(i = 0; i < check_count; i++){ path = choices[i]; @@ -67,10 +67,10 @@ void mkconfig_wizard(char *path){ sprintf(path, "%s%c.config%c", home, sep, sep); mkdir(path, 0755); - sprintf(path, "%s%c.config%ctml%c", home, sep, sep, sep); + sprintf(path, "%s%c.config%cterminal-media-launcher%c", home, sep, sep, sep); mkdir(path, 0755); - sprintf(path, "%s%c.config%ctml%cconfig", home, sep, sep, sep); + sprintf(path, "%s%c.config%cterminal-media-launcher%cconfig", home, sep, sep, sep); //open file for writing, make sure non-NULL fp = fopen(path, "w"); @@ -80,7 +80,7 @@ void mkconfig_wizard(char *path){ } //write to file - fprintf(fp, "# This file was auto-generated by tml. See docs/tml-config.md or tml-config(5) for documentation\n" + fprintf(fp, "# This file was auto-generated by terminal-media-launcher. See docs/terminal-media-launcher-config.md or terminal-media-launcher-config(5) for documentation\n" "# The default launcher is set to \"xdg-open\" which will open files based on the relevant default application set through xdg\n\n" "# Recursively add files from %s%cMusic%c to Music group\n" "addGroup Music\n" diff --git a/windows/cache.c b/windows/cache.c index a7dd81e..01db0ef 100644 --- a/windows/cache.c +++ b/windows/cache.c @@ -20,11 +20,11 @@ char *get_cache_path(bool create){ //if create is asserted, build the path to the file if(create){ - sprintf(path, "%s%ctml%c", appdata, sep, sep); + sprintf(path, "%s%cterminal-media-launcher%c", appdata, sep, sep); mkdir(path); } - sprintf(path, "%s%ctml%ccache.bin", appdata, sep, sep); + sprintf(path, "%s%cterminal-media-launcher%ccache.bin", appdata, sep, sep); return path; } diff --git a/windows/read_cfg.c b/windows/read_cfg.c index 7cb98cc..2a56ef8 100644 --- a/windows/read_cfg.c +++ b/windows/read_cfg.c @@ -20,7 +20,7 @@ char *find_config(){ char choices[check_count][BUF_LEN]; int i; - sprintf(choices[0], "%s%ctml%cconfig", appdata, sep, sep); + sprintf(choices[0], "%s%cterminal-media-launcher%cconfig", appdata, sep, sep); for(i = 0; i < check_count; i++){ path = choices[i]; @@ -69,10 +69,10 @@ void mkconfig_wizard(char *path){ exit(1); } - sprintf(path, "%s%ctml%c", appdata, sep, sep); + sprintf(path, "%s%cterminal-media-launcher%c", appdata, sep, sep); mkdir(path); - sprintf(path, "%s%ctml%cconfig", appdata, sep, sep); + sprintf(path, "%s%cterminal-media-launcher%cconfig", appdata, sep, sep); //open file for writing, make sure non-NULL fp = fopen(path, "w"); @@ -81,8 +81,8 @@ void mkconfig_wizard(char *path){ exit(1); } - fprintf(fp, "# This file was auto-generated by tml. See docs\\tml-config.md or tml-config(5) for documentation\n" - "# By default, no launcher is specified for any group. When no launcher is specified on the Windows build of tml, media files will be opened with their default application.\n" + fprintf(fp, "# This file was auto-generated by terminal-media-launcher. See docs\\terminal-media-launcher-config.md or terminal-media-launcher-config(5) for documentation\n" + "# By default, no launcher is specified for any group. When no launcher is specified on the Windows build of terminal-media-launcher, media files will be opened with their default application.\n" "# It is generally recommended to specify a launcher for groups containing media files using the \"setLauncher\" command\n\n" "# Recursively add files from %s%cMusic%c to Music group\n" "addGroup Music\n", home, sep, sep); |