20 |
21 | Almost done! The last step is to theme it, below is the config which is used for the screenshots above (add it to the **theme.lua**):
22 |
23 | theme.taglist_fg_focus = "#3992af"
24 | theme.taglist_fg_occupied = "#164b5d"
25 | theme.taglist_fg_urgent = "#ED7572"
26 | theme.taglist_fg_empty = "#828282"
27 | theme.taglist_spacing = 2
28 | theme.taglist_font = "awesomewm-font 13"
29 |
--------------------------------------------------------------------------------
/recipes/mic.mdwn:
--------------------------------------------------------------------------------
1 | # Microphone state widget/watcher
2 |
3 | This widget can be used to display the current microphone status.
4 |
5 | ## Requirements
6 |
7 | - `amixer` - this command is used to get and toggle microphone state
8 |
9 | ## Usage
10 |
11 | - Download [mic.lua](https://awesomewm.org/recipes/mic.lua) file and put it into awesome's
12 | folder (like `~/.config/awesome/widgets/mic.lua`)
13 |
14 | - Add widget to `theme.lua`:
15 |
16 | ```lua
17 | local widgets = {
18 | mic = require("widgets/mic"),
19 | }
20 | theme.mic = widgets.mic({
21 | timeout = 10,
22 | settings = function(self)
23 | if self.state == "muted" then
24 | self.widget:set_image(theme.widget_micMuted)
25 | else
26 | self.widget:set_image(theme.widget_micUnmuted)
27 | end
28 | end
29 | })
30 | local widget_mic = wibox.widget { theme.mic.widget, layout = wibox.layout.align.horizontal }
31 | ```
32 |
33 | - Create a shortcut to toggle microphone state (add to `rc.lua`):
34 |
35 | ```lua
36 | -- Toggle microphone state
37 | awful.key({ modkey, "Shift" }, "m",
38 | function ()
39 | beautiful.mic:toggle()
40 | end,
41 | {description = "Toggle microphone (amixer)", group = "Hotkeys"}
42 | ),
43 | ```
44 |
45 | - You can also add a command to mute the microphone state on boot. Add this to your `rc.lua`:
46 |
47 | ```lua
48 | -- Mute microphone on boot
49 | beautiful.mic:mute()
50 | ```
51 |
--------------------------------------------------------------------------------
/script/dark-light-mode.js:
--------------------------------------------------------------------------------
1 | var siteVars = new Array();
2 | siteVars['theme_active'] = 'light';
3 | siteVars['theme_forced'] = '';
4 |
5 | // combine prefers color theme or custom selected user dark/light theme
6 | let themeForcedStored = localStorage.getItem('theme_forced');
7 | if (themeForcedStored == 'light' || themeForcedStored == 'dark') {
8 | siteVars['theme_forced'] = themeForcedStored;
9 | }
10 |
11 | siteVars['theme_active'] = 'light';
12 | if ((window.matchMedia &&
13 | window.matchMedia('(prefers-color-scheme: dark)').matches) ||
14 | siteVars['theme_forced'] == 'dark') {
15 | siteVars['theme_active'] = 'dark';
16 | }
17 |
18 | if (siteVars['theme_forced'] != '') {
19 | siteVars['theme_active'] = siteVars['theme_forced'];
20 | }
21 |
22 | if (siteVars['theme_forced'] != '') {
23 | if (siteVars['theme_forced'] == 'dark') {
24 | document.getElementById('css-darkmode').setAttribute('media', 'all');
25 | document.getElementById('css-darkmode').disabled = false;
26 |
27 | document.getElementById('css-lightmode').setAttribute('media', 'not all');
28 | document.getElementById('css-lightmode').disabled = true;
29 |
30 | } else {
31 | document.getElementById('css-darkmode').setAttribute('media', 'not all');
32 | document.getElementById('css-darkmode').disabled = true;
33 |
34 | document.getElementById('css-lightmode').setAttribute('media', 'all');
35 | document.getElementById('css-lightmode').disabled = false;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Make git not use user's config.
2 | OLD_HOME:=$(HOME)
3 | HOME:=/dev/null
4 |
5 | all: output ldoc changelogs manpages
6 |
7 | output:
8 | ikiwiki $(CURDIR) html -v --wikiname about --plugin=goodstuff \
9 | --templatedir=templates \
10 | --exclude=html --exclude=Makefile --exclude=README.md \
11 | --exclude=README.for_webpage.md
12 | echo awesomewm.org > html/CNAME
13 | cp README.for_webpage.md html/README.md
14 |
15 | ldoc:
16 | make -C src distclean
17 | HOME=$(OLD_HOME) make -C src cmake-build ldoc
18 |
19 | clean:
20 | rm -rf .ikiwiki html
21 |
22 | changelogs:
23 | test -d html/changelogs/short || mkdir -p html/changelogs/short
24 | git --git-dir=src/.git tag | grep -v rc | sort -n | \
25 | (while read v; do \
26 | test -z "$$pv" && pv="`git --git-dir=src/.git rev-list HEAD | tail -n1`" ; \
27 | git --git-dir=src/.git shortlog --no-merges $$pv..$$v > html/changelogs/short/$$v.txt ; \
28 | git --git-dir=src/.git log --no-merges $$pv..$$v > html/changelogs/$$v.txt ; \
29 | pv=$$v; done)
30 |
31 | manpages:
32 | mkdir -p html/doc/manpages
33 | cd src/manpages; for manpage in *.?.txt; \
34 | do asciidoc -a icons -b xhtml11 -o ../../html/doc/manpages/`basename $${manpage} .txt`.html $$manpage || exit 1; \
35 | done
36 |
37 | build_for_gh_actions: all
38 | build_for_gh_actions: BUILD_WEB?=/tmp/awesome-build-web
39 | build_for_gh_actions: ASCIIDOC_ICONS_DIR?=/usr/share/asciidoc/icons
40 | build_for_gh_actions:
41 | test -d "$(ASCIIDOC_ICONS_DIR)"
42 | rsync -PaOvz --delete --exclude=.git --chmod=u=rwX,g=rwX,o=rX,Dg+s --exclude src html/ \
43 | "$(BUILD_WEB)"
44 | rsync -PaOvz --delete --chmod=u=rwX,g=rwX,o=rX,Dg+s src/build/doc/ \
45 | "$(BUILD_WEB)/doc/api"
46 | rsync -PaOvz --delete --chmod=u=rwX,g=rwX,o=rX,Dg+s $(ASCIIDOC_ICONS_DIR) \
47 | "$(BUILD_WEB)/doc/manpages/icons"
48 |
49 | .PHONY: changelogs manpages
50 |
--------------------------------------------------------------------------------
/css/mode-switch.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Dark/Light Theme Switcher build on Checkbox and UL/LI structure
3 | */
4 |
5 | .mode-switch {
6 | display: flex;
7 | position: absolute;
8 | top: 0.5rem;
9 | right: 0.5rem;
10 | }
11 |
12 | .mode-switch>li {
13 | list-style: none;
14 | margin-right: 6px;
15 | }
16 |
17 | .mode-switch-icon {
18 | padding: 0px 0px 0px 32px;
19 | list-style: none;
20 | margin: 0;
21 | }
22 |
23 | .mode-switch-dark {
24 | background: url(../images/icons/moon.svg) no-repeat left top;
25 | background-size: 32px 32px;
26 | filter: invert(100%);
27 | }
28 |
29 | .mode-switch-light {
30 | background: url(../images/icons/sun.svg) no-repeat left top;
31 | background-size: 32px 32px;
32 | }
33 |
34 | .switch {
35 | position: relative;
36 | display: inline-block;
37 | width: 60px;
38 | height: 34px;
39 | }
40 |
41 | /* Hide default HTML checkbox */
42 | .switch input {
43 | opacity: 0;
44 | width: 0;
45 | height: 0;
46 | }
47 |
48 | /* The slider */
49 | .slider {
50 | position: absolute;
51 | cursor: pointer;
52 | top: 0;
53 | left: 0;
54 | right: 0;
55 | bottom: 0;
56 | background-color: #ccc;
57 | -webkit-transition: 0.4s;
58 | transition: 0.4s;
59 | }
60 |
61 | .slider:before {
62 | position: absolute;
63 | content: "";
64 | height: 26px;
65 | width: 26px;
66 | left: 4px;
67 | bottom: 4px;
68 | background-color: #fafafa;
69 | -webkit-transition: 0.4s;
70 | transition: 0.4s;
71 | }
72 |
73 | input:checked+.slider {
74 | background-color: #59929d;
75 | }
76 |
77 | input:focus+.slider {
78 | box-shadow: 0 0 1px #59929d;
79 | }
80 |
81 | input:checked+.slider:before {
82 | -webkit-transform: translateX(26px);
83 | -ms-transform: translateX(26px);
84 | transform: translateX(26px);
85 | }
86 |
87 | /* Rounded sliders */
88 | .slider.round {
89 | border-radius: 34px;
90 | }
91 |
92 | .slider.round:before {
93 | border-radius: 50%;
94 | }
95 |
--------------------------------------------------------------------------------
/community.mdwn:
--------------------------------------------------------------------------------
1 | # Community
2 |
3 | **awesome** has an active and growing community.
4 |
5 | # IRC
6 | You can join us in the `#awesome` channel on the [`OFTC`](http://www.oftc.net) IRC network.
7 |
8 | [IRC Webchat](https://webchat.oftc.net/?channels=awesome)
9 |
10 | # Stack Overflow
11 |
12 | You can ask questions on
13 | [Stack Overflow](http://stackoverflow.com/questions/tagged/awesome-wm).
14 |
15 | # Discord
16 |
17 | You can join the (non official) awesome community on the discord server
18 | [invite](https://discord.gg/BPat4F87dg).
19 |
20 | # Reddit
21 |
22 | We also have an [awesomewm subreddit](https://www.reddit.com/r/awesomewm/) where
23 | you can share your work and ask questions.
24 |
25 | # GitHub
26 |
27 | Awesome is [developed on GitHub](https://github.com/awesomeWM/awesome/).
28 | You can follow (watch) us there, contribute to our decision making and help
29 | triage issues. Also pull requests and issues are welcome there.
30 |
31 | This web page also is [on GitHub](https://github.com/awesomeWM/awesome-www) and
32 | can be changed via pull requests. To locally test your changes, the web page can
33 | be built with `make`. For this, you need to have
34 | [ikiwiki](https://ikiwiki.info/) installed.
35 |
36 | You can also browse GitHub repositories tagged with
37 | [awesomewm](https://github.com/search?q=topic%3Aawesomewm). To find inspiration
38 | or snippets of code. Feel welcome to tag your own config so other users can
39 | discover it.
40 |
41 | # Old mailing list (now closed)
42 |
43 | * [The Mail Archive](http://www.mail-archive.com/awesome@naquadah.org/)
44 | * [Gmane archive](http://dir.gmane.org/gmane.comp.window-managers.awesome)
45 | * [Gmane developers list archive](http://dir.gmane.org/gmane.comp.window-managers.awesome.devel)
46 | * [The Mail Archive developers list](http://www.mail-archive.com/awesome-devel@naquadah.org/)
47 |
48 | # Old wiki
49 |
50 | The old wiki has been shut down, but can be still viewed at
51 | [archive.org](https://web.archive.org/web/20160701200046/https://awesome.naquadah.org/wiki/Main_Page).
52 |
53 | # Authors
54 | [See our GitHub page](https://github.com/awesomeWM/awesome/graphs/contributors)
55 |
--------------------------------------------------------------------------------
/script/dark-light-mode-switch.js:
--------------------------------------------------------------------------------
1 | const checkbox = document.querySelector("input[type='checkbox']");
2 | const mode_switch_icon = document.querySelector(".mode-switch-icon");
3 |
4 | // configure and set correct state of theme checkbox
5 | checkbox.checked = siteVars['theme_active'] == 'dark'
6 | checkbox.addEventListener("click", () => {
7 | theme_switch();
8 | set_theme_checkbox();
9 | });
10 |
11 | set_theme_checkbox();
12 |
13 | // apply specific styling after page reload
14 | document.getElementById('navbar').classList.add("topBotomBordersOut");
15 |
16 | // set correct state of dark/light theme mode
17 | function set_theme_checkbox() {
18 | if (checkbox.checked) {
19 | mode_switch_icon.classList.add("mode-switch-dark");
20 | mode_switch_icon.classList.remove("mode-switch-light");
21 | } else {
22 | mode_switch_icon.classList.add("mode-switch-light");
23 | mode_switch_icon.classList.remove("mode-switch-dark");
24 | }
25 | }
26 |
27 | // switch dark/light mode and store the state to local storage
28 | function theme_switch() {
29 | if (siteVars['theme_active'] == 'light') {
30 | siteVars['theme_active'] = siteVars['theme_forced'] = 'dark';
31 |
32 | document.getElementById('css-darkmode').setAttribute('media', 'all');
33 | document.getElementById('css-darkmode').disabled = false;
34 |
35 | document.getElementById('css-lightmode').setAttribute('media', 'not all');
36 | document.getElementById('css-lightmode').disabled = true;
37 | } else {
38 | siteVars['theme_active'] = siteVars['theme_forced'] = 'light';
39 |
40 | document.getElementById('css-darkmode').setAttribute('media', 'not all');
41 | document.getElementById('css-darkmode').disabled = true;
42 |
43 | document.getElementById('css-lightmode').setAttribute('media', 'all');
44 | document.getElementById('css-lightmode').disabled = false;
45 | }
46 | localStorage.setItem('theme_forced', siteVars['theme_active']);
47 |
48 | document.body.classList.add('expand');
49 | document.body.offsetHeight;
50 | document.body.classList.remove('expand');
51 | }
52 |
--------------------------------------------------------------------------------
/doing_a_release.mdwn:
--------------------------------------------------------------------------------
1 | ## How to do a release
2 |
3 | ### Local preparations
4 |
5 | The following steps are done in a checkout of the *awesome* git repository.
6 |
7 | * The codename:
8 | * Pick some codename that is not already listed in [[Releases]].
9 | * jd always picked a song title, you should do the same.
10 | * Edit `awesomeConfig.cmake` and change the argument in `set(CODENAME "Foo")`.
11 | * `git commit -sm 'change codename' awesomeConfig.cmake`
12 | * Git sign with `git tag -s vX.Y -m 'awesome vX.Y`'
13 | * Run `make dist` to create tarballs. You need to have GPG set up correctly, because the tarballs will be signed.
14 | * Copy the tarballs and the signatures into the awesome-releases repository and
15 | commit the result.
16 |
17 | The following steps are done in a checkout of the *awesome-www* git repository.
18 |
19 | * Create a release-branch via `git checkout -b release`.
20 | * Add the release version and date to [[Releases]].
21 | * Update `download.mdwn` to add version information and links.
22 | * Go into the 'src' submodule, and update it to vX.Y with `git pull
23 | path/to/your/awesome/repo tag vX.Y && git checkout vX.Y`.
24 | * Commit `download.mdwn`, `releases.mdwn`, and `src` with `git commit -sm 'vX.Y'
25 | download.mdwn releases.mdwn src`.
26 |
27 | ### The final steps
28 |
29 | * Push the new commits
30 | * In the awesome-releases repository
31 | * In the awesome-www repository (push just the release branch!)
32 | * In the awesome repository (make sure the tag is also pushed!)
33 | * Create a pull request to the awesome-www repository for the release branch.
34 | This makes sure that the Github-Actions build will be successful when merging into the
35 | master branch.
36 | * Create the release on GitHub:
37 | * Go to the GitHub release page .
38 | * Enter `vX.Y` into the "Tag version"-field. GitHub should recognize this as
39 | an existing tag.
40 | * Enter `Awesome vX.Y` into the "Release title" field.
41 | * Come up with something good for the description field. A nice idea is to
42 | mention some highlights and to link to a porting document.
43 | * Attach the tarballs and signatures created by `make dist`.
44 | * Verify the pull request to the awesome-www repository built successful and
45 | merge it into the master branch.
46 | * Change the topic on IRC.
47 | * Check the links to the downloads on the webpage.
48 |
--------------------------------------------------------------------------------
/recipes/countdown.mdwn:
--------------------------------------------------------------------------------
1 | # Countdown widget
2 |
3 | Add the following in your `rc.lua`:
4 |
5 | ```lua
6 | local countdown = {
7 | widget = wibox.widget.textbox(),
8 | checkbox = wibox.widget {
9 | checked = false,
10 | check_color = beautiful.fg_focus, -- customize
11 | border_color = beautiful.fg_normal, -- customize
12 | border_width = 2, -- customize
13 | shape = gears.shape.circle,
14 | widget = wibox.widget.checkbox
15 | }
16 | }
17 |
18 | function countdown.set()
19 | awful.prompt.run {
20 | prompt = "Countdown minutes: ", -- floats accepted
21 | textbox = awful.screen.focused().mypromptbox.widget,
22 | exe_callback = function(timeout)
23 | countdown.seconds = tonumber(timeout)
24 | if not countdown.seconds then return end
25 | countdown.checkbox.checked = false
26 | countdown.minute_t = countdown.seconds > 1 and "minutes" or "minute"
27 | countdown.seconds = countdown.seconds * 60
28 | countdown.timer = gears.timer({ timeout = 1 })
29 | countdown.timer:connect_signal("timeout", function()
30 | if countdown.seconds > 0 then
31 | local minutes = math.floor(countdown.seconds / 60)
32 | local seconds = math.fmod(countdown.seconds, 60)
33 | countdown.widget:set_markup(string.format("%d:%02d", minutes, seconds))
34 | countdown.seconds = countdown.seconds - 1
35 | else
36 | naughty.notify({
37 | title = "Countdown",
38 | text = string.format("%s %s timeout", timeout, countdown.minute_t)
39 | })
40 | countdown.widget:set_markup("")
41 | countdown.checkbox.checked = true
42 | countdown.timer:stop()
43 | end
44 | end)
45 | countdown.timer:start()
46 | end
47 | }
48 | end
49 |
50 | countdown.checkbox:buttons(awful.util.table.join(
51 | awful.button({}, 1, function() countdown.set() end), -- left click
52 | awful.button({}, 3, function() -- right click
53 | if countdown.timer and countdown.timer.started then
54 | countdown.widget:set_markup("")
55 | countdown.checkbox.checked = false
56 | countdown.timer:stop()
57 | naughty.notify({ title = "Countdown", text = "Timer stopped" })
58 | end
59 | end)
60 | ))
61 | ```
62 |
63 | then, add `countdown.widget` and `countdown.checkbox` to your favourite `wibox`.
64 |
65 | Left clicking on the `checkbox` will prompt for a countdown, right clicking will stop the timer.
66 |
67 | The `widget` will display the countdown.
68 |
--------------------------------------------------------------------------------
/images/arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
45 |
--------------------------------------------------------------------------------
/recipes/wirelessStatus.mdwn:
--------------------------------------------------------------------------------
1 | # Wireless status widget/watcher
2 |
3 | Get wireless Quality link (converted to percentages) and wireless status.
4 |
5 | Data is taken from `/proc/net/wireless`.
6 |
7 | According to [this](https://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html)
8 | website `/proc/net/wireless` has the following information:
9 |
10 | - Status: Its current state. This is a device dependent information.
11 |
12 | - Quality - link: general quality of the reception.
13 |
14 | - Quality - level: signal strength at the receiver.
15 |
16 | - Quality - noise: silence level (no packet) at the receiver.
17 |
18 | - Discarded - nwid: number of discarded packets due to invalid network id.
19 |
20 | - Discarded - crypt: number of packet unable to decrypt.
21 |
22 | - Discarded - misc: unused (for now).
23 |
24 | This widget uses `Quality - link` and converts it to percentages (`perc=Quality_link*10/7`).
25 | The above equation is taken from [this](https://superuser.com/a/1360447) forum answer.
26 |
27 | It also stores `Status` information (note that this is presumably device dependent).
28 |
29 | ## Requirements
30 |
31 | - `iw`
32 |
33 | ## Usage
34 |
35 | - Download [wirelessStatus.lua](https://awesomewm.org/recipes/wirelessStatus.lua) file and put it
36 | into awesome's folder (like `~/.config/awesome/widgets/wirelessStatus.lua`)
37 |
38 | - Add widget to `theme.lua`:
39 |
40 | ```lua
41 | local widgets = {
42 | wirelessStatus = require("widgets/wirelessStatus"),
43 | }
44 | -- Wireless status widget (`status` is presumably device dependent)
45 | theme.wirelessStatus = widgets.wirelessStatus({
46 | notification_preset = { font = "Mononoki Nerd Font 10", fg = theme.fg_normal },
47 | timeout = 10,
48 | settings = function(self)
49 | if self.status == "1" or self.status == "" then
50 | self.widget:set_image(theme.wifidisc)
51 | else
52 | if self.perc <= 5 then
53 | self.widget:set_image(theme.wifinone)
54 | elseif self.perc <= 25 then
55 | self.widget:set_image(theme.wifilow)
56 | elseif self.perc <= 50 then
57 | self.widget:set_image(theme.wifimed)
58 | elseif self.perc <= 75 then
59 | self.widget:set_image(theme.wifihigh)
60 | else
61 | self.widget:set_image(theme.wififull)
62 | end
63 | end
64 | end,
65 | })
66 | local widget_wirelessStatus = wibox.widget { nil, theme.wirelessStatus.widget, layout = wibox.layout.align.horizontal }
67 | ```
68 |
69 | - Set which application to run on widget press (add to `rc.lua`):
70 |
71 | ```lua
72 | -- wirelessStatus widget pressed function - open terminal and start `nmtui`
73 | beautiful.wirelessStatus.pressed = function(self, button)
74 | if button == 1 then -- left mouse click
75 | awful.spawn(terminal.." -e nmtui")
76 | end
77 | end
78 | ```
79 |
--------------------------------------------------------------------------------
/recipes.mdwn:
--------------------------------------------------------------------------------
1 | # Recipes
2 |
3 | The recipes section is where you can find useful snippets and tutorials on how
4 | to improve your Awesome setup.
5 |
6 | * [How to contribute to Recipes](https://github.com/awesomeWM/awesome-www#contributing-to-recipes-section)
7 |
8 | ## Setups
9 |
10 | * [My First Awesome Setup](https://awesomewm.org/apidoc/documentation/07-my-first-awesome.md.html#)
11 | * [A step by step Guide by Epsi](https://epsi-rns.github.io/desktop/2019/06/15/awesome-overview.html) (for Awesome 4.3)
12 |
13 | ## Widgets
14 |
15 | * [Lain](https://github.com/copycat-killer/lain)
16 | * [Vicious](https://github.com/vicious-widgets/vicious)
17 | * [[Countdown|recipes/countdown]]
18 | * [[MPD current song|recipes/mpc]]
19 | * [[Awesome "Watch" widget usage examples|recipes/watch]]
20 | * [PulseAudio](https://github.com/stefano-m/awesome-pulseaudio_widget)
21 | * [Connman (network manager)](https://github.com/stefano-m/awesome-connman_widget)
22 | * [Battery Indicator (UPower)](https://github.com/stefano-m/awesome-power_widget)
23 | * [[Google Play Music Desktop Player|recipes/gpmdp]]
24 | * [Set of simple widgets](https://github.com/streetturtle/awesome-wm-widgets) - widgets for battery, cpu, brightness, volume, email, etc.
25 | * [[Wireless status|recipes/wirelessStatus]]
26 | * [[Microphone state|recipes/mic]]
27 | * [Noobie](https://github.com/streetturtle/noobie) - create a wibar widget based on the output of a script.
28 |
29 | ## Libraries
30 |
31 | * [Radical menu framework](https://github.com/Elv13/radical)
32 | * [amh - Simultaneously spawn programs on multiple hosts](https://github.com/sim590/amh)
33 |
34 | ## Themes
35 |
36 | * [Aesthetic Night](https://github.com/rxyhn/dotfiles)
37 | - Full Animated Setup
38 | - Modern Bottom Panel, Dashboard Panel, Control Center, Notification Center
39 | - Music Player Widget, Weather Widget, Calendar Widget, Battery Widget, Network Widget
40 | - Word Clock Lockscreen, Minimalist Exitscreen
41 |
42 | * [awesome-copycats](https://github.com/copycat-killer/awesome-copycats)
43 |
44 | ## Window management
45 |
46 | * [Awesome-Revelation - Mac OSX like 'Expose' view of all clients](https://github.com/guotsuan/awesome-revelation)
47 | * [awesome-cyclefocus - sensible Alt-Tab behavior](https://github.com/blueyed/awesome-cyclefocus/)
48 | * [Collision geometric navigation keybindings](https://github.com/Elv13/collision)
49 | * [Tyrannical dynamic tag managment framework](https://github.com/Elv13/tyrannical)
50 | * [Repetitive dynamic keybindings and macros](https://github.com/Elv13/repetitive)
51 | * [layout-machi - a manual layout with interactive editing](https://github.com/xinhaoyuan/layout-machi)
52 | * [nice - macOS-like seamless window decorations](https://github.com/mut-ex/awesome-wm-nice)
53 | * [modalawesome - framework for modal, vi-like keybindings](https://github.com/potamides/modalawesome)
54 |
55 | ## Others
56 |
57 | * [[Swap Monitor Snippet|recipes/xrandr]]
58 | * [Poppin' - Pop over applications](https://github.com/raksooo/poppin)
59 | * [Awesome taglist](../recipes/awesome-taglist)
60 | * [Tag based screen rotation](https://github.com/raksooo/screenrotation)
61 |
--------------------------------------------------------------------------------
/recipes/mpc.mdwn:
--------------------------------------------------------------------------------
1 | # MPD integration
2 |
3 | This page describes an integration with the [Music Player
4 | Daemon](https://www.musicpd.org/). This consists of two parts: A [[pure Lua
5 | library for talking to mpc|mpc.lua]] and an example on how to use this for a
6 | widget with awesome.
7 |
8 | ## The library
9 |
10 | The library provides a function `mpc.new` that creates a new object representing
11 | a connection to MPD. It can be used as follows:
12 |
13 | local connection = require("mpc").new(host, port, password, error_handler, idle_commands...)
14 |
15 | This will establish a TCP connection to the given host and port and, if a
16 | password is given, log in to the MPD server. Whenever an error happens (for
17 | example the connection is lost or the password is rejected), the given error
18 | handler function is called with the error as its argument. The next time the
19 | connection is used, an automatic reconnection is attempted.
20 |
21 | A description of the MPD protocol can be found
22 | [here](https://www.musicpd.org/doc/protocol/). This library only provides
23 | low-level access to the protocol. However, special support for the idle command
24 | is provided via extra arguments to the `new` function. This will be made clear
25 | in an example below.
26 |
27 | For example, to get information about the currently playing song:
28 |
29 | connection:send("currentsong", function(success, data)
30 | if not success then print("command failed") end
31 | print("Information about the current song:")
32 | require("gears.debug").dump(data)
33 | end)
34 |
35 | ## A sample widget
36 |
37 | The following keeps a textbox up-to-date with the MPD status. It automatically
38 | updates when the current MPD state changes.
39 |
40 | local mpc = require("mpc")
41 | local textbox = require("wibox.widget.textbox")
42 | local mpd_widget = textbox()
43 | local state, title, artist, file = "stop", "", "", ""
44 | local function update_widget()
45 | local text = "Current MPD status: "
46 | text = text .. tostring(artist or "") .. " - " .. tostring(title or "")
47 | if state == "pause" then
48 | text = text .. " (paused)"
49 | end
50 | if state == "stop" then
51 | text = text .. " (stopped)"
52 | end
53 | mpd_widget.text = text
54 | end
55 |
56 | local function error_handler(err)
57 | mpd_widget:set_text("Error: " .. tostring(err))
58 | end
59 |
60 | local reconnect_interval = 1 -- negative to disable
61 | local connection
62 | connection = mpc.new(nil, nil, nil, error_handler, reconnect_interval,
63 | "status", function(_, result)
64 | state = result.state
65 | end,
66 | "currentsong", function(_, result)
67 | title, artist, file = result.title, result.artist, result.file
68 | pcall(update_widget)
69 | end)
70 |
71 | If you actually want to be able to control MPD's behaviour, you could for
72 | example do the following to pause/unpause when clicking on the widget:
73 |
74 | mpd_widget:buttons(awful.button({}, 1, function() connection:toggle_play() end))
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Website for awesome WM
2 |
3 | [](https://github.com/awesomeWM/awesome-www/actions/workflows/www.yml)
4 |
5 | This is the main source of the
6 | [website for the awesome window manager](https://awesomewm.org/).
7 |
8 | ## Requirements
9 |
10 | - [ikiwiki](https://ikiwiki.info/)
11 | - [PerlMagick](https://www.imagemagick.org/script/perl-magick.php) (optional,
12 | for images)
13 |
14 | ## Hacking
15 |
16 | You can build the web page locally by running `make`, which will generate the
17 | output in `html/`.
18 |
19 | To view it, open `html/index.html` in your web browser.
20 |
21 | You can simulate running a web server using Python, which will automatically
22 | open `index.html` when following a link to a directory:
23 |
24 | ```
25 | cd html && python3 -m http.server -b localhost 8000 &
26 | ```
27 |
28 | ## Contributing to the Screenshots Section
29 |
30 | To contribute with Screenshots:
31 |
32 | 1. Add your image to the folder images/screenshots with an appropriate name.
33 |
34 | 1. Add a new `` tag in the bottom of *screenshots.mdwn*,
35 |
36 | 1. Inside the new tag, add the screenshots with a `` tag and use the
37 | `` to add caption to the image, explaining what is being used on
38 | the screenshot.
39 |
40 | ## Contributing to Recipes Section
41 |
42 | Fork this repository and create a new branch with a name relevant to the
43 | information you will be adding to the site. If you have doubts in how to Fork
44 | and Branch, take a look in this cheat-sheet
45 | [here](https://www.git-tower.com/blog/git-cheat-sheet/)
46 |
47 | The process of editing files can be done inside GitHub's interface, more
48 | information [here](https://help.github.com/articles/github-flow/)
49 |
50 | ### With external Link
51 |
52 | Create a new link in markdown format `[Link Name](Real Link)` in the appropriate
53 | section in `recipes.mdwn` file.
54 |
55 | ### With internal Link (host in awesome site)
56 |
57 | 1. Create a new page with your tutorial/setup/widget/snippet in Markdown, with a
58 | relevant name, under the `recipes` folder.
59 |
60 | Example `recipes/xrandr-tutorial.mdwn`
61 |
62 | 1. Link your page to the right section in the `recipes.mdwn` page with Markdown
63 | syntax.
64 |
65 | Example `[[XrandR Tutorial|recipes/xrandr-tutorial]]`
66 |
67 | ### Seeing results and pulling your changes
68 |
69 | 1. Build the site as explained in the Hacking section in this same page to check
70 | how your changes will look like.
71 |
72 | 1. If everything is right and looks good, you're ready do make a Pull Request.
73 |
74 | ## Publishing
75 |
76 | The master branch gets built by
77 | [GH Actions](https://github.com/awesomeWM/awesome-www/actions), and is then published
78 | through
79 | [Github's Organization Pages](https://github.com/awesomeWM/awesomeWM.github.io).
80 |
81 | ## Other resources
82 |
83 | The API documentation for the master branch at
84 | [/apidoc](https://awesomewm.org/apidoc/) is viewable at [Github's Project
85 | Pages for the apidoc repo](https://github.com/awesomeWM/apidoc), where it gets
86 | pushed to from successful builds in [the awesome main
87 | repo](https://github.com/awesomeWM/awesome/).
88 |
--------------------------------------------------------------------------------
/index.mdwn:
--------------------------------------------------------------------------------
1 | # What is this awesome window manager?
2 |
3 | **awesome** is a highly configurable, next generation framework window
4 | manager for X. It is very fast, extensible and licensed under the
5 | [GNU GPLv2 license](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
6 |
7 | It is primarily targeted at power users, developers and any people dealing with
8 | every day computing tasks and who want to have fine-grained control on their
9 | graphical environment.
10 |
11 |
22 |
23 |
24 | # Concepts
25 |
26 | A window manager is probably one of the most used software applications in
27 | your day-to-day tasks, along with your web browser, mail reader and text editor.
28 | Power users and programmers have a big range of choice between several tools
29 | for these day-to-day tasks. Some are heavily extensible and configurable.
30 |
31 | **awesome** tries to complete these tools with what we miss: an extensible,
32 | highly configurable window manager.
33 |
34 | To achieve this goal, **awesome** has been designed as a framework window
35 | manager.
36 | It's extremely fast, small, dynamic and heavily extensible using the
37 | [Lua](http://www.lua.org) programming language.
38 |
39 | We provide a documented API to configure and define the behavior of your
40 | window manager.
41 |
42 |