-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squash move docs to main branch and add update instructions
Move docs to main branch and add update instructions
- Loading branch information
Showing
182 changed files
with
10,275 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "documentation/source/themes/hugo-book"] | ||
path = documentation/source/themes/hugo-book | ||
url = https://github.com/alex-shpak/hugo-book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See [here](https://raujonas.github.io/executor/docs/documentation/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/ | ||
|
||
baseURL = 'https://raujonas.github.io/executor/' | ||
title = 'Executor Documentation' | ||
theme = 'hugo-book' | ||
|
||
# hugo server --minify --theme hugo-book | ||
# hugo --minify --theme hugo-book | ||
publishDir = "../target" | ||
# git submodule update --remote --merge | ||
# git commit -m '' | ||
# git push | ||
|
||
# Book configuration | ||
disablePathToLower = true | ||
|
||
# Needed for mermaid/katex shortcodes | ||
[markup] | ||
[markup.goldmark.renderer] | ||
unsafe = true | ||
|
||
[markup.tableOfContents] | ||
startLevel = 1 | ||
|
||
# Multi-lingual mode config | ||
# There are different options to translate files | ||
# See https://gohugo.io/content-management/multilingual/#translation-by-filename | ||
# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory | ||
[languages] | ||
[languages.en] | ||
languageName = 'English' | ||
contentDir = 'content' | ||
weight = 1 | ||
|
||
[menu] | ||
# [[menu.before]] | ||
[[menu.after]] | ||
name = "Github" | ||
url = "https://github.com/raujonas/executor" | ||
weight = 10 | ||
|
||
[params] | ||
# (Optional, default light) Sets color theme: light, dark or auto. | ||
# Theme 'auto' switches between dark and light modes based on browser/os preferences | ||
BookTheme = 'light' | ||
|
||
# (Optional, default true) Controls table of contents visibility on right side of pages. | ||
# Start and end levels can be controlled with markup.tableOfContents setting. | ||
# You can also specify this parameter per page in front matter. | ||
BookToC = false | ||
|
||
# (Optional, default none) Set the path to a logo for the book. If the logo is | ||
# /static/logo.png then the path would be logo.png | ||
BookLogo = 'icons/icon.png' | ||
|
||
# (Optional, default docs) Specify root page to render child pages as menu. | ||
# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/ | ||
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/' | ||
BookSection = 'docs' | ||
|
||
# Set source repository location. | ||
# Used for 'Last Modified' and 'Edit this page' links. | ||
#BookRepo = 'https://github.com/raujonas/executor' | ||
|
||
# (Optional, default 'commit') Specifies commit portion of the link to the page's last modified | ||
# commit hash for 'doc' page type. | ||
# Requires 'BookRepo' param. | ||
# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash> | ||
# Github uses 'commit', Bitbucket uses 'commits' | ||
# BookCommitPath = 'commit' | ||
|
||
# Enable "Edit this page" links for 'doc' page type. | ||
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param. | ||
# Edit path must point to root directory of repo. | ||
# BookEditPath = 'edit/main/exampleSite' | ||
|
||
# Configure the date format used on the pages | ||
# - In git information | ||
# - In blog posts | ||
BookDateFormat = 'January 2, 2006' | ||
|
||
# (Optional, default true) Enables search function with flexsearch, | ||
# Index is built on fly, therefore it might slowdown your website. | ||
# Configuration for indexing can be adjusted in i18n folder per language. | ||
BookSearch = true | ||
|
||
# (Optional, default true) Enables comments template on pages | ||
# By default partals/docs/comments.html includes Disqus template | ||
# See https://gohugo.io/content-management/comments/#configure-disqus | ||
# Can be overwritten by same param in page frontmatter | ||
# BookComments = true | ||
|
||
# /!\ This is an experimental feature, might be removed or changed at any time | ||
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages. | ||
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode | ||
# Theme will print warning if page referenced in markdown does not exists. | ||
BookPortableLinks = true | ||
|
||
# /!\ This is an experimental feature, might be removed or changed at any time | ||
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. | ||
BookServiceWorker = true | ||
|
||
# /!\ This is an experimental feature, might be removed or changed at any time | ||
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. | ||
BookTranslatedOnly = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
weight: 1 | ||
title: "Overview" | ||
--- | ||
|
||
# **Executor - Gnome Shell Extension** | ||
![Maintenance](https://img.shields.io/maintenance/yes/2024) | ||
![GitHub release (latest by date)](https://img.shields.io/github/v/release/raujonas/executor) | ||
![GitHub Release Date](https://img.shields.io/github/release-date/raujonas/executor) | ||
![GitHub Repo stars](https://img.shields.io/github/stars/raujonas/executor?style=social) | ||
|
||
Execute multiple shell commands periodically with separate intervals and display the output in gnome top bar. | ||
|
||
[<img src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true" alt="Get it on GNOME Extensions" height="100" width="220">](https://extensions.gnome.org/extension/2932/executor/) | ||
|
||
<img src="docs/combined.png" alt="result" width="967"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
bookCollapseSection: true | ||
weight: 2 | ||
--- |
12 changes: 12 additions & 0 deletions
12
documentation/source/content/docs/configuration/basic/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
weight: 1 | ||
title: "Basic" | ||
--- | ||
|
||
# **Configuration** | ||
|
||
## **Basic** | ||
|
||
The commands and the interval for each command can be set for each location (left, center, right) separately in the settings view. It is also possible to deactivate single commands without deleting them. | ||
|
||
<img src="../../../docs/settings.png" alt="settings" width="500"> |
18 changes: 18 additions & 0 deletions
18
documentation/source/content/docs/configuration/combine-css-and-markup/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
weight: 4 | ||
title: "Combine css and markup" | ||
--- | ||
|
||
# **Configuration** | ||
|
||
## **Combine css and markup** | ||
|
||
Combination of css and markup is also possible. In this case the setting for markup **`<executor.markup.true>`** must be located after all css settings. Here is an example: | ||
|
||
``` | ||
echo " <span font_family='monospace' foreground='blue'>Blue text</span> is <i>cool</i>! <span foreground='red'>Red text</span><executor.css.green><executor.markup.true> is cool too" | ||
``` | ||
|
||
This produces the following output: | ||
|
||
<img src="../../../docs/css-and-markup.png" alt="settings"> |
12 changes: 12 additions & 0 deletions
12
documentation/source/content/docs/configuration/complex-scripts/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
weight: 5 | ||
title: "More complex scripts" | ||
--- | ||
|
||
# **Configuration** | ||
|
||
## **More complex scripts** | ||
|
||
If you want to execute more complex scripts it might be helpful to store them outside of the extension and create the final output there. | ||
|
||
[Here](https://github.com/raujonas/executor/issues/31#issue-902528380) is a very good example of how you can achieve this. With this solution it is also possible to create a rotating output of multiple different commands. |
63 changes: 63 additions & 0 deletions
63
documentation/source/content/docs/configuration/custom-css/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
weight: 2 | ||
title: "Use of custom css" | ||
--- | ||
|
||
# **Configuration** | ||
|
||
## **Use of custom css** | ||
|
||
It is possible to use custom css to style the output of your commands dynamically. There are two ways to do this: | ||
- **Preferred option**: Create the file `~/.config/[email protected]/custom.css` and add your custom css there. This file will be imported into the extension. **This way your custom css will NOT be overwritten by extension updates**. You can use the following commands to create the file: | ||
|
||
```console | ||
mkdir /home/$USER/.config/[email protected] | ||
|
||
touch /home/$USER/.config/[email protected]/custom.css | ||
``` | ||
- **Non durable option**: You can add your custom css in `~/.local/share/gnome-shell/extensions/[email protected]/custom.css`. **Your custom css will be overwritten by extension updates in this case**. Make sure to save it somewhere before updating. | ||
|
||
Example `custom.css` file: | ||
|
||
```css | ||
.red { | ||
color: red; | ||
} | ||
|
||
.yellow { | ||
color: yellow | ||
} | ||
|
||
.green { | ||
color: rgb(107, 179, 0); | ||
} | ||
|
||
.huge-font { | ||
font: 20px "Comic Sans"; | ||
} | ||
|
||
.italic { | ||
font: 17px "Arial"; | ||
font-style: italic; | ||
} | ||
``` | ||
|
||
**Note**: After making changes in your css you have to restart your shell (`Alt + F2` and then enter `r`). | ||
|
||
**Usage**: To use the css classes dynamically in your commands, you can add it with the following syntax to your output: **`<executor.css.red>`**. This will add the specified css class to your output, in this case `red`. | ||
|
||
**Example**: The following command queries the current timestamp. If the output is a round number it should have the color red, if not then green. | ||
|
||
```console | ||
date +%s | awk '{if ($1 % 2 == 0) {print $1"<executor.css.red>"} else { print $1"<executor.css.green>"} }' | ||
``` | ||
|
||
The output is either one of the following depending on the timestamp: | ||
|
||
<img src="../../../docs/custom-css-red.png" alt="settings"> | ||
|
||
<img src="../../../docs/custom-css-green.png" alt="settings"> | ||
|
||
You can also combine multiple css classes: | ||
|
||
<img src="../../../docs/custom-css-multiple.png" alt="settings" width="700"> |
21 changes: 21 additions & 0 deletions
21
documentation/source/content/docs/configuration/custom-markup/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
weight: 3 | ||
title: "Use of custom markup" | ||
--- | ||
|
||
# **Configuration** | ||
|
||
## **Use of markup** | ||
|
||
**Usage**: To use markup there's another setting **`<executor.markup.true>`** which has to be included somewhere in the output to activate markup. | ||
|
||
**Example**: The following command is an example for using markup with different colors and some italic text, all inside one command. You can find other attributes like `font_family` or `size` [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html). | ||
|
||
``` | ||
echo "<executor.markup.true> <span foreground='blue'>Blue text</span> is <i>cool</i>! <span foreground='red'>Red text</span> is cool too" | ||
``` | ||
This produces the following output: | ||
|
||
<img src="../../../docs/markup.png" alt="settings"> | ||
|
||
**Note**: Due to a [bug](https://gitlab.gnome.org/GNOME/mutter/-/issues/1324) in ClutterText there is an empty space in front of the first `<span>` tag required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
weight: 5 | ||
title: "Debugging" | ||
--- | ||
|
||
# **Debugging** | ||
|
||
If you have no output or other issues you can have a look into the log: | ||
```console | ||
journalctl /usr/bin/gnome-shell -f | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
weight: 6 | ||
title: "Development notes" | ||
--- | ||
|
||
# **Development** | ||
|
||
Please feel free to contribute and suggest ideas or report bugs! | ||
|
||
<br/><br/> | ||
|
||
### **Compile settings schema** | ||
`glib-compile-schemas ./schemas` | ||
### **Update example.pot** | ||
`xgettext --from-code=UTF-8 --output=po/example.pot *.js` | ||
### **Update example.pot** | ||
It's possible to use a symlink between your project folder (the folder where you have cloned the code to) and the extension folder in `~/.local/share/gnome-shell/extensions/[email protected]`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
weight: 8 | ||
title: "Documentation" | ||
--- | ||
# **Updating the documentation** | ||
|
||
The documentation is hosted on `https://raujonas.github.io/executor/` via GitHub Pages. | ||
|
||
The framework used is HUGO (https://gohugo.io/). | ||
|
||
## Installation of HUGO | ||
https://gohugo.io/installation/linux/ | ||
|
||
## Summary of basic commands | ||
Please refer to https://gohugo.io/getting-started/quick-start/ as well. | ||
The commands have to be executed in the source folder of the documentation, e.g. `/executor/docs/documentation/`. | ||
|
||
### Add new content page | ||
`hugo new content docs/documentation/documentation.md` | ||
|
||
The existing pages can be found in `documentation/source/content/docs`. | ||
|
||
### Run local server with live updates | ||
`hugo --server` | ||
|
||
### Compile the updated documentation | ||
`hugo`, then push your changes to GitHub and create a new PR to the main branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
weight: 3 | ||
title: "Export and import settings" | ||
--- | ||
|
||
# **Export and import settings** | ||
|
||
If you want to export and import all settings at once you can use dconf. | ||
|
||
Export: `dconf dump /org/gnome/shell/extensions/executor/ > executor-settings.dconf` | ||
|
||
Import: `dconf load /org/gnome/shell/extensions/executor/ < executor-settings.dconf` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
weight: 1 | ||
title: "Installation" | ||
--- | ||
|
||
# **Installation** | ||
|
||
## **One click installation** | ||
|
||
[<img src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true" alt="Get it on GNOME Extensions" height="100" width="220">](https://extensions.gnome.org/extension/2932/executor/) | ||
|
||
|
||
## **Manual installation** | ||
|
||
Download the file `[email protected]` <a href="https://github.com/raujonas/executor/releases/latest">from the latest release</a> and extract the content to `~/.local/share/gnome-shell/extensions/[email protected]`. | ||
|
||
|
||
You have to restart gnome shell afterwards (`Alt + F2` and then enter `r`). |
Oops, something went wrong.