Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions generator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "generator"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
40 changes: 40 additions & 0 deletions generator/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
use std::{env, path::PathBuf, process};

mod standard;

fn main() {
let theme_dirs: Vec<PathBuf> = env::args().skip(1).map(PathBuf::from).collect();
for (kind, icons) in standard::standard().iter() {
let mut kind_dirs = Vec::new();
for size in &["scalable"] {
for theme_dir in theme_dirs.iter() {
let kind_dir = theme_dir.join(size).join(kind);
if kind_dir.is_dir() {
kind_dirs.push((size, kind_dir));
}
}
}
if kind_dirs.is_empty() {
eprintln!("\x1B[1mfailed to find {kind} folder\x1B[0m");
continue;
}
for icon in icons.iter() {
let mut found = Vec::new();
for (size, kind_dir) in kind_dirs.iter() {
for suffix in &["", "-symbolic"] {
for ext in &["png", "svg"] {
let icon_path = kind_dir.join(format!("{icon}{suffix}.{ext}"));
if icon_path.is_file() {
found.push((size, icon_path));
}
}
}
}
if found.is_empty() {
eprintln!("\x1B[1mfailed to find {kind}/{icon}\x1B[0m");
} else {
println!("found {kind}/{icon}: {:?}", found);
}
}
}
}
105 changes: 105 additions & 0 deletions generator/src/standard/actions.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
pub static CONTEXT: &'static str = "Actions";
pub static ICONS: &'static [&'static str] = &[
"address-book-new", // The icon used for the action to create a new address book.
"application-exit", // The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit.
"appointment-new", // The icon used for the action to create a new appointment in a calendaring application.
"call-start", // The icon used for initiating or accepting a call. Should be similar to the standard cellular call pickup icon, a green handset with ear and mouth pieces facing upward.
"call-stop", // The icon used for stopping a current call. Should be similar to the standard cellular call hangup icon, a red handset with ear and mouth pieces facing downward.
"contact-new", // The icon used for the action to create a new contact in an address book application.
"document-new", // The icon used for the action to create a new document.
"document-open", // The icon used for the action to open a document.
"document-open-recent", // The icon used for the action to open a document that was recently opened.
"document-page-setup", // The icon for the page setup action of a document editor.
"document-print", // The icon for the print action of an application.
"document-print-preview", // The icon for the print preview action of an application.
"document-properties", // The icon for the action to view the properties of a document in an application.
"document-revert", // The icon for the action of reverting to a previous version of a document.
"document-save", // The icon for the save action. Should be an arrow pointing down and toward a hard disk.
"document-save-as", // The icon for the save as action.
"document-send", // The icon for the send action. Should be an arrow pointing up and away from a hard disk.
"edit-clear", // The icon for the clear action.
"edit-copy", // The icon for the copy action.
"edit-cut", // The icon for the cut action.
"edit-delete", // The icon for the delete action.
"edit-find", // The icon for the find action.
"edit-find-replace", // The icon for the find and replace action.
"edit-paste", // The icon for the paste action.
"edit-redo", // The icon for the redo action.
"edit-select-all", // The icon for the select all action.
"edit-undo", // The icon for the undo action.
"folder-new", // The icon for creating a new folder.
"format-indent-less", // The icon for the decrease indent formatting action.
"format-indent-more", // The icon for the increase indent formatting action.
"format-justify-center", // The icon for the center justification formatting action.
"format-justify-fill", // The icon for the fill justification formatting action.
"format-justify-left", // The icon for the left justification formatting action.
"format-justify-right", // The icon for the right justification action.
"format-text-direction-ltr", // The icon for the left-to-right text formatting action.
"format-text-direction-rtl", // The icon for the right-to-left formatting action.
"format-text-bold", // The icon for the bold text formatting action.
"format-text-italic", // The icon for the italic text formatting action.
"format-text-underline", // The icon for the underlined text formatting action.
"format-text-strikethrough", // The icon for the strikethrough text formatting action.
"go-bottom", // The icon for the go to bottom of a list action.
"go-down", // The icon for the go down in a list action.
"go-first", // The icon for the go to the first item in a list action.
"go-home", // The icon for the go to home location action.
"go-jump", // The icon for the jump to action.
"go-last", // The icon for the go to the last item in a list action.
"go-next", // The icon for the go to the next item in a list action.
"go-previous", // The icon for the go to the previous item in a list action.
"go-top", // The icon for the go to the top of a list action.
"go-up", // The icon for the go up in a list action.
"help-about", // The icon for the About item in the Help menu.
"help-contents", // The icon for Contents item in the Help menu.
"help-faq", // The icon for the FAQ item in the Help menu.
"insert-image", // The icon for the insert image action of an application.
"insert-link", // The icon for the insert link action of an application.
"insert-object", // The icon for the insert object action of an application.
"insert-text", // The icon for the insert text action of an application.
"list-add", // The icon for the add to list action.
"list-remove", // The icon for the remove from list action.
"mail-forward", // The icon for the forward action of an electronic mail application.
"mail-mark-important", // The icon for the mark as important action of an electronic mail application.
"mail-mark-junk", // The icon for the mark as junk action of an electronic mail application.
"mail-mark-notjunk", // The icon for the mark as not junk action of an electronic mail application.
"mail-mark-read", // The icon for the mark as read action of an electronic mail application.
"mail-mark-unread", // The icon for the mark as unread action of an electronic mail application.
"mail-message-new", // The icon for the compose new mail action of an electronic mail application.
"mail-reply-all", // The icon for the reply to all action of an electronic mail application.
"mail-reply-sender", // The icon for the reply to sender action of an electronic mail application.
"mail-send", // The icon for the send action of an electronic mail application.
"mail-send-receive", // The icon for the send and receive action of an electronic mail application.
"media-eject", // The icon for the eject action of a media player or file manager.
"media-playback-pause", // The icon for the pause action of a media player.
"media-playback-start", // The icon for the start playback action of a media player.
"media-playback-stop", // The icon for the stop action of a media player.
"media-record", // The icon for the record action of a media application.
"media-seek-backward", // The icon for the seek backward action of a media player.
"media-seek-forward", // The icon for the seek forward action of a media player.
"media-skip-backward", // The icon for the skip backward action of a media player.
"media-skip-forward", // The icon for the skip forward action of a media player.
"object-flip-horizontal", // The icon for the action to flip an object horizontally.
"object-flip-vertical", // The icon for the action to flip an object vertically.
"object-rotate-left", // The icon for the rotate left action performed on an object.
"object-rotate-right", // The icon for the rotate rigt action performed on an object.
"process-stop", // The icon used for the \u201cStop\u201d action in applications with actions that may take a while to process, such as web page loading in a browser.
"system-lock-screen", // The icon used for the \u201cLock Screen\u201d item in the desktop's panel application.
"system-log-out", // The icon used for the \u201cLog Out\u201d item in the desktop's panel application.
"system-run", // The icon used for the \u201cRun Application...\u201d item in the desktop's panel application.
"system-search", // The icon used for the \u201cSearch\u201d item in the desktop's panel application.
"system-reboot", // The icon used for the \u201cReboot\u201d item in the desktop's panel application.
"system-shutdown", // The icon used for the \u201cShutdown\u201d item in the desktop's panel application.
"tools-check-spelling", // The icon used for the \u201cCheck Spelling\u201d item in the application's \u201cTools\u201d menu.
"view-fullscreen", // The icon used for the \u201cFullscreen\u201d item in the application's \u201cView\u201d menu.
"view-refresh", // The icon used for the \u201cRefresh\u201d item in the application's \u201cView\u201d menu.
"view-restore", // The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view.
"view-sort-ascending", // The icon used for the \u201cSort Ascending\u201d item in the application's \u201cView\u201d menu, or in a button for changing the sort method for a list.
"view-sort-descending", // The icon used for the \u201cSort Descending\u201d item in the application's \u201cView\u201d menu, or in a button for changing the sort method for a list.
"window-close", // The icon used for the \u201cClose Window\u201d item in the application's \u201cWindows\u201d menu.
"window-new", // The icon used for the \u201cNew Window\u201d item in the application's \u201cWindows\u201d menu.
"zoom-fit-best", // The icon used for the \u201cBest Fit\u201d item in the application's \u201cView\u201d menu.
"zoom-in", // The icon used for the \u201cZoom in\u201d item in the application's \u201cView\u201d menu.
"zoom-original", // The icon used for the \u201cOriginal Size\u201d item in the application's \u201cView\u201d menu.
"zoom-out", // The icon used for the \u201cZoom Out\u201d item in the application's \u201cView\u201d menu.
];
4 changes: 4 additions & 0 deletions generator/src/standard/animations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub static CONTEXT: &'static str = "Animations";
pub static ICONS: &'static [&'static str] = &[
"process-working", // This is the standard spinner animation for web browsers and file managers to show that the location is loading.
];
22 changes: 22 additions & 0 deletions generator/src/standard/apps.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pub static CONTEXT: &'static str = "Applications";
pub static ICONS: &'static [&'static str] = &[
"accessories-calculator", // The icon used for the desktop's calculator accessory program.
"accessories-character-map", // The icon used for the desktop's international and extended text character accessory program.
"accessories-dictionary", // The icon used for the desktop's dictionary accessory program.
"accessories-text-editor", // The icon used for the desktop's text editing accessory program.
"help-browser", // The icon used for the desktop's help browsing application.
"multimedia-volume-control", // The icon used for the desktop's hardware volume control application.
"preferences-desktop-accessibility", // The icon used for the desktop's accessibility preferences.
"preferences-desktop-font", // The icon used for the desktop's font preferences.
"preferences-desktop-keyboard", // The icon used for the desktop's keyboard preferences.
"preferences-desktop-locale", // The icon used for the desktop's locale preferences.
"preferences-desktop-multimedia", // The icon used for the desktop's multimedia preferences.
"preferences-desktop-screensaver", // The icon used for the desktop's screen saving preferences.
"preferences-desktop-theme", // The icon used for the desktop's theme preferences.
"preferences-desktop-wallpaper", // The icon used for the desktop's wallpaper preferences.
"system-file-manager", // The icon used for the desktop's file management application.
"system-software-install", // The icon used for the desktop's software installer application.
"system-software-update", // The icon used for the desktop's software updating application.
"utilities-system-monitor", // The icon used for the desktop's system resource monitor application.
"utilities-terminal", // The icon used for the desktop's terminal emulation application.
];
22 changes: 22 additions & 0 deletions generator/src/standard/categories.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pub static CONTEXT: &'static str = "Categories";
pub static ICONS: &'static [&'static str] = &[
"applications-accessories", // The icon for the \u201cAccessories\u201d sub-menu of the Programs menu.
"applications-development", // The icon for the \u201cProgramming\u201d sub-menu of the Programs menu.
"applications-engineering", // The icon for the \u201cEngineering\u201d sub-menu of the Programs menu.
"applications-games", // The icon for the \u201cGames\u201d sub-menu of the Programs menu.
"applications-graphics", // The icon for the \u201cGraphics\u201d sub-menu of the Programs menu.
"applications-internet", // The icon for the \u201cInternet\u201d sub-menu of the Programs menu.
"applications-multimedia", // The icon for the \u201cMultimedia\u201d sub-menu of the Programs menu.
"applications-office", // The icon for the \u201cOffice\u201d sub-menu of the Programs menu.
"applications-other", // The icon for the \u201cOther\u201d sub-menu of the Programs menu.
"applications-science", // The icon for the \u201cScience\u201d sub-menu of the Programs menu.
"applications-system", // The icon for the \u201cSystem Tools\u201d sub-menu of the Programs menu.
"applications-utilities", // The icon for the \u201cUtilities\u201d sub-menu of the Programs menu.
"preferences-desktop", // The icon for the \u201cDesktop Preferences\u201d category.
"preferences-desktop-peripherals", // The icon for the \u201cPeripherals\u201d sub-category of the \u201cDesktop Preferences\u201d category.
"preferences-desktop-personal", // The icon for the \u201cPersonal\u201d sub-category of the \u201cDesktop Preferences\u201d category.
"preferences-other", // The icon for the \u201cOther\u201d preferences category.
"preferences-system", // The icon for the \u201cSystem Preferences\u201d category.
"preferences-system-network", // The icon for the \u201cNetwork\u201d sub-category of the \u201cSystem Preferences\u201d category.
"system-help", // The icon for the \u201cHelp\u201d system category.
];
30 changes: 30 additions & 0 deletions generator/src/standard/devices.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pub static CONTEXT: &'static str = "Devices";
pub static ICONS: &'static [&'static str] = &[
"audio-card", // The icon used for the audio rendering device.
"audio-input-microphone", // The icon used for the microphone audio input device.
"battery", // The icon used for the system battery device.
"camera-photo", // The icon used for a digital still camera devices.
"camera-video", // The fallback icon for video cameras.
"camera-web", // The fallback icon for web cameras.
"computer", // The icon used for the computing device as a whole.
"drive-harddisk", // The icon used for hard disk drives.
"drive-optical", // The icon used for optical media drives such as CD and DVD.
"drive-removable-media", // The icon used for removable media drives.
"input-gaming", // The icon used for the gaming input device.
"input-keyboard", // The icon used for the keyboard input device.
"input-mouse", // The icon used for the mousing input device.
"input-tablet", // The icon used for graphics tablet input devices.
"media-flash", // The fallback icon used for flash media, such as memory stick and SD.
"media-floppy", // The icon used for physical floppy disk media.
"media-optical", // The icon used for physical optical media such as CD and DVD.
"media-tape", // The icon used for generic physical tape media.
"modem", // The icon used for modem devices.
"multimedia-player", // The icon used for generic multimedia playing devices.
"network-wired", // The icon used for wired network connections.
"network-wireless", // The icon used for wireless network connections.
"pda ", // his is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon.
"phone ", // his is the default fallback for phone devices. Primary use of this icon group is for phone devices which support connectivity to the PC. These may be VoIP, cellular, or possibly landline phones. The metaphor for this fallback should be a generic mobile phone device.
"printer", // The icon used for a printer device.
"scanner", // The icon used for a scanner device.
"video-display", // The icon used for the monitor that video gets displayed to.
];
16 changes: 16 additions & 0 deletions generator/src/standard/emblems.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pub static CONTEXT: &'static str = "Emblems";
pub static ICONS: &'static [&'static str] = &[
"emblem-default", // The icon used as an emblem to specify the default selection of a printer for example.
"emblem-documents", // The icon used as an emblem for the directory where a user's documents are stored.
"emblem-downloads", // The icon used as an emblem for the directory where a user's downloads from the internet are stored.
"emblem-favorite", // The icon used as an emblem for files and directories that the user marks as favorites.
"emblem-important", // The icon used as an emblem for files and directories that are marked as important by the user.
"emblem-mail", // The icon used as an emblem to specify the directory where the user's electronic mail is stored.
"emblem-photos", // The icon used as an emblem to specify the directory where the user stores photographs.
"emblem-readonly", // The icon used as an emblem for files and directories which can not be written to by the user.
"emblem-shared", // The icon used as an emblem for files and directories that are shared to other users.
"emblem-symbolic-link", // The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem.
"emblem-synchronized", // The icon used as an emblem for files or directories that are configured to be synchronized to another device.
"emblem-system", // The icon used as an emblem for directories that contain system libraries, settings, and data.
"emblem-unreadable", // The icon used as an emblem for files and directories that are inaccessible.
];
Loading