ab0b9b37d749a36e346554a2cf8d3a88a0f26973
ViewMD
A lightweight GTK 3 markdown viewer for desktop Linux. It is ideal as your default app for opening .md files. Uses the excellent library md4c for markdown parsing. This project is sort of a companion app/fork of my other markdown project TrayMD.
Features
- Native GTK viewer - No webviews
- Read-only rendering - Focused on viewing markdown files
- Minimal UI - Clean toolbar with open and settings buttons
- Lightweight - Pure C, no web technologies, fast startup
- Hyperlink support - Left click opens links and internal anchors
- Document search -
Ctrl+Fwith next/previous match navigation
Supported Markdown
| Syntax | Description |
|---|---|
# Header 1 |
Large bold header |
## Header 2 |
Medium bold header |
### Header 3 |
Small bold header |
**bold** |
Bold text |
*italic* |
Italic text |
`code` |
Inline code |
|
Code block |
- item |
List item |
> quote |
Block quote |
[text](url) |
Link |
~~strike~~ |
Strikethrough |
| table | row | |
Markdown tables |
--- |
Horizontal rule |
Code blocks currently support a beta version of keyword highlighting for fenced languages c, java, and python.
Installation
Arch Linux (AUR)
https://aur.archlinux.org/packages/viewmd
Debian/Ubuntu (.deb)
Install a built .deb package with:
sudo apt install ./viewmd_*.deb
Fedora/RHEL (.rpm)
Install a built .rpm package with:
sudo dnf install ./viewmd-*.rpm
Usage
Run viewmd to start the application.
- Open button: Open a markdown document
- Reload button: Reload the currently open document from disk
- Settings button: Adjust theme, fonts, and markdown accent colors
Find in Document
- Press
Ctrl+Fto open search. - Type to highlight matches as you search.
- Press
Enterfor next match andShift+Enterfor previous match. - Press
Escto close search.
Set as Default .md Viewer
After installing, associate markdown MIME types with viewmd.desktop:
xdg-mime default viewmd.desktop text/markdown
xdg-mime default viewmd.desktop text/x-markdown
Verify the current default:
xdg-mime query default text/markdown
Test by opening a markdown file through your desktop association:
xdg-open README.md
Building From Source
make
sudo make install
This installs:
- Binary to
/usr/local/bin/viewmd - Desktop file to
/usr/local/share/applications/viewmd.desktop
Uninstallation
sudo make uninstall
Dependencies
Arch Linux
sudo pacman -S gtk3
Ubuntu/Debian
sudo apt install libgtk-3-dev
Fedora
sudo dnf install gtk3-devel
Packaging Templates
- Arch:
packaging/arch/PKGBUILD - Debian:
packaging/deb/control.in - RPM:
packaging/rpm/viewmd.spec.in
License
MIT License
Other Useful Projects
- TrayMD is an app for taking notes in markdown with live editing TrayMD
- Preditor is an image viewer with a similar philosophy to viewmd preditor
- Try my AI panel plugin for XFCE XFCE Ask
- For a feature complete AI application try out ChatGTK
- A lightweight speech to text implementation Auriscribe
- A lightweight local movie database and browser ReelVault
Description
A lightweight GTK 3 markdown viewer and editor for desktop Linux.
1.9 MiB
0 Stars
1 Watchers
0 Forks
Languages
C
99.5%
Makefile
0.3%
Shell
0.2%
