From d6ef298170a1aa7a1ad15e6a02f98f24ec809f6a Mon Sep 17 00:00:00 2001 From: speedie Date: Wed, 1 Feb 2023 20:03:56 +0000 Subject: [PATCH] HELP I CANT USE NANO!!!!!! --- LICENSE | 0 README.md | 0 config.php | 0 icons/close.svg | 0 icons/delete-dark.svg | 0 icons/delete.svg | 0 icons/edit-dark.svg | 0 icons/edit.svg | 0 icons/format-text-bold.svg | 0 icons/format-text-code.svg | 0 icons/format-text-italic.svg | 0 icons/home.svg | 0 icons/internet.png | Bin icons/link-dark.svg | 0 icons/link.svg | 0 icons/list.svg | 0 icons/new.svg | 0 icons/rename-dark.svg | 0 icons/rename.svg | 0 icons/upload.svg | 0 icons/w2-icon.png | Bin images/.gitignore | 0 index.css | 4 +- index.css.2 | 362 ----------------------------------- index.php | 6 - locales/de.php | 0 locales/en.php | 0 locales/ja.php | 0 locales/sample.php | 0 md/Markdown.inc.php | 0 md/Markdown.php | 0 md/MarkdownExtra.inc.php | 0 md/MarkdownExtra.php | 0 md/MarkdownInterface.inc.php | 0 md/MarkdownInterface.php | 0 pages/Client rules.md | 98 ++++++++++ pages/Getting Started.md | 12 +- pages/Home.md | 0 pages/Wayland support.md | 0 pages/Where do I go?.md | 24 +++ pages/_sidebar.md | 2 + tests/travis-ci-apache.conf | 0 42 files changed, 132 insertions(+), 376 deletions(-) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 config.php mode change 100644 => 100755 icons/close.svg mode change 100644 => 100755 icons/delete-dark.svg mode change 100644 => 100755 icons/delete.svg mode change 100644 => 100755 icons/edit-dark.svg mode change 100644 => 100755 icons/edit.svg mode change 100644 => 100755 icons/format-text-bold.svg mode change 100644 => 100755 icons/format-text-code.svg mode change 100644 => 100755 icons/format-text-italic.svg mode change 100644 => 100755 icons/home.svg mode change 100644 => 100755 icons/internet.png mode change 100644 => 100755 icons/link-dark.svg mode change 100644 => 100755 icons/link.svg mode change 100644 => 100755 icons/list.svg mode change 100644 => 100755 icons/new.svg mode change 100644 => 100755 icons/rename-dark.svg mode change 100644 => 100755 icons/rename.svg mode change 100644 => 100755 icons/upload.svg mode change 100644 => 100755 icons/w2-icon.png mode change 100644 => 100755 images/.gitignore mode change 100644 => 100755 index.css delete mode 100644 index.css.2 mode change 100644 => 100755 index.php mode change 100644 => 100755 locales/de.php mode change 100644 => 100755 locales/en.php mode change 100644 => 100755 locales/ja.php mode change 100644 => 100755 locales/sample.php mode change 100644 => 100755 md/Markdown.inc.php mode change 100644 => 100755 md/Markdown.php mode change 100644 => 100755 md/MarkdownExtra.inc.php mode change 100644 => 100755 md/MarkdownExtra.php mode change 100644 => 100755 md/MarkdownInterface.inc.php mode change 100644 => 100755 md/MarkdownInterface.php create mode 100644 pages/Client rules.md mode change 100644 => 100755 pages/Getting Started.md mode change 100644 => 100755 pages/Home.md mode change 100644 => 100755 pages/Wayland support.md create mode 100644 pages/Where do I go?.md mode change 100644 => 100755 pages/_sidebar.md mode change 100644 => 100755 tests/travis-ci-apache.conf diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/config.php b/config.php old mode 100644 new mode 100755 diff --git a/icons/close.svg b/icons/close.svg old mode 100644 new mode 100755 diff --git a/icons/delete-dark.svg b/icons/delete-dark.svg old mode 100644 new mode 100755 diff --git a/icons/delete.svg b/icons/delete.svg old mode 100644 new mode 100755 diff --git a/icons/edit-dark.svg b/icons/edit-dark.svg old mode 100644 new mode 100755 diff --git a/icons/edit.svg b/icons/edit.svg old mode 100644 new mode 100755 diff --git a/icons/format-text-bold.svg b/icons/format-text-bold.svg old mode 100644 new mode 100755 diff --git a/icons/format-text-code.svg b/icons/format-text-code.svg old mode 100644 new mode 100755 diff --git a/icons/format-text-italic.svg b/icons/format-text-italic.svg old mode 100644 new mode 100755 diff --git a/icons/home.svg b/icons/home.svg old mode 100644 new mode 100755 diff --git a/icons/internet.png b/icons/internet.png old mode 100644 new mode 100755 diff --git a/icons/link-dark.svg b/icons/link-dark.svg old mode 100644 new mode 100755 diff --git a/icons/link.svg b/icons/link.svg old mode 100644 new mode 100755 diff --git a/icons/list.svg b/icons/list.svg old mode 100644 new mode 100755 diff --git a/icons/new.svg b/icons/new.svg old mode 100644 new mode 100755 diff --git a/icons/rename-dark.svg b/icons/rename-dark.svg old mode 100644 new mode 100755 diff --git a/icons/rename.svg b/icons/rename.svg old mode 100644 new mode 100755 diff --git a/icons/upload.svg b/icons/upload.svg old mode 100644 new mode 100755 diff --git a/icons/w2-icon.png b/icons/w2-icon.png old mode 100644 new mode 100755 diff --git a/images/.gitignore b/images/.gitignore old mode 100644 new mode 100755 diff --git a/index.css b/index.css old mode 100644 new mode 100755 index 81e7093..ed5ce61 --- a/index.css +++ b/index.css @@ -179,7 +179,7 @@ input#gitmsg } .main { - padding: .3em .3em .3em 1em; + padding: .3em .3em .3em 1em; background-color: #000000; color: #ffffff; } @@ -308,7 +308,7 @@ input[type="submit"] { input[type="submit"] { /*background-color: rgb(22, 101, 201);*/ - background-color: #222222; + background-color: #222222; color: white; } input[type="button"] { diff --git a/index.css.2 b/index.css.2 deleted file mode 100644 index c9de0d3..0000000 --- a/index.css.2 +++ /dev/null @@ -1,362 +0,0 @@ -/* - * W2 - * - * Copyright (C) 2007-2011 Steven Frank - * - * Code may be re-used as long as the above copyright notice is retained. - * See README.txt for full details. - * - * Written with Coda: - * - * colors icons: - * 240,240,240 - * dark: 15, 15, 15 - */ - -* { - font-family: Monospace; - margin: 0; - padding: 0; - font-size: 11px; -} - -body { - background-color: #eeeeee; -} - -blockquote { - background-color: #0f070f; - margin: 4px 4px 12px 20px; - padding: 4px 10px 4px 10px; -} - -form { - display: inline; -} - -li { - line-height: 1.5em; -} - -h1 { - font-size: 2em; - font-weight: bold; - margin-bottom: 4px; - margin-top: .6em; -} - -h2 { - font-size: 1.6em; - font-weight: bold; - margin-bottom: 4px; - margin-top: .5em; -} - -h3 { - font-size: 1.2em; - font-weight: bold; -} -h3, h4, h5, h6 { - margin-top: .4em; - margin-bottom: 4px; -} - -hr { - border-top: 1px solid #222222; - border-bottom: 0; - border-left: 0; - border-right: 0; - margin-top: 12px; - margin-bottom: 12px; -} - -ul, -ol { - margin-top: .5em; - margin-left: 1em; - padding-left: 1em; - list-style-position: outside; -} - -ul li, ol li { - padding-left: .5em; -} - -li > ul, li > ol -{ - margin-top: 0; -} - -p { - margin-top: .5em; -} - -pre { - font-family: Monospace; - margin-left: 0; - margin-bottom: .5em; - margin-top: .5em; - - /* stroke each browser so that they wrap lines in the pre tag */ - white-space: pre-wrap; /* css-3 */ - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - - background: #ffc; - border: 1px dotted gray; - padding: .2em .2em .2em .4em; -} - -code { - font-family: Monospace; - background: #ffc; - padding: .1em .1em 0 .2em; -} - -table { - border-collapse: collapse; - padding: .2em; - max-width: 99%; - background-color: #000000; - color: #ffffff; -} - th { - text-align: left; - } - td, th { - padding: .1em 1em .1em .1em; - word-break: break-all; - } - thead { - border-bottom: 1px solid black; - font-weight: bold; - } - thead td a { - text-decoration:none; - } - thead td span.sortBy:after { - content: "\25BC"; - } - tr:nth-child(even) { - background: #e4e4e4; - } - tr:nth-child(odd) { - background: #eeeeee; - } -.pageActions { - padding-left: 8px; - padding-right: 8px; -} - -textarea { - font-family: Monospace; - width: 75%; - background-color: #000011; - color: #ffffff; -} - @media (max-width: 600px), (orientation: portrait) { - textarea { - width: 99%; - } - } - -input[type="text"], -textarea { - padding: 2px; -} - -input#gitmsg -{ - width: 60%; -} - -.main { - padding: .3em .3em .3em 1em; - background-color: #000000; - color: #ffffff; -} - -.main a[href^="http"]::after { - content: url('/icons/internet.png'); -} - -.main a.literalMatch { - font-weight: bold; - color: #00f; -} - -.main a.noexist { - color: #b00 !important; -} - -.login { - margin: 40px auto; - max-width: 650px; - line-height: 1.4; -} - -.note { - background-color: #000011; - padding: 4px; - margin: .5em 0 .5em 0; - color: #9999bb; - border: solid 1px #9999bb; - width: 75%; -} - @media (max-width: 600px), (orientation: portrait) { - .note { - width: 99%; - } - } - -.titlebar { - background-color: #111111; - color: #ffffff; -} - -.titlebar span.title { - font-size: 10px; - font-weight: bold; -} - -.titledate { - font-size: 0.90em; - color: #777777; - margin-left: 1em; - margin-right: 1em; -} - -.toolbar { - background-color: #222222; - position: sticky; - top: 0; - font-size: 8px; -} - -.toolbar > a, .titlebar > a { - font-size: 0.90em; - margin-right: 1em; - color: #eeeeee; - text-decoration: none; - font-weight: normal; -} - -.toolbar > a:hover, .titlebar > a:hover { - text-decoration: underline; -} - -.sidebar { - float: right; -} -.sidebar, .linkshere { - margin-right: 5px; - margin-top: 5px; - padding: 4px; - border: solid 1px #666644; -} -.sidebar ul { - margin-top: 0; - margin-left: 4px; -} -.linkshere { - width: 50%; - margin-left: 5px; -} - @media (max-width: 600px), (orientation: portrait) { - .sidebar, .linkshere { - margin-left: 5px; - float: none; - width: auto; - } - } - -input.search { -/* font-size: 0.95em;*/ - color: #000000; - width: 5em; - padding: .1em; -} - -input.search:focus { - width: 15em; -} - -input.pagename { - width: 20em; -} - -input[type="button"], -input[type="submit"] { - border:none; - border-radius: 3px; - padding: .5em 1em; - cursor: pointer; - margin-right: .5em; -} -#maxsizelabel { - margin-right: 1em; -} - -input[type="submit"] { - background-color: rgb(30, 101, 201); - color: white; -} -input[type="button"] { - background-color: rgb(220, 220, 220); -} - -input[type="submit"]:hover { - background-color: rgb(69, 135, 226); -} -input[type="button"]:hover { - background-color: rgb(200, 200, 200); -} - -img { - max-width: 100%; - height: auto; -} - -#drawer { - display: inline-block; - position: absolute; - width: 300px; - background-color: rgb(240, 240, 240); - opacity: 0.5; - border: 1px solid black; - border-radius: 5px; - padding: 0; - cursor: move; -} -#drawer h5 { - border-bottom: 1px solid black; - padding: 4px; -} -#drawer div { - padding: 4px; -} -#drawer:hover { - opacity: 1.0; -} -.inactive { - display: none !important; -} -img.icon { - width: 1.5em; - vertical-align: middle; -} -a > img.icon:hover, a > span.icongroup:hover { - outline: 1px outset white; -} -a > img.icon:active, a > span.icongroup:active { - outline: 1px inset white; -} -a.missing-link { - color: #ba0000; -} -.rightaligned -{ - float: right; -} diff --git a/index.php b/index.php old mode 100644 new mode 100755 index 7596e5b..ccdaeb8 --- a/index.php +++ b/index.php @@ -98,7 +98,6 @@ function printDrawer() { print "
\n". " \"".__('Close')."\"\n". - "
".__('Markdown Syntax Helper')."
\n". "
\n". "# ".__('Header')." 1
". "## ".__('Header')." 2
". @@ -132,11 +131,6 @@ function printDrawer() "
\n". "
\n". " \n". - " \n". - " \"".__('Formatting\n". - " \"".__('Formatting\n". - " \"".__('Formatting\n". - " \n". " \n"; } diff --git a/locales/de.php b/locales/de.php old mode 100644 new mode 100755 diff --git a/locales/en.php b/locales/en.php old mode 100644 new mode 100755 diff --git a/locales/ja.php b/locales/ja.php old mode 100644 new mode 100755 diff --git a/locales/sample.php b/locales/sample.php old mode 100644 new mode 100755 diff --git a/md/Markdown.inc.php b/md/Markdown.inc.php old mode 100644 new mode 100755 diff --git a/md/Markdown.php b/md/Markdown.php old mode 100644 new mode 100755 diff --git a/md/MarkdownExtra.inc.php b/md/MarkdownExtra.inc.php old mode 100644 new mode 100755 diff --git a/md/MarkdownExtra.php b/md/MarkdownExtra.php old mode 100644 new mode 100755 diff --git a/md/MarkdownInterface.inc.php b/md/MarkdownInterface.inc.php old mode 100644 new mode 100755 diff --git a/md/MarkdownInterface.php b/md/MarkdownInterface.php old mode 100644 new mode 100755 diff --git a/pages/Client rules.md b/pages/Client rules.md new file mode 100644 index 0000000..5aa4622 --- /dev/null +++ b/pages/Client rules.md @@ -0,0 +1,98 @@ +Client rules +============ + +The `Rule` array allows you to specify rules for X11 clients based on factors such as WM_CLASS and WM_NAME. In the English language, that means you can specify how clients are tiled based on the class, instance or title of said client. + +To get this information, you can use the X11 utility `xprop` to get information about a client. If you want to see in detail how the rule system works, refer to function `applyrules` and the `Rule` struct in `speedwm.c`. + +### Rule structure + +1. Class + +Internally: `const char *class` + +2. Instance + +Internally: `const char *instance` + +3. Title + +Internally: `const char *title` + +4. Tags + +Internally: `unsigned int tags` + +5. isfloating + +Internally: `int isfloating` + +6. ispermanent + +Internally: `int ispermanent` + +7. isterminal + +Internally: `int isterminal` + +8. noswallow + +Internally: `int noswallow` + +9. Monitor + +Internally: `int monitor` + +10. unmanaged + +Internally: `int unmanaged` + +11. ignoretransient + +Internally: `int ignoretransient` + +12. floatx + +Internally: `int floatx` + +13. floaty + +Internally: `int floaty` + +14. floatw + +Internally: `int floatw` + +15. floath + +Internally: `int floath` + +16. scratchkey + +Internally: `const char scratchkey` + +### Class + +Every X11 client has a class. Even the window manager, speedwm in this case which has the class `speedwm` has a class. speedwm is **not** responsible for setting a client's class, clients using X11 libraries should set this themselves. speedwm just retrieves this information when a client is mapped. + +As mentioned previously, you can get the class for a client by running the command-line utility `xprop` on any client. Running `xprop` on speedwm's bar for example will return: + +` +[anon@arch ~]$ xprop +WM_CLASS(STRING) = "speedwm", "speedwm" +` + +Running it and clicking on the root window however will return information such as the different tags and their glyphs, supported atoms, loaded xrdb resources and information such as the focused client which is not relevant here. + +Now, some clients may have multiple classes, `st` for example has both `st` and `St`. Note the class of the program you want to use. Let's say, we want to set a rule for Chromium. Running `xprop | grep CLASS` returns the following information. + +` +[anon@arch ~]$ xprop | grep CLASS +WM_CLASS(STRING) = "chromium", "Chromium" +` + +This means our class here is `chromium`. That would also be the value of `const char *class` or simply the class. This means if the class matches what we specified (ie. `chromium`), and provided the instance and title also matches an existing client, we set the other values to what is specified. + +### Instance + +This allows us to specify which instance of the class diff --git a/pages/Getting Started.md b/pages/Getting Started.md old mode 100644 new mode 100755 index 4f23a4d..a43d1a0 --- a/pages/Getting Started.md +++ b/pages/Getting Started.md @@ -103,10 +103,10 @@ This assumes you have `git` installed. read and write. Do not clone the speedwm repository in `~/.config` as speedwm will write configuration files to that location. -Note: Cloning the repository to `~/.config` is fine +**Note: Cloning the repository to `~/.config` is fine if the speedwm source code directory is **not** `speedwm` but speedwm will use the `~/.config/speedwm` directory to store configuration files (not -source code). +source code).** From here on, we're going to assume you are in the location `~/Documents`! Run `git clone https://codeberg.org/speedie/speedwm.git speedwm` to clone the @@ -135,8 +135,8 @@ I recommend you do this by forking the speedwm repository, and putting it on a Git repository somewhere. That way, you can always clone your specific version. -Warning: If you lose your source code, you will be -**unable** to make any further changes to speedwm. +**Warning: If you lose your source code, you will be +**unable** to make any further changes to speedwm.** Now follow along with 'Using speedwm'. @@ -177,7 +177,7 @@ I recommend you do this by putting the source code on a Git or subversion repository somewhere. That way, you can always clone your specific version. -Warning: If you lose your source code, you will be -**unable** to make any further changes to speedwm. +**Warning: If you lose your source code, you will be +**unable** to make any further changes to speedwm.** Now follow along with 'Using speedwm'. diff --git a/pages/Home.md b/pages/Home.md old mode 100644 new mode 100755 diff --git a/pages/Wayland support.md b/pages/Wayland support.md old mode 100644 new mode 100755 diff --git a/pages/Where do I go?.md b/pages/Where do I go?.md new file mode 100644 index 0000000..9cf2323 --- /dev/null +++ b/pages/Where do I go?.md @@ -0,0 +1,24 @@ +Where do I go? +============== + +Lost? If you don't know where to go, you can click the icon on the top bar. The `All` button allows you to get a view of all articles that have been posted on the wiki. + +There is also a search bar at the top of every page which allows you to search for any article that has been posted. + +## Basic wiki features + +The wiki, based on a fork of w2wiki allows you to create new articles, edit existing articles, read existing articles (that's pretty much given), [host it yourself](https://codeberg.org/speedie/speedwm-wiki), and delete articles. + +Now, please note that I am giving you this power, and with great power comes great responsibility. I want everyone to be able to help with the project. However, if it gets abused by people then I will have to remove this functionality and go back to using purely Git. + +So please don't ruin it for everyone. If the wiki has to be shut down due to your vandalism, we hate you forever. That said, we do make Git backups fairly often (I will not say how often to prevent vandalism), so if an article is deleted it should be possible to restore it with minor changes lost. + +## The sidebar + +The sidebar is a markdown page like any other and can also be edited as any other. It is supposed to be used as a list of links, but of course there is no limit to what you can do with it. + +To edit it, click `All` and edit `_sidebar`. From there, you can follow regular markdown syntax. + +## Testing locally + +Please, please, please test locally if you're new to markdown. That way, you avoid (for example) deleting pages by accident. You can easily test an identical (minus some pages perhaps) copy of the wiki locally by installing `php` with your distro's package manager and cloning [the repo](https://codeberg.org/speedie/speedwm-wiki) somewhere. If you don't know what you're doing, just cd into it, run `php -S localhost:1337` to start PHP, open any web browser and go to `localhost:1337`. Of course, the `1337` here can be swapped out for almost any value, it's just what I happen to go with. \ No newline at end of file diff --git a/pages/_sidebar.md b/pages/_sidebar.md old mode 100644 new mode 100755 index 48df282..cb263b0 --- a/pages/_sidebar.md +++ b/pages/_sidebar.md @@ -1 +1,3 @@ - [[Home]] +- [[Client rules]] +- [[Getting Started]] \ No newline at end of file diff --git a/tests/travis-ci-apache.conf b/tests/travis-ci-apache.conf old mode 100644 new mode 100755