[Org files] Formatting

This commit is contained in:
Lucien Cartier-Tilet 2020-12-10 10:20:21 +01:00
parent 54e9e00078
commit 6665074db0
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
11 changed files with 756 additions and 756 deletions

View File

@ -8,9 +8,9 @@
#+PROPERTY: header-args:lua :tangle ~/.config/awesome/rc.lua :exports code :noweb yes :mkdirp yes #+PROPERTY: header-args:lua :tangle ~/.config/awesome/rc.lua :exports code :noweb yes :mkdirp yes
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-4c41360e :CUSTOM_ID: Introduction-4c41360e
:END: :END:
From the Arch Wiki: awesome is a highly configurable, next generation framework window manager for Xorg. It is very fast and extensible. It is primarily targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on its graphical environment. From the Arch Wiki: awesome is a highly configurable, next generation framework window manager for Xorg. It is very fast and extensible. It is primarily targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on its graphical environment.
Personally, what really made me want to try Awesome is the fact its configuration file is written with an actual programming language and not just a configuration language like with i3, and by the fact it works with tags and not workspaces which makes window management much more flexible. Personally, what really made me want to try Awesome is the fact its configuration file is written with an actual programming language and not just a configuration language like with i3, and by the fact it works with tags and not workspaces which makes window management much more flexible.
@ -18,9 +18,9 @@ Personally, what really made me want to try Awesome is the fact its configuratio
This document was written in Emacs with Org-mode and is both the documentation and source code of my configuration file which can be extracted to ~$HOME/.config/awesome/rc.lua~ through a call to ~org-babel-tangle~. This document was written in Emacs with Org-mode and is both the documentation and source code of my configuration file which can be extracted to ~$HOME/.config/awesome/rc.lua~ through a call to ~org-babel-tangle~.
* Loading libraries * Loading libraries
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Loading_libraries-4df76999 :CUSTOM_ID: Loading_libraries-4df76999
:END: :END:
First of all, some initialization is needed, and this initialization is about math randomness. So, lets initialize the ~random~ method of the ~math~ library: First of all, some initialization is needed, and this initialization is about math randomness. So, lets initialize the ~random~ method of the ~math~ library:
#+BEGIN_SRC lua #+BEGIN_SRC lua
math.randomseed(os.time()) math.randomseed(os.time())
@ -81,9 +81,9 @@ By the way, lets initialize the ~random~ method of the ~math~ library:
#+END_SRC #+END_SRC
* Error handling * Error handling
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Error_handling-f6a6668f :CUSTOM_ID: Error_handling-f6a6668f
:END: :END:
This code checks if Awesome encountered an error during startup and fell back to another config. This code will only ever execute for the fallback config. This code checks if Awesome encountered an error during startup and fell back to another config. This code will only ever execute for the fallback config.
#+BEGIN_SRC lua #+BEGIN_SRC lua
if awesome.startup_errors then if awesome.startup_errors then
@ -111,22 +111,22 @@ And this code handles runtime errors after startup thanks to signals.
#+END_SRC #+END_SRC
* Variable definitions * Variable definitions
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variable_definitions-06b2bcbf :CUSTOM_ID: Variable_definitions-06b2bcbf
:END: :END:
** Themes ** Themes
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variable_definitions-Themes-591886b4 :CUSTOM_ID: Variable_definitions-Themes-591886b4
:END: :END:
With Awesome, it is possible to load or write custom themes in order to give Awesome a special look that fits the user. I am currently using a custom theme that is not yet included in my dotfiles. I will add it later, along with the images used for the theme. With Awesome, it is possible to load or write custom themes in order to give Awesome a special look that fits the user. I am currently using a custom theme that is not yet included in my dotfiles. I will add it later, along with the images used for the theme.
#+BEGIN_SRC lua #+BEGIN_SRC lua
beautiful.init("/home/phundrak/.config/awesome/nord/theme.lua") beautiful.init("/home/phundrak/.config/awesome/nord/theme.lua")
#+END_SRC #+END_SRC
** Default terminal and text editor ** Default terminal and text editor
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variable_definitions-Default_terminal_and_text_editor-44b84e20 :CUSTOM_ID: Variable_definitions-Default_terminal_and_text_editor-44b84e20
:END: :END:
The two following variables are set so that I dont need to go over my whole config file in order to modify which terminal or text editor I use, not that I do it often though. The two following variables are set so that I dont need to go over my whole config file in order to modify which terminal or text editor I use, not that I do it often though.
#+BEGIN_SRC lua #+BEGIN_SRC lua
terminal = "st" terminal = "st"
@ -134,9 +134,9 @@ The two following variables are set so that I dont need to go over my whole c
#+END_SRC #+END_SRC
** Keys ** Keys
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variable_definitions-Keys-b8def4ac :CUSTOM_ID: Variable_definitions-Keys-b8def4ac
:END: :END:
The following declares the default Modkey. Usually, ~Mod4~ is the Super key, situated between the Ctrl key and the Alt key with a logo (usually Windows). Another usual value for this is ~Mod1~, which is the Alt key, but it has greater chances of interfering with other software. I also defined some other obvious variables in order to make my code cleaner later on. The following declares the default Modkey. Usually, ~Mod4~ is the Super key, situated between the Ctrl key and the Alt key with a logo (usually Windows). Another usual value for this is ~Mod1~, which is the Alt key, but it has greater chances of interfering with other software. I also defined some other obvious variables in order to make my code cleaner later on.
#+BEGIN_SRC lua #+BEGIN_SRC lua
modkey = "Mod4" modkey = "Mod4"
@ -147,17 +147,17 @@ The following declares the default Modkey. Usually, ~Mod4~ is the Super key, sit
#+END_SRC #+END_SRC
* Custom functions * Custom functions
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-ed54dbe2 :CUSTOM_ID: Custom_functions-ed54dbe2
:END: :END:
** Wallpaper-related functions ** Wallpaper-related functions
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-5912f7dd :CUSTOM_ID: Custom_functions-Wallpaper-related_functions-5912f7dd
:END: :END:
*** Set a random wallpaper *** Set a random wallpaper
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Set_a_random_wallpaper-104bbeec :CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Set_a_random_wallpaper-104bbeec
:END: :END:
This function sets a random wallpaper from the directory =~/Pictures/Wallpapers=, see [[file:bin.org::#pape-update-bdecbadf][pape-update]] in my custom scripts. This depends on [[https://github.com/l3ib/nitrogen/][Nitrogen]]. This function sets a random wallpaper from the directory =~/Pictures/Wallpapers=, see [[file:bin.org::#pape-update-bdecbadf][pape-update]] in my custom scripts. This depends on [[https://github.com/l3ib/nitrogen/][Nitrogen]].
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function set_random_pape() local function set_random_pape()
@ -169,9 +169,9 @@ This function sets a random wallpaper from the directory =~/Pictures/Wallpapers=
#+END_SRC #+END_SRC
*** Restore previous wallpaper *** Restore previous wallpaper
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c :CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c
:END: :END:
I also wrote the following function that will restore the previously set wallpaper: I also wrote the following function that will restore the previously set wallpaper:
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function set_wallpaper(_) local function set_wallpaper(_)
@ -180,9 +180,9 @@ I also wrote the following function that will restore the previously set wallpap
#+END_SRC #+END_SRC
** Layout manipulation ** Layout manipulation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Layout_manipulation-6bc7db06 :CUSTOM_ID: Custom_functions-Layout_manipulation-6bc7db06
:END: :END:
The following function is used by a shortcut described below in [[#Keybindings-Clients-f9f96d60]]. The following function is used by a shortcut described below in [[#Keybindings-Clients-f9f96d60]].
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function client_go_back() local function client_go_back()
@ -194,9 +194,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
#+END_SRC #+END_SRC
** Clients manipulation ** Clients manipulation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Clients_manipulation-7e958fed :CUSTOM_ID: Custom_functions-Clients_manipulation-7e958fed
:END: :END:
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function restore_minimized_clients() local function restore_minimized_clients()
local c = awful.client.restore() local c = awful.client.restore()
@ -238,9 +238,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
#+END_SRC #+END_SRC
** Tag manipulation ** Tag manipulation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Tag_manipulation-5fc67669 :CUSTOM_ID: Custom_functions-Tag_manipulation-5fc67669
:END: :END:
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function view_tag_n(i) local function view_tag_n(i)
local screen = awful.screen.focused() local screen = awful.screen.focused()
@ -284,9 +284,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
#+END_SRC #+END_SRC
** Awesome prompt ** Awesome prompt
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Custom_functions-Awesome_prompt-de4fde50 :CUSTOM_ID: Custom_functions-Awesome_prompt-de4fde50
:END: :END:
#+BEGIN_SRC lua #+BEGIN_SRC lua
local function invoke_lua_execute_prompt() local function invoke_lua_execute_prompt()
awful.prompt.run { awful.prompt.run {
@ -299,9 +299,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
#+END_SRC #+END_SRC
* Layouts * Layouts
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Layouts-be55a7fd :CUSTOM_ID: Layouts-be55a7fd
:END: :END:
The following is a list of available windows layouts. I only enable some of them, and their order in the table is their order in Awesome. The following is a list of available windows layouts. I only enable some of them, and their order in the table is their order in Awesome.
#+NAME: table-layouts #+NAME: table-layouts
| Layout | Enabled? | | Layout | Enabled? |
@ -355,15 +355,15 @@ Here is the code that activates these layouts:
#+END_SRC #+END_SRC
* Top bar * Top bar
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Top_bar-d3117294 :CUSTOM_ID: Top_bar-d3117294
:END: :END:
The top bar in Awesome is declared thanks to a ~wibar~ widget fro the ~awful~ library. It is comprised of several buttons and widgets that will be declared below. The top bar in Awesome is declared thanks to a ~wibar~ widget fro the ~awful~ library. It is comprised of several buttons and widgets that will be declared below.
** Menus ** Menus
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Top_bar-Menus-cf468ca8 :CUSTOM_ID: Top_bar-Menus-cf468ca8
:END: :END:
#+NAME: make-menu #+NAME: make-menu
#+BEGIN_SRC emacs-lisp :var menu=table-awesome-menu #+BEGIN_SRC emacs-lisp :var menu=table-awesome-menu
(mapconcat (lambda (x) (mapconcat (lambda (x)
@ -423,10 +423,10 @@ Finally, lets declare the menubars terminal for applications that require
menubar.utils.terminal = terminal menubar.utils.terminal = terminal
#+END_SRC #+END_SRC
** Other widgets ** widgets
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Top_bar-Other_widgets-0b255378 :CUSTOM_ID: Top_bar-Other_widgets-0b255378
:END: :END:
Lets declare the keyboard map indicator and switcher for the top bar: Lets declare the keyboard map indicator and switcher for the top bar:
#+BEGIN_SRC lua #+BEGIN_SRC lua
keyboardlayout = awful.widget.keyboardlayout() keyboardlayout = awful.widget.keyboardlayout()
@ -438,9 +438,9 @@ Lets also create a clock widget:
#+END_SRC #+END_SRC
** Tag list ** Tag list
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Top_bar-Tag_list-d43dbb62 :CUSTOM_ID: Top_bar-Tag_list-d43dbb62
:END: :END:
In order to create the taglist (an equivalent to workspaces, but better), we need to create first a local variable that will hold the widget. It will be declared as you can see below: In order to create the taglist (an equivalent to workspaces, but better), we need to create first a local variable that will hold the widget. It will be declared as you can see below:
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
local tasklist_buttons = gears.table.join( local tasklist_buttons = gears.table.join(
@ -507,9 +507,9 @@ So, heres the actual configuration code for the taglist:
#+END_SRC #+END_SRC
** Tasks list ** Tasks list
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Top_bar-Tasks_list-fb7c9b20 :CUSTOM_ID: Top_bar-Tasks_list-fb7c9b20
:END: :END:
Similarly to the tag list, the task list can display some special behavior depending on the clicks it receives. These clicks are set like so: Similarly to the tag list, the task list can display some special behavior depending on the clicks it receives. These clicks are set like so:
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
local tasklist_buttons = gears.table.join( local tasklist_buttons = gears.table.join(
@ -568,13 +568,13 @@ So, heres the actual code for the tasklist:
#+END_SRC #+END_SRC
* Theme and display * Theme and display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Theme_and_display-6f94bad4 :CUSTOM_ID: Theme_and_display-6f94bad4
:END: :END:
** Screen update ** Screen update
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Theme_and_display-Screen_update-e162a27a :CUSTOM_ID: Theme_and_display-Screen_update-e162a27a
:END: :END:
When a screens geometry changes (e.g. when a different resolution is applied), the signal ~property::geometry~ is sent. When this is the case, the wallpaper should be redisplayed since it wont necessarily fit the new geometry of the screen. And remember, I have a [[#Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c][function that does exactly that]]! Lets connect this function to the geometry change signal: When a screens geometry changes (e.g. when a different resolution is applied), the signal ~property::geometry~ is sent. When this is the case, the wallpaper should be redisplayed since it wont necessarily fit the new geometry of the screen. And remember, I have a [[#Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c][function that does exactly that]]! Lets connect this function to the geometry change signal:
#+BEGIN_SRC lua #+BEGIN_SRC lua
screen.connect_signal("property::geometry", set_wallpaper) screen.connect_signal("property::geometry", set_wallpaper)
@ -682,9 +682,9 @@ In the end, our code looks like this:
#+END_SRC #+END_SRC
* Mouse bindings * Mouse bindings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Mouse_bindings-eb4a69a8 :CUSTOM_ID: Mouse_bindings-eb4a69a8
:END: :END:
It is possible with Awesome to bind some shortcuts to mouse events when the mouse is above Awesome itself (not above some client). Only one is set: the right click opens the Awesome menu. It is possible with Awesome to bind some shortcuts to mouse events when the mouse is above Awesome itself (not above some client). Only one is set: the right click opens the Awesome menu.
#+BEGIN_SRC lua #+BEGIN_SRC lua
root.buttons(gears.table.join( root.buttons(gears.table.join(
@ -720,9 +720,9 @@ I will also set three mouse bindings for when the mouse is above a client:
#+END_SRC #+END_SRC
* Keybindings * Keybindings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-a4e415b3 :CUSTOM_ID: Keybindings-a4e415b3
:END: :END:
Keybindings allow the user to execute some Lua code all across Awesome. They all bear at least a list of modifier keys, the actual key to be pressed, the action they keybinding should yield, a description, and a group. The latter two will be useful for the keybindings help window which will display them all, sorted by group and with the description displayed next to the keybinding itself. Keybindings allow the user to execute some Lua code all across Awesome. They all bear at least a list of modifier keys, the actual key to be pressed, the action they keybinding should yield, a description, and a group. The latter two will be useful for the keybindings help window which will display them all, sorted by group and with the description displayed next to the keybinding itself.
Here are some keybindings related to Awesome itself. Most of them will be described in tables, but due to some limitations from Org-mode (the Emacs mode used to write this document and generate my Awesome configuration), a few of them will be directly written as Lua code. Here are some keybindings related to Awesome itself. Most of them will be described in tables, but due to some limitations from Org-mode (the Emacs mode used to write this document and generate my Awesome configuration), a few of them will be directly written as Lua code.
@ -866,9 +866,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
#+END_SRC #+END_SRC
** Applications ** Applications
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Applications-8321c6c9 :CUSTOM_ID: Keybindings-Applications-8321c6c9
:END: :END:
#+NAME: sc-app #+NAME: sc-app
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|--------+-----------+---------+-----------------------+-------------------+-------| |--------+-----------+---------+-----------------------+-------------------+-------|
@ -876,9 +876,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
| n | modkey | spawn | nemo | open file manager | app | | n | modkey | spawn | nemo | open file manager | app |
*** Internet apps *** Internet apps
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Applications-Internet_apps-87e80705 :CUSTOM_ID: Keybindings-Applications-Internet_apps-87e80705
:END: :END:
#+NAME: sc-app-internet #+NAME: sc-app-internet
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-----+----------------+---------+-----------------------------------+--------------------+----------| |-----+----------------+---------+-----------------------------------+--------------------+----------|
@ -886,9 +886,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
| d | control, shift | spawn | discord-canary | launch Discord | internet | | d | control, shift | spawn | discord-canary | launch Discord | internet |
*** Screenshots *** Screenshots
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Applications-Screenshots-fa63a5a5 :CUSTOM_ID: Keybindings-Applications-Screenshots-fa63a5a5
:END: :END:
#+NAME: sc-app-screenshot #+NAME: sc-app-screenshot
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-------+-----------+---------+------------+-----------------------------+------------| |-------+-----------+---------+------------+-----------------------------+------------|
@ -897,9 +897,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
| Print | shift | spawn | scrot -d 3 | Screenshot (3s delay) | screenshot | | Print | shift | spawn | scrot -d 3 | Screenshot (3s delay) | screenshot |
*** Emacs *** Emacs
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Applications-Emacs-95f8f6a4 :CUSTOM_ID: Keybindings-Applications-Emacs-95f8f6a4
:END: :END:
#+NAME: sc-app-emacs #+NAME: sc-app-emacs
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-----+---------------+---------+-------------------------------+--------------------------+-------| |-----+---------------+---------+-------------------------------+--------------------------+-------|
@ -907,9 +907,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
| e | modkey, shift | spawn | emacsclient -c -n -e '(mu4e)' | invoke Emacs mail client | emacs | | e | modkey, shift | spawn | emacsclient -c -n -e '(mu4e)' | invoke Emacs mail client | emacs |
*** Rofi *** Rofi
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Applications-Rofi-ca998c87 :CUSTOM_ID: Keybindings-Applications-Rofi-ca998c87
:END: :END:
#+NAME: sc-app-rofi #+NAME: sc-app-rofi
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-----+------------------------+---------+------------------------------------------+---------------------------------+-------| |-----+------------------------+---------+------------------------------------------+---------------------------------+-------|
@ -927,9 +927,9 @@ Most of these keybindings are available at root-level of Awesome and will be dec
| y | modkey | shell | rofi-ytdl | download video from web | rofi | | y | modkey | shell | rofi-ytdl | download video from web | rofi |
** Awesome ** Awesome
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Awesome-7b691e10 :CUSTOM_ID: Keybindings-Awesome-7b691e10
:END: :END:
Here will be declared some shortcuts directly related to Awesome itself. Here will be declared some shortcuts directly related to Awesome itself.
#+NAME: sc-awesome #+NAME: sc-awesome
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
@ -946,9 +946,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
| F4 | modkey, shift, control | spawn | poweroff | power off computer | awesome | | F4 | modkey, shift, control | spawn | poweroff | power off computer | awesome |
** Clients ** Clients
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Clients-f9f96d60 :CUSTOM_ID: Keybindings-Clients-f9f96d60
:END: :END:
These shortcuts are related to clients (aka windows) management. These shortcuts are related to clients (aka windows) management.
#+NAME: sc-client #+NAME: sc-client
| Key | Modifiers | Lambda? | Action | What it does | Group | Clientkey? | | Key | Modifiers | Lambda? | Action | What it does | Group | Clientkey? |
@ -973,9 +973,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
| Tab | modkey | no | client_go_back | go back | client | no | | Tab | modkey | no | client_go_back | go back | client | no |
** Layout manipulation ** Layout manipulation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Layout_manipulation-648b4581 :CUSTOM_ID: Keybindings-Layout_manipulation-648b4581
:END: :END:
#+NAME: sc-layout #+NAME: sc-layout
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-------+-----------------+---------+-------------------------------------+-----------------------------------+--------| |-------+-----------------+---------+-------------------------------------+-----------------------------------+--------|
@ -989,9 +989,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
| space | modkey, meta | yes | awful.layout.inc(-1) | previous layout | layout | | space | modkey, meta | yes | awful.layout.inc(-1) | previous layout | layout |
** Media ** Media
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Media-f2cc1324 :CUSTOM_ID: Keybindings-Media-f2cc1324
:END: :END:
#+NAME: sc-media #+NAME: sc-media
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|----------------------+-----------------+----------+---------------------------------+--------------------------+-------| |----------------------+-----------------+----------+---------------------------------+--------------------------+-------|
@ -1018,9 +1018,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
| p | modkey, meta | shell | mpc stop | stop playback | media | | p | modkey, meta | shell | mpc stop | stop playback | media |
** Screen ** Screen
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Screen-b73991f0 :CUSTOM_ID: Keybindings-Screen-b73991f0
:END: :END:
#+NAME: sc-screen #+NAME: sc-screen
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|-----------------------+--------------+---------+---------------------------------+----------------------------+--------| |-----------------------+--------------+---------+---------------------------------+----------------------------+--------|
@ -1034,9 +1034,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
| o | modkey | yes | awful.screen.focus_relative(1) | focus next screen | screen | | o | modkey | yes | awful.screen.focus_relative(1) | focus next screen | screen |
** Tags ** Tags
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Tags-3424b757 :CUSTOM_ID: Keybindings-Tags-3424b757
:END: :END:
#+NAME: sc-tag #+NAME: sc-tag
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
|--------+-----------------+---------+---------------------------+--------------+-------| |--------+-----------------+---------+---------------------------+--------------+-------|
@ -1054,9 +1054,9 @@ Another set of shortcuts is linked to the number row on the keyboard that allow
| Number | modkey, control, shift | toggle_focused_client_to_tag_n( | Toggle focused client on tag # | tag | | Number | modkey, control, shift | toggle_focused_client_to_tag_n( | Toggle focused client on tag # | tag |
** Misc ** Misc
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Keybindings-Misc-0b45ce02 :CUSTOM_ID: Keybindings-Misc-0b45ce02
:END: :END:
In this category you will find other keybindings that do not fit in other categories. For now, the only keybinding that is in this category is for toggling the touchpads tapping ability. This is linked to a special script I wrote [[file:bin.org::#Toggle_touchpad_tapping-23348b00][here]]. In this category you will find other keybindings that do not fit in other categories. For now, the only keybinding that is in this category is for toggling the touchpads tapping ability. This is linked to a special script I wrote [[file:bin.org::#Toggle_touchpad_tapping-23348b00][here]].
#+NAME: sc-misc #+NAME: sc-misc
| Key | Modifiers | Lambda? | Action | What it does | Group | | Key | Modifiers | Lambda? | Action | What it does | Group |
@ -1064,9 +1064,9 @@ In this category you will find other keybindings that do not fit in other catego
| XF86TouchpadToggle | | shell | tttapping | toggle touchpad tapping | misc | | XF86TouchpadToggle | | shell | tttapping | toggle touchpad tapping | misc |
* Rules * Rules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rules-c6142cdf :CUSTOM_ID: Rules-c6142cdf
:END: :END:
With ~awful.rules~, users are able to describe some rules for window clients when the latter spawn, such as their placement, their properties or even execute a script. A rule can be applied through the ~manage~ signal, and they are all stored in ~awful.rules.rules~, the global rules table, as follows: With ~awful.rules~, users are able to describe some rules for window clients when the latter spawn, such as their placement, their properties or even execute a script. A rule can be applied through the ~manage~ signal, and they are all stored in ~awful.rules.rules~, the global rules table, as follows:
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
awful.rules.rules = { awful.rules.rules = {
@ -1087,9 +1087,9 @@ With ~awful.rules~, users are able to describe some rules for window clients whe
For more documentation on rules and their syntax, you can read the [[https://awesomewm.org/doc/api/libraries/awful.rules.html][official documentation]]. For more documentation on rules and their syntax, you can read the [[https://awesomewm.org/doc/api/libraries/awful.rules.html][official documentation]].
** Universal rules ** Universal rules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rules-Universal_rules-50aad2ce :CUSTOM_ID: Rules-Universal_rules-50aad2ce
:END: :END:
The first rule is a universal rule which will match all clients, as you can see with its syntax below: The first rule is a universal rule which will match all clients, as you can see with its syntax below:
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
{ rule = {}, { rule = {},
@ -1145,9 +1145,9 @@ This is what my universal rules look like:
#+END_SRC #+END_SRC
** Floating clients ** Floating clients
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rules-Floating_clients-49ab582e :CUSTOM_ID: Rules-Floating_clients-49ab582e
:END: :END:
Some clients will be declared by default as floating windows. For this, we will declare a rule that will match any of the provided conditions: Some clients will be declared by default as floating windows. For this, we will declare a rule that will match any of the provided conditions:
#+NAME: rules-floating-conditions-table #+NAME: rules-floating-conditions-table
| Property | Matches | Comment | | Property | Matches | Comment |
@ -1184,9 +1184,9 @@ If any of these conditions is matched, then the client will be set as floating,
#+END_SRC #+END_SRC
** Titlebars ** Titlebars
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rules-Titlebars-b532fdba :CUSTOM_ID: Rules-Titlebars-b532fdba
:END: :END:
Any normal or dialog client will get a titlebar. This is enabled like so: Any normal or dialog client will get a titlebar. This is enabled like so:
#+NAME: rules-titlebars #+NAME: rules-titlebars
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
@ -1196,9 +1196,9 @@ Any normal or dialog client will get a titlebar. This is enabled like so:
#+END_SRC #+END_SRC
** Default tag for clients ** Default tag for clients
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rules-Default_tag_for_clients-6ded2a47 :CUSTOM_ID: Rules-Default_tag_for_clients-6ded2a47
:END: :END:
With the use of some rules, it is possible to define which client are assigned to which tag by default. With the use of some rules, it is possible to define which client are assigned to which tag by default.
#+NAME: rules-default-tags-table #+NAME: rules-default-tags-table
| Client Property | Value | Tag | | Client Property | Value | Tag |
@ -1236,15 +1236,15 @@ This is what these rules look like:
#+END_SRC #+END_SRC
* Signals * Signals
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Signals-e32971d6 :CUSTOM_ID: Signals-e32971d6
:END: :END:
Signals are a way for Awesome to handle events, such as client creation or deletion. Signals are a way for Awesome to handle events, such as client creation or deletion.
** Client creation ** Client creation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Signals-Client_creation-8048ac12 :CUSTOM_ID: Signals-Client_creation-8048ac12
:END: :END:
When a new client is created, the ~manage~ signal is emited. When so, the following snippet ensures this new client is not off the screen, unless its position was deliberately set by a program or by the user. It will also spawn the new client where the mouse currently is. When a new client is created, the ~manage~ signal is emited. When so, the following snippet ensures this new client is not off the screen, unless its position was deliberately set by a program or by the user. It will also spawn the new client where the mouse currently is.
#+BEGIN_SRC lua #+BEGIN_SRC lua
client.connect_signal("manage", function (c) client.connect_signal("manage", function (c)
@ -1258,9 +1258,9 @@ When a new client is created, the ~manage~ signal is emited. When so, the follow
#+END_SRC #+END_SRC
** Titlebar creation ** Titlebar creation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Signals-Titlebar_creation-3b1aaa14 :CUSTOM_ID: Signals-Titlebar_creation-3b1aaa14
:END: :END:
It is possible for Awesome to send request signals, such as the request to create titlebar (generally for new clients). The following snippet handles this titlebar creation if titlebar creation was set to ~true~ in the [[#Rules-c6142cdf][rules]]. For a detailed explanation of the code, see below. It is possible for Awesome to send request signals, such as the request to create titlebar (generally for new clients). The following snippet handles this titlebar creation if titlebar creation was set to ~true~ in the [[#Rules-c6142cdf][rules]]. For a detailed explanation of the code, see below.
#+BEGIN_SRC lua #+BEGIN_SRC lua
client.connect_signal("request::titlebars", function(c) client.connect_signal("request::titlebars", function(c)
@ -1337,9 +1337,9 @@ To make Awesome happy, I also must indicate that the middle elements are vertica
#+END_SRC #+END_SRC
** Changes of focus ** Changes of focus
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Signals-Changes_of_focus-1b73902c :CUSTOM_ID: Signals-Changes_of_focus-1b73902c
:END: :END:
The default Awesome configuration enables the following snippet of code that makes windows hovered by the users mouse focused. Just for completeness sake, I included it in this document, but be aware this wont be tangled into my configuration file and focus will not follow my mouse. The default Awesome configuration enables the following snippet of code that makes windows hovered by the users mouse focused. Just for completeness sake, I included it in this document, but be aware this wont be tangled into my configuration file and focus will not follow my mouse.
#+BEGIN_SRC lua :tangle no #+BEGIN_SRC lua :tangle no
client.connect_signal("mouse::enter", function(c) client.connect_signal("mouse::enter", function(c)
@ -1354,26 +1354,26 @@ It is also possible to change the color of the borders based on client focus. Wh
#+end_SRC #+end_SRC
* Autostart * Autostart
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Autostart-f2cf42fe :CUSTOM_ID: Autostart-f2cf42fe
:END: :END:
By simply adding a line requesting to spawn a command, it is possible to create some autolaunch. All of my autolaunched apps are launch through a custom script which you can [[file:~/org/config/bin.org::#Autostart-a99e99e7][find here]]. The command gets called with ~awful.spawn.with_shell()~, as you can see below. By simply adding a line requesting to spawn a command, it is possible to create some autolaunch. All of my autolaunched apps are launch through a custom script which you can [[file:~/org/config/bin.org::#Autostart-a99e99e7][find here]]. The command gets called with ~awful.spawn.with_shell()~, as you can see below.
#+BEGIN_SRC lua #+BEGIN_SRC lua
awful.spawn.with_shell("autostart") awful.spawn.with_shell("autostart")
#+END_SRC #+END_SRC
* What to do now :noexport: * What to do now :noexport:
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: What_to_do_now-bce61fe1 :CUSTOM_ID: What_to_do_now-bce61fe1
:END: :END:
** DONE Error on S-q ** DONE Error on S-q
CLOSED: [2020-04-12 dim. 15:47] CLOSED: [2020-04-12 dim. 15:47]
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: What_to_do_now-Error_on_S-q-beea9b99 :CUSTOM_ID: What_to_do_now-Error_on_S-q-beea9b99
:END: :END:
~attempt to index a nil value (global 'c')~ ~attempt to index a nil value (global 'c')~
** TODO Make custom theme ** TODO Make custom theme
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: What_to_do_now-Make_custom_theme-5837307e :CUSTOM_ID: What_to_do_now-Make_custom_theme-5837307e
:END: :END:

View File

@ -8,9 +8,9 @@
#+PROPERTY: header-args:emacs-lisp :exports none :tangle no #+PROPERTY: header-args:emacs-lisp :exports none :tangle no
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Presentation-9c7a53bf :CUSTOM_ID: Presentation-9c7a53bf
:END: :END:
*Before proceeding, be aware that I deprecated this i3 config on August 22nd, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.* *Before proceeding, be aware that I deprecated this i3 config on August 22nd, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.*
=i3= is a window manager for GNU/Linux which automatically tiles windows in workspaces. This configuration was ade to automatically handle some tasks such as which software allowed where, autostart, and launching software with shortcuts. =i3= is a window manager for GNU/Linux which automatically tiles windows in workspaces. This configuration was ade to automatically handle some tasks such as which software allowed where, autostart, and launching software with shortcuts.
@ -22,13 +22,13 @@ It is to be noted I am using [[https://github.com/Airblader/i3][Airbladers fo
#+END_SRC #+END_SRC
* Variables declaration * Variables declaration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variables_declaration-0ebc9a21 :CUSTOM_ID: Variables_declaration-0ebc9a21
:END: :END:
** Global ** Global
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variables_declaration-Global-1cf1bfe4 :CUSTOM_ID: Variables_declaration-Global-1cf1bfe4
:END: :END:
The first I do is declaring the modifier key and the alt key —I dont find the names =Mod1= and =Mod4= to be explicit enough. This will map =$mod= to the Super key (or as some people unfortunately call it, the /Windows/ key) and =$alt= to the Alt key. The first I do is declaring the modifier key and the alt key —I dont find the names =Mod1= and =Mod4= to be explicit enough. This will map =$mod= to the Super key (or as some people unfortunately call it, the /Windows/ key) and =$alt= to the Alt key.
Lets also bind the =$up=, =$down=, =$left= and =$right= variables to respectively the up, down, left, and right arrows on the keyboard. Why bind them to variables? If I ever want to modify the arrow keys to some other keys, like =é=, =a=, =u=, and =i= (the equivalent of =wqsd= on the bépo layout) or =c=, =t=, =s=, and =r= (the equivalent of =hjkl= on the bépo layout), I will just have to modify these four lines. Lets also bind the =$up=, =$down=, =$left= and =$right= variables to respectively the up, down, left, and right arrows on the keyboard. Why bind them to variables? If I ever want to modify the arrow keys to some other keys, like =é=, =a=, =u=, and =i= (the equivalent of =wqsd= on the bépo layout) or =c=, =t=, =s=, and =r= (the equivalent of =hjkl= on the bépo layout), I will just have to modify these four lines.
@ -105,9 +105,9 @@ Now comes the font for the window tiles. Honestly, this setting is useless since
#+END_SRC #+END_SRC
** Floating windows ** Floating windows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Variables_declaration-Floating_windows-897d0c3b :CUSTOM_ID: Variables_declaration-Floating_windows-897d0c3b
:END: :END:
Floating windows are windows that are not tiled with other windows, but rather are free to go anywhere on your screen, with any size. A bit like what you would get with any other non-tiling window manager or desktop environment (though most of them support minimal tiling features). Floating windows are windows that are not tiled with other windows, but rather are free to go anywhere on your screen, with any size. A bit like what you would get with any other non-tiling window manager or desktop environment (though most of them support minimal tiling features).
Lets declare our floading modyfier. With floating windows, you can move them around by clicking on the windows borders; but since we dont have any with this config, we will have instead to press the floating modifier while clicking on the window (anywhere on the window is fine) to move them around. Lets declare our floading modyfier. With floating windows, you can move them around by clicking on the windows borders; but since we dont have any with this config, we will have instead to press the floating modifier while clicking on the window (anywhere on the window is fine) to move them around.
@ -118,15 +118,15 @@ floating_modifier $mod
#+END_SRC #+END_SRC
* i3 global settings * i3 global settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: i3_global_settings-1b863d93 :CUSTOM_ID: i3_global_settings-1b863d93
:END: :END:
Some settings affect i3 globally, such as its aspect or how it handles the mouse. Hence, here are some settings I set in my configuration. Some settings affect i3 globally, such as its aspect or how it handles the mouse. Hence, here are some settings I set in my configuration.
** Mouse settings ** Mouse settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: i3_global_settings-Mouse_settings-4630241d :CUSTOM_ID: i3_global_settings-Mouse_settings-4630241d
:END: :END:
First of all, I do not want i3 to warp my mouse each time I change windows; my mouse stays where it is. First of all, I do not want i3 to warp my mouse each time I change windows; my mouse stays where it is.
#+BEGIN_SRC conf #+BEGIN_SRC conf
mouse_warping none mouse_warping none
@ -138,27 +138,27 @@ I also to not want the window focus to follow my mouse, because sometimes I will
#+END_SRC #+END_SRC
** Popup handling ** Popup handling
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: i3_global_settings-Popup_handling-51b6ed8d :CUSTOM_ID: i3_global_settings-Popup_handling-51b6ed8d
:END: :END:
While in fullscreen, some software might generate a popup. In that case, I want to be aware of that, and any popup will make me leave fullscreen in order to be presented with said popup. While in fullscreen, some software might generate a popup. In that case, I want to be aware of that, and any popup will make me leave fullscreen in order to be presented with said popup.
#+BEGIN_SRC conf #+BEGIN_SRC conf
popup_during_fullscreen leave_fullscreen popup_during_fullscreen leave_fullscreen
#+END_SRC #+END_SRC
** Behavior of workspace changes ** Behavior of workspace changes
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: i3_global_settings-Behavior_of_workspace_changes-00202985 :CUSTOM_ID: i3_global_settings-Behavior_of_workspace_changes-00202985
:END: :END:
When changing workspace as described below, we often want to go back to the previous workspace we were working on, but we might not remember immediately which one it was, or we might still have our fingers ready to fire the shortcut which made us make the first workspace change. Hence, if we type the same workspace change shortcut, instead of doing nothing it will bring us back to the previous workspace we were on. When changing workspace as described below, we often want to go back to the previous workspace we were working on, but we might not remember immediately which one it was, or we might still have our fingers ready to fire the shortcut which made us make the first workspace change. Hence, if we type the same workspace change shortcut, instead of doing nothing it will bring us back to the previous workspace we were on.
#+BEGIN_SRC conf #+BEGIN_SRC conf
workspace_auto_back_and_forth yes workspace_auto_back_and_forth yes
#+END_SRC #+END_SRC
** Gaps and window appearance ** Gaps and window appearance
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: i3_global_settings-Gaps_and_window_appearance-749e9f7b :CUSTOM_ID: i3_global_settings-Gaps_and_window_appearance-749e9f7b
:END: :END:
As mentioned in at the beginning of this document, I am using i3-gaps, which brings spacing (gaps) between windows to i3. As mentioned in at the beginning of this document, I am using i3-gaps, which brings spacing (gaps) between windows to i3.
First, I want space around my windows only when there are several containers on the same screen, otherwise they will be maximized. First, I want space around my windows only when there are several containers on the same screen, otherwise they will be maximized.
@ -196,9 +196,9 @@ Some parameters are also available when it comes to the colors i3 uses. Honestly
#+END_SRC #+END_SRC
* Assigning windows to workspaces * Assigning windows to workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Assigning_windows_to_workspaces-e59f61e5 :CUSTOM_ID: Assigning_windows_to_workspaces-e59f61e5
:END: :END:
I decided to bind some windows to some workspaces in order to have a better organization of my desktop. I decided to bind some windows to some workspaces in order to have a better organization of my desktop.
#+NAME: assignment-table #+NAME: assignment-table
| Application | Class | Workspace | | Application | Class | Workspace |
@ -255,9 +255,9 @@ Now Ill call the above code as a noweb reference that should be executed.
#+END_SRC #+END_SRC
* Shortcuts * Shortcuts
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-9c7074d3 :CUSTOM_ID: Shortcuts-9c7074d3
:END: :END:
I use *A LOT* of shortcuts when it comes to my workflow. Like, all the time. So, expect this chapter to be a bit long, and Ill try to make it readable still. I use *A LOT* of shortcuts when it comes to my workflow. Like, all the time. So, expect this chapter to be a bit long, and Ill try to make it readable still.
Shortcuts are set like so: Shortcuts are set like so:
@ -273,9 +273,9 @@ bindsym shortcut command
#+END_SRC #+END_SRC
** Terminal shortcuts ** Terminal shortcuts
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Terminal_shortcuts-514ecdbe :CUSTOM_ID: Shortcuts-Terminal_shortcuts-514ecdbe
:END: :END:
I have a couple of shortcuts which are related to my terminal. For instance, ~$mod+Return~ opens a regular terminal instance while ~$mod+$alt+M~ opens an SSH instance on my Mila host. I have a couple of shortcuts which are related to my terminal. For instance, ~$mod+Return~ opens a regular terminal instance while ~$mod+$alt+M~ opens an SSH instance on my Mila host.
#+NAME: terminal-shortcuts #+NAME: terminal-shortcuts
| shortcut | command | What it does | | shortcut | command | What it does |
@ -293,9 +293,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
** i3 shortcuts ** i3 shortcuts
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-i3_shortcuts-369039ae :CUSTOM_ID: Shortcuts-i3_shortcuts-369039ae
:END: :END:
A couple of shortcuts are dedicated to i3 itself. A couple of shortcuts are dedicated to i3 itself.
#+NAME: i3-sh #+NAME: i3-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -327,13 +327,13 @@ Here is the configuration:
#+END_SRC #+END_SRC
** Window and workspace management ** Window and workspace management
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-a384b8f8 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-a384b8f8
:END: :END:
*** Managing how windows will split *** Managing how windows will split
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Managing_how_windows_will_split-5a22ae31 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Managing_how_windows_will_split-5a22ae31
:END: :END:
It is possible to indicate to i3 how windows interact with one another, and especially how they are organized by spawning new windows either to the right or below the current window. It is possible to indicate to i3 how windows interact with one another, and especially how they are organized by spawning new windows either to the right or below the current window.
#+NAME: split-win-sh #+NAME: split-win-sh
| shortcuts | command | what it does | | shortcuts | command | what it does |
@ -347,9 +347,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Focus windows *** Focus windows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_windows-69a00ae9 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_windows-69a00ae9
:END: :END:
To change window focus, you can use one of the following shortcuts: To change window focus, you can use one of the following shortcuts:
#+NAME: window-focus-sh #+NAME: window-focus-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -365,9 +365,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Focus workspaces *** Focus workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_workspaces-9f4bee74 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_workspaces-9f4bee74
:END: :END:
Just like windows, it is also possible to change focus between workspaces, because lets be honest, most people wont have ten screens to display all ten workspaces at the same time, and frankly that would be impractical. Just like windows, it is also possible to change focus between workspaces, because lets be honest, most people wont have ten screens to display all ten workspaces at the same time, and frankly that would be impractical.
#+NAME: ws-focus-sh #+NAME: ws-focus-sh
| shortcut | window | what it does | | shortcut | window | what it does |
@ -389,9 +389,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Moving windows *** Moving windows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_windows-d8c90ac2 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_windows-d8c90ac2
:END: :END:
To move windows, a couple of shortcuts are available: To move windows, a couple of shortcuts are available:
#+NAME: window-move-sh #+NAME: window-move-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -407,9 +407,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Moving containers *** Moving containers
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_containers-b97cf4ae :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_containers-b97cf4ae
:END: :END:
To move containers between the available screens, you have the following shortcuts: To move containers between the available screens, you have the following shortcuts:
#+NAME: containers-move-sh #+NAME: containers-move-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -441,9 +441,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Moving workspaces *** Moving workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_workspaces-a71d7b54 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_workspaces-a71d7b54
:END: :END:
It is also possible to move workspaces. The related shortcuts available are the following: It is also possible to move workspaces. The related shortcuts available are the following:
@ -461,9 +461,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Close windows *** Close windows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Close_windows-5e521a48 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Close_windows-5e521a48
:END: :END:
To close windows, we have two main shortcuts: Alt+F4 and mod+q. The first one is here due to habits, but I dont really use it anymore due to my main keyboard which doesnt have any easy access to the functions keys, hence mod+q. To close windows, we have two main shortcuts: Alt+F4 and mod+q. The first one is here due to habits, but I dont really use it anymore due to my main keyboard which doesnt have any easy access to the functions keys, hence mod+q.
#+NAME: close-win-sh #+NAME: close-win-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -477,9 +477,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Manage the size of the current window *** Manage the size of the current window
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_the_size_of_the_current_window-11afa914 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_the_size_of_the_current_window-11afa914
:END: :END:
It is possible to change the size of the current window, even if it is a floating one. The first shortcut that might interest you is $mod+f which switches your current window to fullscreen. But to resize a window, you will need to enter the ~resize~ mode. It is possible to change the size of the current window, even if it is a floating one. The first shortcut that might interest you is $mod+f which switches your current window to fullscreen. But to resize a window, you will need to enter the ~resize~ mode.
#+NAME: size-win-sh #+NAME: size-win-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -519,9 +519,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Manage floating windows *** Manage floating windows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_floating_windows-9206f4da :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_floating_windows-9206f4da
:END: :END:
As said above, your windows can be floating windows instead of being tiled like they are by default. For this too we have a couple of shortcuts: As said above, your windows can be floating windows instead of being tiled like they are by default. For this too we have a couple of shortcuts:
#+NAME: float-win-sh #+NAME: float-win-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -537,9 +537,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Scratchpad and window display *** Scratchpad and window display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Scratchpad_and_window_display-10d8d1f4 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Scratchpad_and_window_display-10d8d1f4
:END: :END:
You can think of i3s scratchpad as some sort of extra workspace in which you can hide your windows you are not using, or as if you want to reduce a window to the taskbar of other window managers or desktop environments. You have basically two shortcuts for the scratchpad: one that sends the current window to the scratchpad, and one that cicles through the windows sent to the scratchpad and shows them to you sequencially. If you go through all of them, they will be hidden again. You can get a window out of the scratchpad by tiling it to the current workspace with the shortcut described above. You can think of i3s scratchpad as some sort of extra workspace in which you can hide your windows you are not using, or as if you want to reduce a window to the taskbar of other window managers or desktop environments. You have basically two shortcuts for the scratchpad: one that sends the current window to the scratchpad, and one that cicles through the windows sent to the scratchpad and shows them to you sequencially. If you go through all of them, they will be hidden again. You can get a window out of the scratchpad by tiling it to the current workspace with the shortcut described above.
You also have the possibility of making a floating window a sticky window. This means not only will it show on all workspaces, it will also be on top of every other window. It can be useful if you have some notes you want to keep an eye on for instance. You also have the possibility of making a floating window a sticky window. This means not only will it show on all workspaces, it will also be on top of every other window. It can be useful if you have some notes you want to keep an eye on for instance.
@ -556,9 +556,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Gaps management *** Gaps management
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Gaps_management-33979213 :CUSTOM_ID: Shortcuts-Window_and_workspace_management-Gaps_management-33979213
:END: :END:
It is possible to dynamically change the gaps between containers if we want to change a bit the appearance of i3. For that, we obviously have some shortcuts. It is possible to dynamically change the gaps between containers if we want to change a bit the appearance of i3. For that, we obviously have some shortcuts.
#+NAME: gaps-resize-sh #+NAME: gaps-resize-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -575,15 +575,15 @@ Here is the corresponding configuration:
#+END_SRC #+END_SRC
** Launching software ** Launching software
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-0e088e69 :CUSTOM_ID: Shortcuts-Launching_software-0e088e69
:END: :END:
A big part of my i3 shortcuts though are related to launching various software. Ill try to sort them by category here, but do take a look even at categories which you might not be interested in, they might actually have something useful for you. A big part of my i3 shortcuts though are related to launching various software. Ill try to sort them by category here, but do take a look even at categories which you might not be interested in, they might actually have something useful for you.
*** Software and command launcher *** Software and command launcher
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Software_and_command_launcher-a3f5863e :CUSTOM_ID: Shortcuts-Launching_software-Software_and_command_launcher-a3f5863e
:END: :END:
These commands will allow the user to launch applications which provide ~.desktop~ files or user-defined ~.desktop~ files, as well as commands with the help of rofi. These commands will allow the user to launch applications which provide ~.desktop~ files or user-defined ~.desktop~ files, as well as commands with the help of rofi.
#+NAME: launcher-sh #+NAME: launcher-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -597,9 +597,9 @@ Here is the configuration:
#+END_SRC #+END_SRC
*** Internet software *** Internet software
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Internet_software-a0524cd8 :CUSTOM_ID: Shortcuts-Launching_software-Internet_software-a0524cd8
:END: :END:
I have a couple of Internet-related software I can launch easily. I have a couple of Internet-related software I can launch easily.
#+NAME: internet-sh #+NAME: internet-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -614,9 +614,9 @@ Hence this configuration:
#+END_SRC #+END_SRC
*** Screenshots *** Screenshots
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Screenshots-41e41c88 :CUSTOM_ID: Shortcuts-Launching_software-Screenshots-41e41c88
:END: :END:
A couple of shortcuts are available for taking screenshots. A couple of shortcuts are available for taking screenshots.
#+NAME: screenshot-sh #+NAME: screenshot-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -631,9 +631,9 @@ This gives us this configuration:
#+END_SRC #+END_SRC
*** Screen brightness *** Screen brightness
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Screen_brightness-6855d53f :CUSTOM_ID: Shortcuts-Launching_software-Screen_brightness-6855d53f
:END: :END:
Here we have four commands for managing our screens brightness (this is useful for laptops, not so much with desktops), and two of them are actually duplicates of the other two in case a laptop doesnt have dedicated keys or we are using a keyboard which doesnt provide them. Here we have four commands for managing our screens brightness (this is useful for laptops, not so much with desktops), and two of them are actually duplicates of the other two in case a laptop doesnt have dedicated keys or we are using a keyboard which doesnt provide them.
#+NAME: brightness-sh #+NAME: brightness-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -649,9 +649,9 @@ This gives us this configuration:
#+END_SRC #+END_SRC
*** Media control *** Media control
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Media_control-18ad2815 :CUSTOM_ID: Shortcuts-Launching_software-Media_control-18ad2815
:END: :END:
Some shortcuts are dedicated to media control, especially when it comes to controlling music. All of these media control shortcuts will be calls to ~mpc~ which will in turn send commands to ~mpd~, which is the music server I use on my computers. Some shortcuts are dedicated to media control, especially when it comes to controlling music. All of these media control shortcuts will be calls to ~mpc~ which will in turn send commands to ~mpd~, which is the music server I use on my computers.
#+NAME: media-sh #+NAME: media-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -695,9 +695,9 @@ This gives us this configuration:
#+END_SRC #+END_SRC
*** Rofi utilities *** Rofi utilities
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Rofi_utilities-b8eb5b95 :CUSTOM_ID: Shortcuts-Launching_software-Rofi_utilities-b8eb5b95
:END: :END:
We also have some utilities Ive written and which are interfaced with rofi. Here are said shortcuts. We also have some utilities Ive written and which are interfaced with rofi. Here are said shortcuts.
#+NAME: rofi-sh #+NAME: rofi-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -716,9 +716,9 @@ This gives us the following configuration:
#+END_SRC #+END_SRC
*** Miscellaneous *** Miscellaneous
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Miscellaneous-7ec80fea :CUSTOM_ID: Shortcuts-Launching_software-Miscellaneous-7ec80fea
:END: :END:
And last but not least, I have some other shortcuts for various software, some of them which I use quite a lot like the shortcut for launching Emacs. And last but not least, I have some other shortcuts for various software, some of them which I use quite a lot like the shortcut for launching Emacs.
#+NAME: misc-sh #+NAME: misc-sh
| shortcut | command | what it does | | shortcut | command | what it does |
@ -734,9 +734,9 @@ This gives us the following configuration:
#+END_SRC #+END_SRC
*** Screen management *** Screen management
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shortcuts-Launching_software-Screen_management-f9b35bf2 :CUSTOM_ID: Shortcuts-Launching_software-Screen_management-f9b35bf2
:END: :END:
Additionally, we have a shortcut for entering presentation mode on the additional screen of the computer; on my main computer, Mila, the additional screen is HDMI-1, while it is VGA1 on my travel laptop. Well use some Emacs Lisp to determine on the configuration file export which screens names to use. Additionally, we have a shortcut for entering presentation mode on the additional screen of the computer; on my main computer, Mila, the additional screen is HDMI-1, while it is VGA1 on my travel laptop. Well use some Emacs Lisp to determine on the configuration file export which screens names to use.
#+NAME: hostname-screen-management #+NAME: hostname-screen-management
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -750,9 +750,9 @@ Now, we just have to call this Emacs Lisp code as a noweb reference and execute
#+END_SRC #+END_SRC
* Software autolaunch * Software autolaunch
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Software_autolaunch-ccee82f6 :CUSTOM_ID: Software_autolaunch-ccee82f6
:END: :END:
When i3 is launched, I want it to also launch some software automatically. Here is what we will launch: When i3 is launched, I want it to also launch some software automatically. Here is what we will launch:
#+NAME: autolaunch #+NAME: autolaunch
| always execute it? | command | what it is | | always execute it? | command | what it is |

View File

@ -6,9 +6,9 @@
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the dotfiles of Phundrak" /> #+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the dotfiles of Phundrak" />
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Presentation-981f2f04 :CUSTOM_ID: Presentation-981f2f04
:END: :END:
This is my collection of dotfiles for my daily GNU/Linux environment, tweaked to my liking. If you wish to get the same setup as mine, follow the instructions below. This is my collection of dotfiles for my daily GNU/Linux environment, tweaked to my liking. If you wish to get the same setup as mine, follow the instructions below.
For starters, here is the link to all the pages on my website that you might find interesting. Ill describe them in more details below. For starters, here is the link to all the pages on my website that you might find interesting. Ill describe them in more details below.
@ -33,9 +33,9 @@ When it comes to my graphical UI, I do not have any desktop environment. Instead
Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://configure.ergodox-ez.com/ergodox-ez/layouts/5WrVw/latest/0][here]]. It is optimized for usage with the Bépo layout set as a software layout, and for shortcuts from i3. Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://configure.ergodox-ez.com/ergodox-ez/layouts/5WrVw/latest/0][here]]. It is optimized for usage with the Bépo layout set as a software layout, and for shortcuts from i3.
* Screenshots * Screenshots
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Screenshots-51f1cef3 :CUSTOM_ID: Screenshots-51f1cef3
:END: :END:
#+CAPTION: Desktop with Neofetch in the terminal #+CAPTION: Desktop with Neofetch in the terminal
[[./img/neofetch.png.webp]] [[./img/neofetch.png.webp]]
@ -46,9 +46,9 @@ Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://confi
[[./img/rofi.png.webp]] [[./img/rofi.png.webp]]
* Features * Features
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-5ab2a2c0 :CUSTOM_ID: Features-5ab2a2c0
:END: :END:
- Emacs configuration perfectly tailored for my own use - Emacs configuration perfectly tailored for my own use
- Beautiful and comfy i3 and polybar configuration - Beautiful and comfy i3 and polybar configuration
- And enough information below to get basically the same distro install as I have on my main computer and my travel laptop. - And enough information below to get basically the same distro install as I have on my main computer and my travel laptop.
@ -56,44 +56,44 @@ Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://confi
Most of the org files you will find in this repos are the actual source code of much of my config files. For instance, the bootstrap found in [[file:installation.org][installation.org]] exports almost all of its code snippets to [[file:.config/yadm/bootstrap][.config/yadm/bootstrap]] thanks to =M-x org-babel-tangle= from within Emacs. Below I will also present and comment some of my short config files which do not deserve to have a full org file dedicated to them. Most of the org files you will find in this repos are the actual source code of much of my config files. For instance, the bootstrap found in [[file:installation.org][installation.org]] exports almost all of its code snippets to [[file:.config/yadm/bootstrap][.config/yadm/bootstrap]] thanks to =M-x org-babel-tangle= from within Emacs. Below I will also present and comment some of my short config files which do not deserve to have a full org file dedicated to them.
** Tiling Window Managers ** Tiling Window Managers
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Tiling_Window_Managers-da221e37 :CUSTOM_ID: Features-Tiling_Window_Managers-da221e37
:END: :END:
*** AwesomeWM *** AwesomeWM
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Tiling_Window_Managers-AwesomeWM-2eac61a9 :CUSTOM_ID: Features-Tiling_Window_Managers-AwesomeWM-2eac61a9
:END: :END:
AwesomeWM is the TWM I use the most on my computer between itself and i3. My configuration for it is documented in detail in its corresponding document, which you can find [[file:awesome.org][here]]. AwesomeWM is the TWM I use the most on my computer between itself and i3. My configuration for it is documented in detail in its corresponding document, which you can find [[file:awesome.org][here]].
*** i3 configuration (Deprecated) *** i3 configuration (Deprecated)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Tiling_Window_Managers-i3_configuration-9c92e43c :CUSTOM_ID: Features-Tiling_Window_Managers-i3_configuration-9c92e43c
:END: :END:
The i3 configuration is detailed in its corresponding README which you can find [[file:i3.org][here]]. Be aware I do not use i3 anymore, and I will not update it until I may someday use it again. This was deprecated on August 22nd, 2020. The i3 configuration is detailed in its corresponding README which you can find [[file:i3.org][here]]. Be aware I do not use i3 anymore, and I will not update it until I may someday use it again. This was deprecated on August 22nd, 2020.
** Polybar config (Deprecated) ** Polybar config (Deprecated)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Polybar_config_(Deprecated)-c8f95774 :CUSTOM_ID: Features-Polybar_config_(Deprecated)-c8f95774
:END: :END:
My annotated polybar config can be found [[file:polybar.org][here]], if you wish to use it. Be aware I do not use polybar anymore, and I will not update it until I may someday use it again. This was deprecated on August 22nd, 2020. My annotated polybar config can be found [[file:polybar.org][here]], if you wish to use it. Be aware I do not use polybar anymore, and I will not update it until I may someday use it again. This was deprecated on August 22nd, 2020.
** Graphical tweaks ** Graphical tweaks
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Graphical_tweaks-9879f6b0 :CUSTOM_ID: Features-Graphical_tweaks-9879f6b0
:END: :END:
*** GTK Settings *** GTK Settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-752e9916 :CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-752e9916
:END: :END:
**** GTK2 **** GTK2
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-74c9de24 :CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-74c9de24
:END: :END:
***** General configuration ***** General configuration
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.gtkrc-2.0 :HEADER-ARGS: :mkdirp yes :tangle ~/.gtkrc-2.0
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-General_configuration-eb1f1f3c :CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-General_configuration-eb1f1f3c
:END: :END:
This file is tangled at ~$HOME/.gtkrc-2.0~. This is an equivalent for the GTK3 configuration file you will see below, and it shares most of its settings. First, lets select the Nordic theme for GTK2. Lets also set the icon theme. This file is tangled at ~$HOME/.gtkrc-2.0~. This is an equivalent for the GTK3 configuration file you will see below, and it shares most of its settings. First, lets select the Nordic theme for GTK2. Lets also set the icon theme.
#+BEGIN_SRC conf-unix #+BEGIN_SRC conf-unix
# -*- mode: unix-config -*- # -*- mode: unix-config -*-
@ -116,10 +116,10 @@ This changes the shortcuts in menu, lets also make the menus snappier.
#+END_SRC #+END_SRC
***** Filechooser ***** Filechooser
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-2.0/gtkfilechooser.ini :HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-2.0/gtkfilechooser.ini
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-Filechooser-389f040d :CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-Filechooser-389f040d
:END: :END:
#+BEGIN_SRC conf-unix #+BEGIN_SRC conf-unix
[Filechooser Settings] [Filechooser Settings]
#+END_SRC #+END_SRC
@ -173,10 +173,10 @@ And finally, setting our icon view scale to ~-1~ sets the icon view to the max s
#+END_SRC #+END_SRC
**** GTK3 **** GTK3
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-3.0/settings.ini :HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-3.0/settings.ini
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK3-3d6cba86 :CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK3-3d6cba86
:END: :END:
The following file helps me choosing the aspect of various GTK+ 3 software, including their theme and icons. First, lets declare the header: The following file helps me choosing the aspect of various GTK+ 3 software, including their theme and icons. First, lets declare the header:
#+BEGIN_SRC conf-unix #+BEGIN_SRC conf-unix
[Settings] [Settings]
@ -217,16 +217,16 @@ Since window decorations are handled by my WMs, I will leave this variable empty
#+END_SRC #+END_SRC
*** Picom (Compton) *** Picom (Compton)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Graphical_tweaks-Picom-b5b9a4dd :CUSTOM_ID: Features-Graphical_tweaks-Picom-b5b9a4dd
:END: :END:
Picom is a standalone compositor for Xorg, and the successor to Compton, itself successor to xcompmgr-dana, itself a fork of xcompmgr. You can find my Picom configuration [[file:picom.org][here]]. Picom is a standalone compositor for Xorg, and the successor to Compton, itself successor to xcompmgr-dana, itself a fork of xcompmgr. You can find my Picom configuration [[file:picom.org][here]].
*** Xresources *** Xresources
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code :HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code
:CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1 :CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1
:END: :END:
My Xresources file is very short. Indeed, it only contains two lines which are dedicated to my =st= terminal to set its font and shell. The font is set as follows. My Xresources file is very short. Indeed, it only contains two lines which are dedicated to my =st= terminal to set its font and shell. The font is set as follows.
#+BEGIN_SRC conf #+BEGIN_SRC conf
st.font: Fantasque Sans Mono:size=10:antialias=true st.font: Fantasque Sans Mono:size=10:antialias=true
@ -281,13 +281,13 @@ Next is the declaration of my color theme. It is based on the [[https://www.nord
#+END_SRC #+END_SRC
** Text and source code editing ** Text and source code editing
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Text_and_source_code_editing-63cc66d5 :CUSTOM_ID: Features-Text_and_source_code_editing-63cc66d5
:END: :END:
*** Emacs configuration *** Emacs configuration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Text_and_source_code_editing-Emacs_configuration-ef937102 :CUSTOM_ID: Features-Text_and_source_code_editing-Emacs_configuration-ef937102
:END: :END:
Emacs is my main text editor, which I use for almost everything. Because, you know… Emacs is my main text editor, which I use for almost everything. Because, you know…
#+begin_quote #+begin_quote
Emacs is a great operating system, it just lacks a good text editor. Emacs is a great operating system, it just lacks a good text editor.
@ -296,38 +296,38 @@ Emacs is a great operating system, it just lacks a good text editor.
You can find my Emacs config, based on Spacemacs, in my [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.spacemacs][.spacemacs]] file, and my user configuration in my [[file:emacs.org][emacs.org]] file. You can find my Emacs config, based on Spacemacs, in my [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.spacemacs][.spacemacs]] file, and my user configuration in my [[file:emacs.org][emacs.org]] file.
*** Nano (deprecated) *** Nano (deprecated)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Text_and_source_code_editing-Nano-a9d4839f :CUSTOM_ID: Features-Text_and_source_code_editing-Nano-a9d4839f
:END: :END:
Although it is a very simple piece of software, nano does offer some customization. Mine can be found in my [[file:~/org/config-website/nano.org][nano.org]] file. Be aware I do not use nano anymore, and I will not update it until I may someday use it again. This was deprecated on August 28th, 2020. Although it is a very simple piece of software, nano does offer some customization. Mine can be found in my [[file:~/org/config-website/nano.org][nano.org]] file. Be aware I do not use nano anymore, and I will not update it until I may someday use it again. This was deprecated on August 28th, 2020.
*** Rustfmt *** Rustfmt
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Text_and_source_code_editing-Rustfmt-2c4ac0b3 :CUSTOM_ID: Features-Text_and_source_code_editing-Rustfmt-2c4ac0b3
:END: :END:
You can find my Rustfmt configuration [[file:rustfmt.org][here]]. You can find my Rustfmt configuration [[file:rustfmt.org][here]].
** Custom scripts in =PATH= ** Custom scripts in =PATH=
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Custom_scripts_in_=PATH=-043e8c8e :CUSTOM_ID: Features-Custom_scripts_in_=PATH=-043e8c8e
:END: :END:
I have written some scripts that help me daily accomplish some simple tasks, like mounting and unmounting a drive or Android device, an emoji picker, a utility to set up my Wacom tablet, and so on. You can find them stored in my [[file:bin.org][bin.org]] file along with their detailed explanation in the README placed in the same folder —which is actually their source code once the org-mode file gets tangled. I have written some scripts that help me daily accomplish some simple tasks, like mounting and unmounting a drive or Android device, an emoji picker, a utility to set up my Wacom tablet, and so on. You can find them stored in my [[file:bin.org][bin.org]] file along with their detailed explanation in the README placed in the same folder —which is actually their source code once the org-mode file gets tangled.
** Fish configuration with useful abbreviations ** Fish configuration with useful abbreviations
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Fish_configuration_with_useful_abbreviations-c71ffba0 :CUSTOM_ID: Features-Fish_configuration_with_useful_abbreviations-c71ffba0
:END: :END:
You can also find in my Fish shell configuration in my [[file:~/org/config-website/fish.org][fish.org]] file, which contains my usual abbreviations. You can also find in my Fish shell configuration in my [[file:~/org/config-website/fish.org][fish.org]] file, which contains my usual abbreviations.
** And some minor configuration files ** And some minor configuration files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-And_some_minor_configuration_files-d5cec319 :CUSTOM_ID: Features-And_some_minor_configuration_files-d5cec319
:END: :END:
*** Email signature *** Email signature
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.signature :HEADER-ARGS: :mkdirp yes :tangle ~/.signature
:CUSTOM_ID: Features-And_some_minor_configuration_files-Email_signature-8c5f2218 :CUSTOM_ID: Features-And_some_minor_configuration_files-Email_signature-8c5f2218
:END: :END:
This file gets inserted automatically at the end of my emails. This file gets inserted automatically at the end of my emails.
#+BEGIN_SRC text #+BEGIN_SRC text
Lucien “Phundrak” Cartier-Tilet Lucien “Phundrak” Cartier-Tilet
@ -339,10 +339,10 @@ This file gets inserted automatically at the end of my emails.
#+END_SRC #+END_SRC
*** Global gitignore *** Global gitignore
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :mkdirp yes :tangle ~/.gitignore_global :HEADER-ARGS: :mkdirp yes :tangle ~/.gitignore_global
:CUSTOM_ID: Features-And_some_minor_configuration_files-Global_gitignore-42467108 :CUSTOM_ID: Features-And_some_minor_configuration_files-Global_gitignore-42467108
:END: :END:
Sometimes, there are some lines that always reappear in gitignores. So, instead of always adding them, let git now that some elements are to be ignored by default, hence the [[file:.gitignore_global][~/.gitignore_global]] file. First, we dont want nanos backup files. Sometimes, there are some lines that always reappear in gitignores. So, instead of always adding them, let git now that some elements are to be ignored by default, hence the [[file:.gitignore_global][~/.gitignore_global]] file. First, we dont want nanos backup files.
#+BEGIN_SRC text #+BEGIN_SRC text
~* ~*
@ -355,15 +355,15 @@ And object files and output binaries generated by =gcc= and the likes arent w
#+END_SRC #+END_SRC
** Tmux configuration ** Tmux configuration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Features-Tmux_configuration-ce76e030 :CUSTOM_ID: Features-Tmux_configuration-ce76e030
:END: :END:
You can find my tmux configuration in [[file:tmux.org][tmux.org]]. It depends on the submodule [[https://github.com/gpakosz/.tmux.git][.tmux]] by [[https://pempek.net/][Gregory Pakosz]]. You can find my tmux configuration in [[file:tmux.org][tmux.org]]. It depends on the submodule [[https://github.com/gpakosz/.tmux.git][.tmux]] by [[https://pempek.net/][Gregory Pakosz]].
* Dependencies * Dependencies
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Dependencies-ef5057dd :CUSTOM_ID: Dependencies-ef5057dd
:END: :END:
Of course, some dependencies are needed for my dotfiles to work well. Here is a non-exhaustive list of software needed by these configuration files: Of course, some dependencies are needed for my dotfiles to work well. Here is a non-exhaustive list of software needed by these configuration files:
- [[https://www.gnu.org/software/emacs/][GNU/Emacs]] >= 26.2 - [[https://www.gnu.org/software/emacs/][GNU/Emacs]] >= 26.2
- [[http://spacemacs.org][Spacemacs]] (develop branch) - [[http://spacemacs.org][Spacemacs]] (develop branch)
@ -384,13 +384,13 @@ And some other stuff scattered around in my dotfiles.
BTW, I use Arch. BTW, I use Arch.
* Installation * Installation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Installation-9ec2ae86 :CUSTOM_ID: Installation-9ec2ae86
:END: :END:
For an installation walkthrough of my Arch Linux installation, check out my [[file:installation.org][installation.org]] file where I walk you through the first manual steps and through the bootstrap you can execute to automatically take care of a lot of elements. For an installation walkthrough of my Arch Linux installation, check out my [[file:installation.org][installation.org]] file where I walk you through the first manual steps and through the bootstrap you can execute to automatically take care of a lot of elements.
* Licence * Licence
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Licence-48911096 :CUSTOM_ID: Licence-48911096
:END: :END:
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3 Licence. Please consult [[file:LICENCE.md]] for more information. In short: you are free to access, edit and redistribute all of my dotfiles under the same licence and as allowed by the licence, and if you fuck up something, its your own responsibility. All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3 Licence. Please consult [[file:LICENCE.md]] for more information. In short: you are free to access, edit and redistribute all of my dotfiles under the same licence and as allowed by the licence, and if you fuck up something, its your own responsibility.

View File

@ -10,15 +10,15 @@
#+PROPERTY: header-args:emacs-lisp :exports none :noweb yes :tangle no :cache yes #+PROPERTY: header-args:emacs-lisp :exports none :noweb yes :tangle no :cache yes
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-cd5792cd :CUSTOM_ID: Introduction-cd5792cd
:END: :END:
Here will be presented what I do to get my system up and running on a fresh Arch Linux install. These installation instructions were written in order to get an Arch Linux distribution up and running with the same configuration as my main computers and my travelling laptops configuration. Here will be presented what I do to get my system up and running on a fresh Arch Linux install. These installation instructions were written in order to get an Arch Linux distribution up and running with the same configuration as my main computers and my travelling laptops configuration.
* Install Arch Linux * Install Arch Linux
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Install_Arch_Linux-ac7ad3b2 :CUSTOM_ID: Install_Arch_Linux-ac7ad3b2
:END: :END:
I usually install Arch from the [[https://www.archlinux.org/download/][vanilla ISO]], however I began using [[https://github.com/MatMoul/archfi][archfi]] to install easily the distro (Ive done it so many times, I know how it works now). Usually, my distros will be installed on two partitions: ~/home~ and ~/~ (root). I usually install Arch from the [[https://www.archlinux.org/download/][vanilla ISO]], however I began using [[https://github.com/MatMoul/archfi][archfi]] to install easily the distro (Ive done it so many times, I know how it works now). Usually, my distros will be installed on two partitions: ~/home~ and ~/~ (root).
If the computer supports EFI bootloaders, the EFI partition will be mounted on ~/boot/efi~. I generally use ~systemd-boot~ as my boot manager, but if you are more comfortable with another one, just install what you want. Be aware that if you format your ~/boot~ partition, you will delete all boot managers that already exist; so, if you are dual-booting, *DO NOT FORMAT IT*. Yes, I made the mistake of wiping the Windows boot manager when I used to dual-boot. If the computer supports EFI bootloaders, the EFI partition will be mounted on ~/boot/efi~. I generally use ~systemd-boot~ as my boot manager, but if you are more comfortable with another one, just install what you want. Be aware that if you format your ~/boot~ partition, you will delete all boot managers that already exist; so, if you are dual-booting, *DO NOT FORMAT IT*. Yes, I made the mistake of wiping the Windows boot manager when I used to dual-boot.
@ -26,9 +26,9 @@ If the computer supports EFI bootloaders, the EFI partition will be mounted on ~
In order to use the ~suspend-then-hibernate~ systemd command, it is necessary to have a swap partition at least twice the size of your installed RAM. That is because when this command will be run, the system will try to save the current state of your machine, stored in your RAM, to the swap filesystem. If there is not enough space, the command will fail, and you wont be able to use this command. For instance, my current computer has 32GB of RAM, hence my SWAP partition is 16GB large. In order to use the ~suspend-then-hibernate~ systemd command, it is necessary to have a swap partition at least twice the size of your installed RAM. That is because when this command will be run, the system will try to save the current state of your machine, stored in your RAM, to the swap filesystem. If there is not enough space, the command will fail, and you wont be able to use this command. For instance, my current computer has 32GB of RAM, hence my SWAP partition is 16GB large.
** Get the latest, fastest mirrors ** Get the latest, fastest mirrors
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Install_Arch_Linux-Get_the_latest_fastest_mirrors-765401c9 :CUSTOM_ID: Install_Arch_Linux-Get_the_latest_fastest_mirrors-765401c9
:END: :END:
When you boot into the live ISO, execute the following command: When you boot into the live ISO, execute the following command:
#+BEGIN_SRC sh #+BEGIN_SRC sh
pacman -Sy reflector pacman -Sy reflector
@ -39,9 +39,9 @@ When you boot into the live ISO, execute the following command:
This will update the packages from your live ISO, and you will get the best mirrors for your installation. Of course, change the countries accordingly to your location. In my case, I am only interested in French, German, and Belgian mirrors. This will update the packages from your live ISO, and you will get the best mirrors for your installation. Of course, change the countries accordingly to your location. In my case, I am only interested in French, German, and Belgian mirrors.
** Install the system ** Install the system
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Install_Arch_Linux-Install_the_system-3ff49aa6 :CUSTOM_ID: Install_Arch_Linux-Install_the_system-3ff49aa6
:END: :END:
Then you can use a custom script to ease your installation of Arch if you do not wish to do it manually. Personally, Ive done it several times already, I know how the distro works, I just want to be able to install my distro quickly now. Ill need to download the script with ~wget~, but apparently it isnt installed by default on Arch ISOs anymore, so Ill need to install it. Then you can use a custom script to ease your installation of Arch if you do not wish to do it manually. Personally, Ive done it several times already, I know how the distro works, I just want to be able to install my distro quickly now. Ill need to download the script with ~wget~, but apparently it isnt installed by default on Arch ISOs anymore, so Ill need to install it.
#+BEGIN_SRC sh #+BEGIN_SRC sh
pacman -S wget pacman -S wget
@ -59,10 +59,10 @@ Then, follow the instructions and install Arch Linux. Take the opportunity to in
Once your system is installed, reboot and remove your installation media from your computer. Once your system is installed, reboot and remove your installation media from your computer.
* Execute bootstrap * Execute bootstrap
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes :HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
:CUSTOM_ID: Execute_bootstrap-e37054ef :CUSTOM_ID: Execute_bootstrap-e37054ef
:END: :END:
With the installation of Arch with ~archfi~, I will have [[https://github.com/Jguer/yay][yay]], an AUR helper, installed. This will allow me to have some basic packages installed in order to run the bootstrap described below. So, lets install ~fish~ (our shell running the script), ~git~, and my dotfiles manager ~yadm~. With the installation of Arch with ~archfi~, I will have [[https://github.com/Jguer/yay][yay]], an AUR helper, installed. This will allow me to have some basic packages installed in order to run the bootstrap described below. So, lets install ~fish~ (our shell running the script), ~git~, and my dotfiles manager ~yadm~.
#+BEGIN_SRC sh #+BEGIN_SRC sh
yay -Sy fish git yadm yay -Sy fish git yadm
@ -78,9 +78,9 @@ With the installation of Arch with ~archfi~, I will have [[https://github.com/Jg
Lets take a look at what it does. Lets take a look at what it does.
** Decrypt private yadm files ** Decrypt private yadm files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Decrypt_private_yadm_files-68af7157 :CUSTOM_ID: Execute_bootstrap-Decrypt_private_yadm_files-68af7157
:END: :END:
Some private files are stored encrypted in the repository of my yadm dotfiles. I will need them later on during the bootstrap execution. Some private files are stored encrypted in the repository of my yadm dotfiles. I will need them later on during the bootstrap execution.
#+BEGIN_SRC fish #+BEGIN_SRC fish
if test "$USER" = 'phundrak' if test "$USER" = 'phundrak'
@ -91,9 +91,9 @@ Some private files are stored encrypted in the repository of my yadm dotfiles. I
#+END_SRC #+END_SRC
** Get a correct keyboard layout ** Get a correct keyboard layout
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Get_a_correct_keyboard_layout-77d24b30 :CUSTOM_ID: Execute_bootstrap-Get_a_correct_keyboard_layout-77d24b30
:END: :END:
I use mainly the [[https://bepo.fr/wiki/Accueil][bépo]] layout, a French keyboard layout inspired by Dvorak layouts, however I sometimes need to switch back to the standard French AZERTY or the American QWERTY layout, so I make it so the Menu key switches for me my layout between these three. This makes it so my xorg configuration of my keyboard looks like this: I use mainly the [[https://bepo.fr/wiki/Accueil][bépo]] layout, a French keyboard layout inspired by Dvorak layouts, however I sometimes need to switch back to the standard French AZERTY or the American QWERTY layout, so I make it so the Menu key switches for me my layout between these three. This makes it so my xorg configuration of my keyboard looks like this:
#+BEGIN_SRC fish #+BEGIN_SRC fish
set keyboardconf \ set keyboardconf \
@ -117,9 +117,9 @@ So, lets ask the user if they want to set it as their keyboard configuration.
#+END_SRC #+END_SRC
** Set our locale ** Set our locale
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_our_locale-e74d772a :CUSTOM_ID: Execute_bootstrap-Set_our_locale-e74d772a
:END: :END:
I use two main locales, the French and US UTF-8 locales, and I like to keep the Japanese locale activated just in case. I use two main locales, the French and US UTF-8 locales, and I like to keep the Japanese locale activated just in case.
#+BEGIN_SRC fish #+BEGIN_SRC fish
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8" set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
@ -167,9 +167,9 @@ Now we can generate our locale!
#+END_SRC #+END_SRC
** Create some folders ** Create some folders
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Create_some_folders-bf701387 :CUSTOM_ID: Execute_bootstrap-Create_some_folders-bf701387
:END: :END:
Lets create some folders we might need for mounting our drives, Android devices and CDs. Lets create some folders we might need for mounting our drives, Android devices and CDs.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Create directories for mounting #############################################\n\n" printf "\n# Create directories for mounting #############################################\n\n"
@ -178,9 +178,9 @@ Lets create some folders we might need for mounting our drives, Android devic
#+END_SRC #+END_SRC
** Set users shell to fish ** Set users shell to fish
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_users_shell_to_fish-1a794be2 :CUSTOM_ID: Execute_bootstrap-Set_users_shell_to_fish-1a794be2
:END: :END:
First of all, the bootstrap shell will set the users shell to fish. First of all, the bootstrap shell will set the users shell to fish.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Set fish as the default shell ###############################################\n\n" printf "\n# Set fish as the default shell ###############################################\n\n"
@ -191,9 +191,9 @@ First of all, the bootstrap shell will set the users shell to fish.
#+END_SRC #+END_SRC
** Install basic packages ** Install basic packages
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_basic_packages-17173316 :CUSTOM_ID: Execute_bootstrap-Install_basic_packages-17173316
:END: :END:
Lets set in a custom varible what packages well be needing. Lets set in a custom varible what packages well be needing.
#+BEGIN_SRC fish #+BEGIN_SRC fish
set PACKAGES \ set PACKAGES \
@ -242,9 +242,9 @@ These are the minimum I would have in my own installation. You can edit it howev
#+END_SRC #+END_SRC
** Tangle configuration files from Org files ** Tangle configuration files from Org files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Tangle_configuration_files_from_Org_files-cc524361 :CUSTOM_ID: Execute_bootstrap-Tangle_configuration_files_from_Org_files-cc524361
:END: :END:
Before tangling our configuration files, we need to create some directories first so our files can be properly tangled. Heres the list of directories we need to create: Before tangling our configuration files, we need to create some directories first so our files can be properly tangled. Heres the list of directories we need to create:
#+NAME: dirs-tangled-files #+NAME: dirs-tangled-files
| $HOME/.config/awesome | | $HOME/.config/awesome |
@ -361,9 +361,9 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
#+END_SRC #+END_SRC
** Setting up Emacs: Installing Spacemacs ** Setting up Emacs: Installing Spacemacs
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Setting_up_Emacs:_Installing_Spacemacs-0b3d44b2 :CUSTOM_ID: Execute_bootstrap-Setting_up_Emacs:_Installing_Spacemacs-0b3d44b2
:END: :END:
Now, the first thing we want to do with Emacs is install its Spacemacs distribution. Well clone its =develop= branch into =~/.config/emacs=. We need to do this prior to our dotfiles cloning because of some submodules that are cloned within our =~/.config/emacs= directory, and git wont let us clone Spacemacs in an already existing and non-empty directory. To make sure it isnt one, lets delete any potentially existing =~/.config/emacs= directory: Now, the first thing we want to do with Emacs is install its Spacemacs distribution. Well clone its =develop= branch into =~/.config/emacs=. We need to do this prior to our dotfiles cloning because of some submodules that are cloned within our =~/.config/emacs= directory, and git wont let us clone Spacemacs in an already existing and non-empty directory. To make sure it isnt one, lets delete any potentially existing =~/.config/emacs= directory:
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Installing Spacemacs ########################################################\n\n" printf "\n# Installing Spacemacs ########################################################\n\n"
@ -381,13 +381,13 @@ And we can restore what might have been deleted in our =~/.emacs.d/private= dire
#+END_SRC #+END_SRC
** Set up dotfiles git repository ** Set up dotfiles git repository
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9 :CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9
:END: :END:
*** Update our dotfiles remotes *** Update our dotfiles remotes
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_dotfiles_remotes-5a0fe6f7 :CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_dotfiles_remotes-5a0fe6f7
:END: :END:
This line in the bootstrap script will test if the current user is using my username. If yes, its probably me. This line in the bootstrap script will test if the current user is using my username. If yes, its probably me.
#+BEGIN_SRC fish #+BEGIN_SRC fish
if test "$USER" = 'phundrak' if test "$USER" = 'phundrak'
@ -412,9 +412,9 @@ Finally, lets close this ~if~ statement.
#+END_SRC #+END_SRC
*** Update our submodules *** Update our submodules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_submodules-3e921579 :CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_submodules-3e921579
:END: :END:
Now we can download the various dependencies of our dotfiles. To do so, lets run the following command: Now we can download the various dependencies of our dotfiles. To do so, lets run the following command:
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Getting yadm susbmodules ####################################################\n\n" printf "\n# Getting yadm susbmodules ####################################################\n\n"
@ -422,15 +422,15 @@ Now we can download the various dependencies of our dotfiles. To do so, lets
#+END_SRC #+END_SRC
** Enable some services ** Enable some services
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-3d38d98e :CUSTOM_ID: Execute_bootstrap-Enable_some_services-3d38d98e
:END: :END:
We have installed some packages which require some services to run. Lets enable them. We have installed some packages which require some services to run. Lets enable them.
*** Systemd-timesyncd *** Systemd-timesyncd
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Systemd-timesyncd-d887e45b :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Systemd-timesyncd-d887e45b
:END: :END:
This service enables time syncing with the NTP protocol, so I can be sure my computers time is correct. The service first needs to be enabled: This service enables time syncing with the NTP protocol, so I can be sure my computers time is correct. The service first needs to be enabled:
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Enabling timesync ###########################################################\n\n" printf "\n# Enabling timesync ###########################################################\n\n"
@ -443,9 +443,9 @@ Now, let systemd know I want to use the NTP protocol to keep my computers tim
#+END_SRC #+END_SRC
*** Docker *** Docker
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309
:END: :END:
First, lets activate Docker on startup. First, lets activate Docker on startup.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Enabling and starting Docker ################################################\n\n" printf "\n# Enabling and starting Docker ################################################\n\n"
@ -461,9 +461,9 @@ Now, if we wish it, we can be added to the =docker= group so we wont have to
#+END_SRC #+END_SRC
*** Emacs *** Emacs
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Emacs-c7785c21 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Emacs-c7785c21
:END: :END:
Emacs will run as a user service, which means it wont be launched until we log in. However, the service wont be started immediately, I personally prefer to start a standalone instance in which installing and compiling the Emacs packages will happen, and then once that is done I will start the service. Emacs will run as a user service, which means it wont be launched until we log in. However, the service wont be started immediately, I personally prefer to start a standalone instance in which installing and compiling the Emacs packages will happen, and then once that is done I will start the service.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Enabling Emacs as user service ##############################################\n\n" printf "\n# Enabling Emacs as user service ##############################################\n\n"
@ -471,9 +471,9 @@ Emacs will run as a user service, which means it wont be launched until we lo
#+END_SRC #+END_SRC
*** Mpd *** Mpd
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7
:END: :END:
Mpd will also use as a user service in order to get rid of some lines of code in my configuration. Mpd will also use as a user service in order to get rid of some lines of code in my configuration.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Enabling Mpd as a user service ##############################################\n\n" printf "\n# Enabling Mpd as a user service ##############################################\n\n"
@ -482,9 +482,9 @@ Mpd will also use as a user service in order to get rid of some lines of code in
#+END_SRC #+END_SRC
*** SSH server *** SSH server
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997
:END: :END:
Maybe we want to activate an SSH server on our machine. If so, we can enable it. Lets ask the question. Maybe we want to activate an SSH server on our machine. If so, we can enable it. Lets ask the question.
#+BEGIN_SRC fish #+BEGIN_SRC fish
whiptail --yesno 'Do you want to activate the ssh server?' 8 50 whiptail --yesno 'Do you want to activate the ssh server?' 8 50
@ -495,9 +495,9 @@ Maybe we want to activate an SSH server on our machine. If so, we can enable it.
#+END_SRC #+END_SRC
*** Ly *** Ly
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Ly-f4b161c0 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Ly-f4b161c0
:END: :END:
Ly is a display manager based on ncurses which I find nice enough for me to use (I generally dont like using display managers). Lets enable it, and lets disable tty2 while were at it (Ly uses it to run X). Ly is a display manager based on ncurses which I find nice enough for me to use (I generally dont like using display managers). Lets enable it, and lets disable tty2 while were at it (Ly uses it to run X).
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo systemctl disable getty@tty2 sudo systemctl disable getty@tty2
@ -505,18 +505,18 @@ Ly is a display manager based on ncurses which I find nice enough for me to use
#+END_SRC #+END_SRC
*** Acpilight *** Acpilight
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
:END: :END:
~acpilight~ is our utility managing the brightness of our screen. There is actually no service to enable here, but we must ensure the user is part of the ~video~ group so we can modify the brightness of our screen without using ~sudo~. ~acpilight~ is our utility managing the brightness of our screen. There is actually no service to enable here, but we must ensure the user is part of the ~video~ group so we can modify the brightness of our screen without using ~sudo~.
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo usermod -aG video $USER sudo usermod -aG video $USER
#+END_SRC #+END_SRC
*** NordVPN *** NordVPN
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88
:END: :END:
Thanks to the AUR package ~nordvpn-bin~, I no longer have to manually maintain my VPN connections with OpenVPN. However, it requires a service that we should activate: Thanks to the AUR package ~nordvpn-bin~, I no longer have to manually maintain my VPN connections with OpenVPN. However, it requires a service that we should activate:
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo systemctl enable --now nordvpnd sudo systemctl enable --now nordvpnd
@ -528,9 +528,9 @@ Lets also set its default protocol to UDP. This will allow me to use any port
#+END_SRC #+END_SRC
** Symlink some system config files ** Symlink some system config files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175 :CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175
:END: :END:
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=. We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
#+BEGIN_SRC fish #+BEGIN_SRC fish
for f in (find ~/.etc -type f) for f in (find ~/.etc -type f)
@ -545,18 +545,18 @@ Lets also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source
#+END_SRC #+END_SRC
** Install packages from git ** Install packages from git
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-7c6a6ea4 :CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-7c6a6ea4
:END: :END:
Now, lets install some packages from git directly. Now, lets install some packages from git directly.
#+BEGIN_SRC fish #+BEGIN_SRC fish
mkdir -p ~/fromGIT mkdir -p ~/fromGIT
#+END_SRC #+END_SRC
*** Reveal.JS *** Reveal.JS
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-Reveal.JS-bb4da0bf :CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-Reveal.JS-bb4da0bf
:END: :END:
I sometimes use Reveal.JS to make presentations, and I set its location in my [[file:.spacemacs][dotspacemacs]] file to be in =~/fromGIT=, so lets clone it there. I sometimes use Reveal.JS to make presentations, and I set its location in my [[file:.spacemacs][dotspacemacs]] file to be in =~/fromGIT=, so lets clone it there.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Install Reveal.JS ###########################################################\n\n" printf "\n# Install Reveal.JS ###########################################################\n\n"
@ -565,13 +565,13 @@ I sometimes use Reveal.JS to make presentations, and I set its location in my [[
#+END_SRC #+END_SRC
** Install Rust ** Install Rust
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_Rust-1839c4d0 :CUSTOM_ID: Execute_bootstrap-Install_Rust-1839c4d0
:END: :END:
*** Install the toolchains *** Install the toolchains
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_the_toolchains-3480764a :CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_the_toolchains-3480764a
:END: :END:
When using Rust, I bounce between two toolchains, the ~stable~ toolchain and the ~nightly~ toolchain, although I try to stick with Rust Stable. To install them, I will use ~rustup~ which has already been installed previously. When using Rust, I bounce between two toolchains, the ~stable~ toolchain and the ~nightly~ toolchain, although I try to stick with Rust Stable. To install them, I will use ~rustup~ which has already been installed previously.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n" printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
@ -584,9 +584,9 @@ This will both download the stable toolchain and set it as the default one. Now
#+END_SRC #+END_SRC
*** Install some utilities *** Install some utilities
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_some_utilities-c4a7c785 :CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_some_utilities-c4a7c785
:END: :END:
Well need some utilities when developing Rust from Emacs, namely ~rustfmt~ and ~racer~. Lets install them with ~cargo~. Well need some utilities when developing Rust from Emacs, namely ~rustfmt~ and ~racer~. Lets install them with ~cargo~.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Add rust utilities ##########################################################\n\n" printf "\n# Add rust utilities ##########################################################\n\n"
@ -619,9 +619,9 @@ Here is the code to do so:
#+END_SRC #+END_SRC
** Install some python packages ** Install some python packages
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_some_python_packages-a4447a6f :CUSTOM_ID: Execute_bootstrap-Install_some_python_packages-a4447a6f
:END: :END:
Some packages will be needed from pip in order to get our Emacs setup correctly working. Some packages will be needed from pip in order to get our Emacs setup correctly working.
#+NAME: python-packages-table #+NAME: python-packages-table
| Package | Why | | Package | Why |
@ -647,9 +647,9 @@ Lets install them locally for our user.
#+END_SRC #+END_SRC
** Set up Chicken (Scheme interpreter/compiler) ** Set up Chicken (Scheme interpreter/compiler)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_Chicken_(Scheme_interpreter-compiler)-3c1a3c4a :CUSTOM_ID: Execute_bootstrap-Set_up_Chicken_(Scheme_interpreter-compiler)-3c1a3c4a
:END: :END:
Chicken needs to be set up before being used. First, we need to install its documentation. Chicken needs to be set up before being used. First, we need to install its documentation.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Setting up Chicken ##########################################################\n\n" printf "\n# Setting up Chicken ##########################################################\n\n"
@ -663,15 +663,15 @@ Then, well complete the documentation like so:
#+END_SRC #+END_SRC
** Set up our fish shell ** Set up our fish shell
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22 :CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22
:END: :END:
The last thing we want to do is to set up our fish shell with some extensions in order to improve the user experience. The last thing we want to do is to set up our fish shell with some extensions in order to improve the user experience.
*** Install ~fisher~ *** Install ~fisher~
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_=fisher=-3a44531b :CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_=fisher=-3a44531b
:END: :END:
We will be using ~fisher~ as our extensions manager for Fish. Lets install it. We will be using ~fisher~ as our extensions manager for Fish. Lets install it.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Installing fisher ###########################################################\n\n" printf "\n# Installing fisher ###########################################################\n\n"
@ -679,9 +679,9 @@ We will be using ~fisher~ as our extensions manager for Fish. Lets install it
#+END_SRC #+END_SRC
*** Install our extensions *** Install our extensions
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_our_extensions-188e4566 :CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_our_extensions-188e4566
:END: :END:
I generally use the following extensions in my Fish shell. I generally use the following extensions in my Fish shell.
#+NAME: fish-extensions-table #+NAME: fish-extensions-table
#+CAPTION: Fish extensions managed by Fisher #+CAPTION: Fish extensions managed by Fisher

View File

@ -7,17 +7,17 @@
#+PROPERTY: header-args :tangle ~/.config/nano/nanorc #+PROPERTY: header-args :tangle ~/.config/nano/nanorc
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-7e535842 :CUSTOM_ID: Introduction-7e535842
:END: :END:
*Before proceeding, be aware that I deprecated this nano config on August 28th, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.* *Before proceeding, be aware that I deprecated this nano config on August 28th, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.*
I nowadays rarely use Nano as a text editor, since I mainly rely on Emacs for all sorts of tasks, including quick file editing. However, at times, Emacs wont work or wont be available, and I therefore need a lightweight, fast and reliable text editor: Nano. And despite Nano being a simple piece of software, it does offer some customization I cannot refuse. Here is how I configured it: I nowadays rarely use Nano as a text editor, since I mainly rely on Emacs for all sorts of tasks, including quick file editing. However, at times, Emacs wont work or wont be available, and I therefore need a lightweight, fast and reliable text editor: Nano. And despite Nano being a simple piece of software, it does offer some customization I cannot refuse. Here is how I configured it:
* Configuration * Configuration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-b55668a7 :CUSTOM_ID: Configuration-b55668a7
:END: :END:
When saving a file, create a backup file by adding a tilde (=~=) to the file's name. And make and keep not just one backup file, but make and keep a uniquely numbered one every time a file is saved — when backups are enabled with =set backup= or =--backup= or =-B=. The uniquely numbered files are stored in the directory =~/.cache/nano/backups/=. When saving a file, create a backup file by adding a tilde (=~=) to the file's name. And make and keep not just one backup file, but make and keep a uniquely numbered one every time a file is saved — when backups are enabled with =set backup= or =--backup= or =-B=. The uniquely numbered files are stored in the directory =~/.cache/nano/backups/=.
#+BEGIN_SRC conf #+BEGIN_SRC conf
set backup set backup
@ -30,18 +30,18 @@ Save a file by default in Unix format. This overrides nano's default behavior of
#+END_SRC #+END_SRC
** Keys behavior ** Keys behavior
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-Keys_behavior-c665fa36 :CUSTOM_ID: Configuration-Keys_behavior-c665fa36
:END: :END:
Make the Home key smarter. When Home is pressed anywhere but at the very beginning of non-whitespace characters on a line, the cursor will jump to that beginning (either forwards or backwards). If the cursor is already at that position, it will jump to the true beginning of the line. Make the Home key smarter. When Home is pressed anywhere but at the very beginning of non-whitespace characters on a line, the cursor will jump to that beginning (either forwards or backwards). If the cursor is already at that position, it will jump to the true beginning of the line.
#+BEGIN_SRC conf #+BEGIN_SRC conf
set smarthome set smarthome
#+END_SRC #+END_SRC
** Search ** Search
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-Search-6e458076 :CUSTOM_ID: Configuration-Search-6e458076
:END: :END:
Do case-unsensitive searches by default. Do case-unsensitive searches by default.
#+BEGIN_SRC conf #+BEGIN_SRC conf
unset casesensitive unset casesensitive
@ -53,9 +53,9 @@ Do regular-expression searches by default. Regular expressions in =nano= are of
#+END_SRC #+END_SRC
** Visual settings ** Visual settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-Visual_settings-9952f2ae :CUSTOM_ID: Configuration-Visual_settings-9952f2ae
:END: :END:
Use bold instead of reverse video for the title bar, status bar, key combos, function tags, line numbers, and selected text. This can be overridden by setting the options =titlecolor=, =statuscolor=, =keycolor=, =functioncolor=, =numbercolor=, and =selectedcolor=. Use bold instead of reverse video for the title bar, status bar, key combos, function tags, line numbers, and selected text. This can be overridden by setting the options =titlecolor=, =statuscolor=, =keycolor=, =functioncolor=, =numbercolor=, and =selectedcolor=.
#+BEGIN_SRC conf #+BEGIN_SRC conf
set boldtext set boldtext
@ -82,9 +82,9 @@ Constantly display the cursor position in the status bar. This overrides the opt
#+END_SRC #+END_SRC
** Whitespace settings ** Whitespace settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-Whitespace_settings-8cef9cd7 :CUSTOM_ID: Configuration-Whitespace_settings-8cef9cd7
:END: :END:
Convert typed tabs to spaces. Sue me. Convert typed tabs to spaces. Sue me.
#+BEGIN_SRC conf #+BEGIN_SRC conf
set tabstospaces set tabstospaces
@ -106,9 +106,9 @@ set trimblanks
#+END_SRC #+END_SRC
** Included configuration file ** Included configuration file
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Configuration-Included_configuration_file-70b0f35b :CUSTOM_ID: Configuration-Included_configuration_file-70b0f35b
:END: :END:
Nano gives the opportunity to include some files located elsewhere. This is why I added [[https://github.com/scopatz/nanorc][this repo]] as a submodule of my dotfiles so I can access a lot of them at the same time. Since the submodule is cloned in =~/.config/nanorc=, we can add only one line to include all of the =.nanorc= files. Nano gives the opportunity to include some files located elsewhere. This is why I added [[https://github.com/scopatz/nanorc][this repo]] as a submodule of my dotfiles so I can access a lot of them at the same time. Since the submodule is cloned in =~/.config/nanorc=, we can add only one line to include all of the =.nanorc= files.
#+BEGIN_SRC conf #+BEGIN_SRC conf
include ~/.config/nano/nano-syntax/*.nanorc include ~/.config/nano/nano-syntax/*.nanorc

View File

@ -7,9 +7,9 @@
#+PROPERTY: header-args :tangle ~/.config/ncmpcpp/config2 :exports code #+PROPERTY: header-args :tangle ~/.config/ncmpcpp/config2 :exports code
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-3e61ecfc :CUSTOM_ID: Introduction-3e61ecfc
:END: :END:
Ncmpcpp is a TUI front-end for MPD, with an UI very similar to Ncmpc. This is Ncmpcpp is a TUI front-end for MPD, with an UI very similar to Ncmpc. This is
my main MPD front-end after my i3 shortcuts. You can find below some my main MPD front-end after my i3 shortcuts. You can find below some
screenshots of how my current ncmpcpp configuration looks like. screenshots of how my current ncmpcpp configuration looks like.
@ -21,17 +21,17 @@ screenshots of how my current ncmpcpp configuration looks like.
[[file:img/ncmpcpp-visualizer.png]] [[file:img/ncmpcpp-visualizer.png]]
* Core Ncmpcpp settings * Core Ncmpcpp settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Core_Ncmpcpp_settings-8cacae18 :CUSTOM_ID: Core_Ncmpcpp_settings-8cacae18
:END: :END:
#+BEGIN_SRC conf :exports none #+BEGIN_SRC conf :exports none
# -*- mode: conf -*- # -*- mode: conf -*-
#+END_SRC #+END_SRC
** Directories ** Directories
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Core_Ncmpcpp_settings-Directories-28092c92 :CUSTOM_ID: Core_Ncmpcpp_settings-Directories-28092c92
:END: :END:
Ncmpcpp has two vital directories: the lyrics directory, and its own configuration directory. The configuration for ncmpcpp is generally either in ~$HOME/.ncmpcpp/~ or in ~$XDG_CONFIG_HOME/ncmpcpp/~. Ncmpcpp has two vital directories: the lyrics directory, and its own configuration directory. The configuration for ncmpcpp is generally either in ~$HOME/.ncmpcpp/~ or in ~$XDG_CONFIG_HOME/ncmpcpp/~.
#+BEGIN_SRC conf #+BEGIN_SRC conf
ncmpcpp_directory = ~/.config/ncmpcpp ncmpcpp_directory = ~/.config/ncmpcpp
@ -43,9 +43,9 @@ When it comes to the lyrics, be sure to set the directory to the same directory
#+END_SRC #+END_SRC
** MPD ** MPD
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Core_Ncmpcpp_settings-MPD-a2a7452e :CUSTOM_ID: Core_Ncmpcpp_settings-MPD-a2a7452e
:END: :END:
These settings tell ncmpcpp how to communicate with Mpd. Once again, be sure to follow your own MPD settings. In my case, I am connecting to my local MPD server, hence the ~localhost~ value of the variable below, and I did not change the default port of MPD. My music is located at =~/Music=, and ncmpcpp should connect pretty much immediately, although I allow a five seconds timeout before ncmpcpp treats it as an error. Also, no crossfade please. These settings tell ncmpcpp how to communicate with Mpd. Once again, be sure to follow your own MPD settings. In my case, I am connecting to my local MPD server, hence the ~localhost~ value of the variable below, and I did not change the default port of MPD. My music is located at =~/Music=, and ncmpcpp should connect pretty much immediately, although I allow a five seconds timeout before ncmpcpp treats it as an error. Also, no crossfade please.
#+BEGIN_SRC conf #+BEGIN_SRC conf
mpd_host = localhost mpd_host = localhost

View File

@ -8,15 +8,15 @@
#+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code :noweb yes :padline no :mkdir yes :shebang "#!/usr/bin/env sh" #+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code :noweb yes :padline no :mkdir yes :shebang "#!/usr/bin/env sh"
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-5942aea3 :CUSTOM_ID: Introduction-5942aea3
:END: :END:
[[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was written in Bash, and thus its configuration file is written as a Bash script too. This document was written with org-mode, and my configuration file is tangled from the source blocks you will see below to ~~/.config/neofetch/config.conf~. This configuration will only contain what I need. For any further information, please refer to the [[https://github.com/dylanaraps/neofetch][original repository]] and [[https://github.com/dylanaraps/neofetch/wiki/Customizing-Info][its documentation]]. [[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was written in Bash, and thus its configuration file is written as a Bash script too. This document was written with org-mode, and my configuration file is tangled from the source blocks you will see below to ~~/.config/neofetch/config.conf~. This configuration will only contain what I need. For any further information, please refer to the [[https://github.com/dylanaraps/neofetch][original repository]] and [[https://github.com/dylanaraps/neofetch/wiki/Customizing-Info][its documentation]].
* The ~print_info~ functions * The ~print_info~ functions
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: The_print_info_functions-bb30763f :CUSTOM_ID: The_print_info_functions-bb30763f
:END: :END:
The ~print_info~ function is the function called by Neofetch in order to print the system information it could fetch. In this function, well choose what to display, and how. This function looks like this: The ~print_info~ function is the function called by Neofetch in order to print the system information it could fetch. In this function, well choose what to display, and how. This function looks like this:
#+BEGIN_SRC sh :tangle no #+BEGIN_SRC sh :tangle no
print_info() { print_info() {
@ -85,23 +85,23 @@ Hence, the function looks like so:
Each of these modules can be tuned with the variables presented below. Each of these modules can be tuned with the variables presented below.
* Information settings * Information settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-9d4cfe88 :CUSTOM_ID: Information_settings-9d4cfe88
:END: :END:
Each of the following variable tunes a function that can be called in ~print_info~ described above. It is possible to tune them by modifying this document or the configuration file itself, and they can be overridden by the command line with flags passed to ~neofetch~. I will divide these variables in two main categories: hardware and software-related properties. Each of the following variable tunes a function that can be called in ~print_info~ described above. It is possible to tune them by modifying this document or the configuration file itself, and they can be overridden by the command line with flags passed to ~neofetch~. I will divide these variables in two main categories: hardware and software-related properties.
** Software ** Software
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-59f4cb0f :CUSTOM_ID: Information_settings-Software-59f4cb0f
:END: :END:
*** OS *** OS
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-OS-67908fc4 :CUSTOM_ID: Information_settings-Software-OS-67908fc4
:END: :END:
**** Distro **** Distro
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-OS-Distro-cd12bc4f :CUSTOM_ID: Information_settings-Software-OS-Distro-cd12bc4f
:END: :END:
This variable can shorten the output of the ~distro~ function. This variable can shorten the output of the ~distro~ function.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -119,9 +119,9 @@ This variable can shorten the output of the ~distro~ function.
It is possible to display when the distro has been installed on the computer. It is possible to display when the distro has been installed on the computer.
**** Kernel **** Kernel
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce :CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce
:END: :END:
The variable below can shorten the output ofh the ~kernel~ function. The variable below can shorten the output ofh the ~kernel~ function.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -137,9 +137,9 @@ The variable below can shorten the output ofh the ~kernel~ function.
#+end_src #+end_src
**** OS Architecture **** OS Architecture
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-OS-OS_Architecture-2f60c93c :CUSTOM_ID: Information_settings-Software-OS-OS_Architecture-2f60c93c
:END: :END:
This variable can show or hide the OS architecture in the ~distro~ output. This variable can show or hide the OS architecture in the ~distro~ output.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::
@ -154,9 +154,9 @@ This variable can show or hide the OS architecture in the ~distro~ output.
#+end_src #+end_src
**** Packages **** Packages
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-OS-Packages-f836a58d :CUSTOM_ID: Information_settings-Software-OS-Packages-f836a58d
:END: :END:
It is possible to show or hide Package Manager names. It is possible to show or hide Package Manager names.
- Default :: ~'tiny'~ - Default :: ~'tiny'~
- Values :: ~'on'~ / ~'tiny'~ / ~'off'~ - Values :: ~'on'~ / ~'tiny'~ / ~'off'~
@ -170,13 +170,13 @@ It is possible to show or hide Package Manager names.
#+END_SRC #+END_SRC
**** Shell **** Shell
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Shell-76439406 :CUSTOM_ID: Information_settings-Software-Shell-76439406
:END: :END:
***** Shell path ***** Shell path
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Shell-Shell_path-9eda636d :CUSTOM_ID: Information_settings-Software-Shell-Shell_path-9eda636d
:END: :END:
This allows to show either the path of the users shell, or simply its name. This allows to show either the path of the users shell, or simply its name.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::
@ -191,9 +191,9 @@ This allows to show either the path of the users shell, or simply its name.
+end_src +end_src
***** Shell version ***** Shell version
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Shell-Shell_version-03964bb3 :CUSTOM_ID: Information_settings-Software-Shell-Shell_version-03964bb3
:END: :END:
This allows to show the shells version in the output of ~shell~. This allows to show the shells version in the output of ~shell~.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -208,9 +208,9 @@ This allows to show the shells version in the output of ~shell~.
#+end_src #+end_src
*** Uptime *** Uptime
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Uptime-a7b5361a :CUSTOM_ID: Information_settings-Software-Uptime-a7b5361a
:END: :END:
This variable can shorten the output of the ~uptime~ function. ~on~ shortens This variable can shorten the output of the ~uptime~ function. ~on~ shortens
it a bit, while ~tiny~ shortens it greatly. it a bit, while ~tiny~ shortens it greatly.
- Default value :: ~"on"~ - Default value :: ~"on"~
@ -228,9 +228,9 @@ it a bit, while ~tiny~ shortens it greatly.
#+end_src #+end_src
*** IP address *** IP address
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d :CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d
:END: :END:
It is possible to display the machines public IP address with the function ~ip~. The value below allows the user to change the website used to fetch it. It is possible to display the machines public IP address with the function ~ip~. The value below allows the user to change the website used to fetch it.
- Default value :: ~"http://ident.me"~ - Default value :: ~"http://ident.me"~
- Value :: ~"url"~ - Value :: ~"url"~
@ -252,15 +252,15 @@ It is possible to display the machines public IP address with the function ~i
#+end_src #+end_src
*** Theming *** Theming
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd :CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd
:END: :END:
This section will allow the user to modify what Neofetch can and cannot display about the machines theming —by this, I mean its GTK theme, its icons and its default font. This section will allow the user to modify what Neofetch can and cannot display about the machines theming —by this, I mean its GTK theme, its icons and its default font.
**** Shorten output **** Shorten output
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Theming-Shorten_output-cbef1fa4 :CUSTOM_ID: Information_settings-Software-Theming-Shorten_output-cbef1fa4
:END: :END:
With this value, it is possible to shorten the output of the computers theming. With this value, it is possible to shorten the output of the computers theming.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::
@ -275,9 +275,9 @@ With this value, it is possible to shorten the output of the computers themin
#+end_src #+end_src
**** Enable or disable theming display for GTK2 **** Enable or disable theming display for GTK2
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571 :CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571
:END: :END:
It is possible to explicitely show or hide the computers theming with GTK2 with this variable. It is possible to explicitely show or hide the computers theming with GTK2 with this variable.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -292,9 +292,9 @@ It is possible to explicitely show or hide the computers theming with GTK2 wi
#+end_src #+end_src
**** Enable or disable theming display for GTK3 **** Enable or disable theming display for GTK3
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK3-c4070e66 :CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK3-c4070e66
:END: :END:
The same variable as above is also available for GTK3. The same variable as above is also available for GTK3.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -309,17 +309,17 @@ The same variable as above is also available for GTK3.
#+end_src #+end_src
** Hardware ** Hardware
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-de7ed990 :CUSTOM_ID: Information_settings-Hardware-de7ed990
:END: :END:
*** CPU *** CPU
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-eb0bcd7d :CUSTOM_ID: Information_settings-Hardware-CPU-eb0bcd7d
:END: :END:
**** CPU brand **** CPU brand
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b
:END: :END:
With this variables, it is possible to show or hide the brand of a CPU in With this variables, it is possible to show or hide the brand of a CPU in
the ~cpu~ output. the ~cpu~ output.
- Default value :: ~"on"~ - Default value :: ~"on"~
@ -335,9 +335,9 @@ the ~cpu~ output.
#+end_src #+end_src
**** CPU speed **** CPU speed
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed-2bf6e5f7 :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed-2bf6e5f7
:END: :END:
With this variable, it is possible to show or hide the speed of the CPU. With this variable, it is possible to show or hide the speed of the CPU.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -352,9 +352,9 @@ With this variable, it is possible to show or hide the speed of the CPU.
#+end_src #+end_src
**** CPU speed type **** CPU speed type
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f
:END: :END:
This allows Neofetch to know what type of speed it has to fetch regarding the machines CPU. Any file in ~/sys/devices/system/cpu/cpu0/cpufreq~ can be used as a value. This allows Neofetch to know what type of speed it has to fetch regarding the machines CPU. Any file in ~/sys/devices/system/cpu/cpu0/cpufreq~ can be used as a value.
- Default value :: ~"bios_limit"~ - Default value :: ~"bios_limit"~
- Values :: - Values ::
@ -369,9 +369,9 @@ This allows Neofetch to know what type of speed it has to fetch regarding the ma
#+end_src #+end_src
**** CPU speed shorthand **** CPU speed shorthand
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08 :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08
:END: :END:
This value allows to show sorter CPU speed with less digits. This flag is not supported in systems with CPU speed below 1GHz. This value allows to show sorter CPU speed with less digits. This flag is not supported in systems with CPU speed below 1GHz.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::
@ -386,9 +386,9 @@ This value allows to show sorter CPU speed with less digits. This flag is not su
#+end_src #+end_src
**** CPU cores **** CPU cores
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354 :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354
:END: :END:
With this variable, it is possible to display the number of cores that are available in the CPU. With this variable, it is possible to display the number of cores that are available in the CPU.
- Default value :: ~"logical"~ - Default value :: ~"logical"~
- Values :: - Values ::
@ -406,9 +406,9 @@ With this variable, it is possible to display the number of cores that are avail
#+end_src #+end_src
**** CPU temperature **** CPU temperature
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c :CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c
:END: :END:
This variable allows the user to hide or show the CPUs temperature, and if shown, the user can display it in Celcius or Farenheit degrees. For FreeBSD and NetBSD-based systems, youll need to enable the ~coretemp~ kernel module. This only supports newer Intel processors. This variable allows the user to hide or show the CPUs temperature, and if shown, the user can display it in Celcius or Farenheit degrees. For FreeBSD and NetBSD-based systems, youll need to enable the ~coretemp~ kernel module. This only supports newer Intel processors.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::
@ -426,15 +426,15 @@ This variable allows the user to hide or show the CPUs temperature, and if sh
#+end_src #+end_src
*** GPU *** GPU
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-GPU-2c842575 :CUSTOM_ID: Information_settings-Hardware-GPU-2c842575
:END: :END:
The function responsible for displaying information regarding the GPUs is ~gpu~. It will try to list all available GPUs and display what it knows about them. The function responsible for displaying information regarding the GPUs is ~gpu~. It will try to list all available GPUs and display what it knows about them.
**** GPU brand **** GPU brand
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615 :CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615
:END: :END:
This value allows the user to hide or show the brand of their GPU in the output of ~gpu~. This value allows the user to hide or show the brand of their GPU in the output of ~gpu~.
- Default value :: ~"on"~ - Default value :: ~"on"~
- Values :: - Values ::
@ -450,9 +450,9 @@ This value allows the user to hide or show the brand of their GPU in the output
#+end_src #+end_src
**** Which GPU to display **** Which GPU to display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac :CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac
:END: :END:
This allows the user to choose which GPU appears in the output of the function ~gpu~. This allows the user to choose which GPU appears in the output of the function ~gpu~.
- Default value :: ~"all"~ - Default value :: ~"all"~
- Values :: - Values ::
@ -474,9 +474,9 @@ This allows the user to choose which GPU appears in the output of the function ~
#+end_src #+end_src
*** Resolution *** Resolution
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865 :CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865
:END: :END:
This will try to list all the connected screens and display their resolution individually. It is possible to display the refresh rate or to hide it. This will try to list all the connected screens and display their resolution individually. It is possible to display the refresh rate or to hide it.
- Default value :: ~"off"~ - Default value :: ~"off"~
- Values :: - Values ::

View File

@ -6,15 +6,15 @@
#+PROPERTY: header-args:conf :exports code :mkdirp yes :tangle ~/.config/picom/picom.conf #+PROPERTY: header-args:conf :exports code :mkdirp yes :tangle ~/.config/picom/picom.conf
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-a5320326 :CUSTOM_ID: Introduction-a5320326
:END: :END:
Picom is the successor to Compton, a standalone compositor for Xorg. It provides compositing for WM that do not provide any, such as i3. I am currently using [[https://github.com/ibhagwan/picom][ibhagwans fork of compton]] which provides the ~dual-kawase~ blur from [[https://github.com/tryone144/compton][tryones compton]] and rounded corners from [[https://github.com/sdhand/picom][sdhands compton]]. Picom is the successor to Compton, a standalone compositor for Xorg. It provides compositing for WM that do not provide any, such as i3. I am currently using [[https://github.com/ibhagwan/picom][ibhagwans fork of compton]] which provides the ~dual-kawase~ blur from [[https://github.com/tryone144/compton][tryones compton]] and rounded corners from [[https://github.com/sdhand/picom][sdhands compton]].
* Shadows * Shadows
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Shadows-f4ffbb27 :CUSTOM_ID: Shadows-f4ffbb27
:END: :END:
The following enables client-side shadows on windows. Note desktop windows (windows with ~_NET_WM_WINDOW_TYPE_DESKTOP~) never get shadow, unless explicitly requested using the wintypes option. I personally deactivated shadows because they dont work out too well with rounded corners. The following enables client-side shadows on windows. Note desktop windows (windows with ~_NET_WM_WINDOW_TYPE_DESKTOP~) never get shadow, unless explicitly requested using the wintypes option. I personally deactivated shadows because they dont work out too well with rounded corners.
#+BEGIN_SRC conf #+BEGIN_SRC conf
shadow = false; shadow = false;
@ -84,10 +84,10 @@ particular Xinerama screen to the screen.
#+END_SRC #+END_SRC
** Deprecated options ** Deprecated options
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS:conf: :tangle no :HEADER-ARGS:conf: :tangle no
:CUSTOM_ID: Shadows-Deprecated_options-da215d5a :CUSTOM_ID: Shadows-Deprecated_options-da215d5a
:END: :END:
Options in this subheader *will not* be exported to my configuration file. Options in this subheader *will not* be exported to my configuration file.
Thanks to this value, Picom can avoid drawing shadows on dock or panel windows. This option is deprecated, and users should use the ~wintypes~ option in their config file instead. Thanks to this value, Picom can avoid drawing shadows on dock or panel windows. This option is deprecated, and users should use the ~wintypes~ option in their config file instead.
@ -116,9 +116,9 @@ or
#+END_SRC #+END_SRC
* Rounded corners * Rounded corners
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Rounded_corners-33bfcd20 :CUSTOM_ID: Rounded_corners-33bfcd20
:END: :END:
A great feature added by ibhagwans fork of picom is the addition of rounded corners from sdhands fork, and the Kawase blur (described [[#Background_blurring-55835066][here]]) from tryone144s fork. Here we can see the declaration of the corners radius: A great feature added by ibhagwans fork of picom is the addition of rounded corners from sdhands fork, and the Kawase blur (described [[#Background_blurring-55835066][here]]) from tryone144s fork. Here we can see the declaration of the corners radius:
#+BEGIN_SRC conf #+BEGIN_SRC conf
corner-radius = 9.0; corner-radius = 9.0;
@ -132,9 +132,9 @@ It is also possible to exclude some windows from getting their corners rounded.
#+END_SRC #+END_SRC
* Fading * Fading
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Fading-419d8047 :CUSTOM_ID: Fading-419d8047
:END: :END:
Picom has the ability to create some fading effects on windows when opening or closing or when the opacity changes. The following parameter toggles this feature on or off. However, its behavior can be changed with ~no-fading-openclose~. Picom has the ability to create some fading effects on windows when opening or closing or when the opacity changes. The following parameter toggles this feature on or off. However, its behavior can be changed with ~no-fading-openclose~.
| Default value | ~false~ | | Default value | ~false~ |
#+BEGIN_SRC conf #+BEGIN_SRC conf
@ -176,9 +176,9 @@ Finally, this option is a workaround for Openbox, Fluxbox and others by not fadi
#+END_SRC #+END_SRC
* Transparency and opacity * Transparency and opacity
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Transparency_and_opacity-6c6b36d2 :CUSTOM_ID: Transparency_and_opacity-6c6b36d2
:END: :END:
Picom is also able to create some opacity or transparency for windows, depending on their state or on some user-defined rules. For instance, the following value describes the opacity of inactive windows. Picom is also able to create some opacity or transparency for windows, depending on their state or on some user-defined rules. For instance, the following value describes the opacity of inactive windows.
| Default value | ~1.0~ | | Default value | ~1.0~ |
| Min value | ~0.1~ | | Min value | ~0.1~ |
@ -246,9 +246,9 @@ The user can also specify a list of opacity rules, in the format ~PERCENT:PATTER
#+END_SRC #+END_SRC
* Background blurring * Background blurring
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Background_blurring-55835066 :CUSTOM_ID: Background_blurring-55835066
:END: :END:
The following are the parameters for background blurring, see the \*BLUR\* section for more information. The following are the parameters for background blurring, see the \*BLUR\* section for more information.
#+BEGIN_SRC conf #+BEGIN_SRC conf
blur: { blur: {
@ -296,9 +296,9 @@ It is possible to write exclude conditions for background blur.
]; ];
#+END_SRC #+END_SRC
* General settings * General settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: General_settings-41398de7 :CUSTOM_ID: General_settings-41398de7
:END: :END:
Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
| Default value | ~false~ | | Default value | ~false~ |
#+BEGIN_SRC conf #+BEGIN_SRC conf
@ -512,9 +512,9 @@ Following per window-type options are available:
#+END_SRC #+END_SRC
** GLX backend-specific options ** GLX backend-specific options
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: General_settings-GLX_backend-specific_options-43892981 :CUSTOM_ID: General_settings-GLX_backend-specific_options-43892981
:END: :END:
Avoid using stencil buffer, useful if you don't have a stencil buffer. Might cause incorrect opacity when rendering transparent content (but never practically happened) and may not work with blur-background. Tests show a 15% performance boost. Recommended. Avoid using stencil buffer, useful if you don't have a stencil buffer. Might cause incorrect opacity when rendering transparent content (but never practically happened) and may not work with blur-background. Tests show a 15% performance boost. Recommended.
| Default value | ~false~ | | Default value | ~false~ |
#+BEGIN_SRC conf #+BEGIN_SRC conf

View File

@ -9,9 +9,9 @@
#+PROPERTY: header-args:conf-windows :tangle ~/.config/polybar/config :noweb yes :exports code :mkdirp yes #+PROPERTY: header-args:conf-windows :tangle ~/.config/polybar/config :noweb yes :exports code :mkdirp yes
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Presentation-4e723f32 :CUSTOM_ID: Presentation-4e723f32
:END: :END:
*Before proceeding, be aware that I deprecated this polybar config on August 22nd, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.* *Before proceeding, be aware that I deprecated this polybar config on August 22nd, 2020, meaning I wont update it anymore unless I use it again some day in the future. I will keep it on my website though.*
Polybar is a desktop utility for displaying various information in form of bars for GNU/Linux systems. It is often used as a replacement for native bars available in window managers, such as i3. In my case, I use two instances of polybar in order to get two bars displayed on each screen. The information displayed is either related to i3 itself, or it is system information, such as CPU or disk usage. More information will be given and explained below. Polybar is a desktop utility for displaying various information in form of bars for GNU/Linux systems. It is often used as a replacement for native bars available in window managers, such as i3. In my case, I use two instances of polybar in order to get two bars displayed on each screen. The information displayed is either related to i3 itself, or it is system information, such as CPU or disk usage. More information will be given and explained below.
@ -23,9 +23,9 @@ Be aware that this PDF documents suffers from a couple of issues with some chara
#+END_EXPORT #+END_EXPORT
* General settings * General settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: General_settings-e02fb78c :CUSTOM_ID: General_settings-e02fb78c
:END: :END:
Some general settings are available for Polybar, and they are declared under Some general settings are available for Polybar, and they are declared under
the ~[settings]~ section. the ~[settings]~ section.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
@ -46,9 +46,9 @@ Be aware that this PDF documents suffers from a couple of issues with some chara
#+END_SRC #+END_SRC
* Colors declaration for polybar * Colors declaration for polybar
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Colors_declaration_for_polybar-75ee0b65 :CUSTOM_ID: Colors_declaration_for_polybar-75ee0b65
:END: :END:
#+BEGIN_SRC conf-windows :exports none #+BEGIN_SRC conf-windows :exports none
; -*- mode: conf-windows -*- ; -*- mode: conf-windows -*-
#+END_SRC #+END_SRC
@ -74,9 +74,9 @@ Polybar is also aware of alerts sent by window managers such as i3 when a window
#+END_SRC #+END_SRC
* Declaration of the bars * Declaration of the bars
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-a95135a3 :CUSTOM_ID: Declaration_of_the_bars-a95135a3
:END: :END:
It is possible in i3 to declare as many bars as we wish, and each of these bars will be named. Naming the bar is done in its module declaration like so: It is possible in i3 to declare as many bars as we wish, and each of these bars will be named. Naming the bar is done in its module declaration like so:
#+BEGIN_SRC conf-windows :tangle no #+BEGIN_SRC conf-windows :tangle no
[bar/nameofthebar] [bar/nameofthebar]
@ -84,18 +84,18 @@ It is possible in i3 to declare as many bars as we wish, and each of these bars
In my configuration, I use two of such bars, one atop of my screen, and one at the bottom. In my configuration, I use two of such bars, one atop of my screen, and one at the bottom.
** Top bar declaration ** Top bar declaration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-fc0cd977 :CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-fc0cd977
:END: :END:
As unimaginative as it might seem, I went for a rather explicit name for my bars. The top one is simply named ~top~, as shown below. As unimaginative as it might seem, I went for a rather explicit name for my bars. The top one is simply named ~top~, as shown below.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[bar/top] [bar/top]
#+END_SRC #+END_SRC
*** Positioning *** Positioning
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Positioning-2505760c :CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Positioning-2505760c
:END: :END:
We need to set on which screen the bar is to be displayed. Indeed, it is possible to display a bar on only one specific screen if we wish to. Actually, it is even the default behavior of polybar, but as we will see later with the launching script, it is possible to launch bars on multiple outputs at the same time. Here, we simply get the value of the variable ~monitor~ from the launch environment. We need to set on which screen the bar is to be displayed. Indeed, it is possible to display a bar on only one specific screen if we wish to. Actually, it is even the default behavior of polybar, but as we will see later with the launching script, it is possible to launch bars on multiple outputs at the same time. Here, we simply get the value of the variable ~monitor~ from the launch environment.
#+NAME: monitor-bar #+NAME: monitor-bar
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
@ -132,9 +132,9 @@ The top bar doesnt include any system tray, so lets disable that.
#+END_SRC #+END_SRC
*** Colors and display *** Colors and display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Colors_and_display-30f12652 :CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Colors_and_display-30f12652
:END: :END:
As explained above, we declared some global variables when it comes to colors, and this is where they will be used. The bars background will be of the same color as the main background color declared earlier, and the same goes for the foreground. As explained above, we declared some global variables when it comes to colors, and this is where they will be used. The bars background will be of the same color as the main background color declared earlier, and the same goes for the foreground.
#+NAME: bar-colors #+NAME: bar-colors
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
@ -156,9 +156,9 @@ Although the variable for the default line color is not used, we still have to s
#+END_SRC #+END_SRC
*** Fonts and locale *** Fonts and locale
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466 :CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466
:END: :END:
Now we can chose which font fill be used in order to display text in this bar, as well as the locale we want. The locale will be useful for displaying information such as date and time, which is a module we will have in this top bar. First, the declaration of the locale is done like so: Now we can chose which font fill be used in order to display text in this bar, as well as the locale we want. The locale will be useful for displaying information such as date and time, which is a module we will have in this top bar. First, the declaration of the locale is done like so:
#+NAME: locale-bar #+NAME: locale-bar
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
@ -204,9 +204,9 @@ Heres the font configuration:
Note that only Fira Sans get a small offset due to the size of the font and the height of the bar itself. Note that only Fira Sans get a small offset due to the size of the font and the height of the bar itself.
*** Modules *** Modules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Modules-18979638 :CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Modules-18979638
:END: :END:
Finally, arguably one of the most important parts of our bar configuration: the module selection. Modules can be positioned in three different parts of our bar: to the right, in middle or to the left. On the left, we want our workspace indicator for i3. In the middle, well get the title of the focused window, and to the left well have the date and time. Finally, arguably one of the most important parts of our bar configuration: the module selection. Modules can be positioned in three different parts of our bar: to the right, in middle or to the left. On the left, we want our workspace indicator for i3. In the middle, well get the title of the focused window, and to the left well have the date and time.
#+NAME: modules-generate #+NAME: modules-generate
#+BEGIN_SRC emacs-lisp :var table=top-modules :results value :cache yes #+BEGIN_SRC emacs-lisp :var table=top-modules :results value :cache yes
@ -253,18 +253,18 @@ Here is the list of modules used:
Each module will be described in details later in this document. Each module will be described in details later in this document.
** Bottom bar declaration ** Bottom bar declaration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-8504b5ec :CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-8504b5ec
:END: :END:
As described above, we will once again have to declare our bar with an equally unimaginative but explicit name. As described above, we will once again have to declare our bar with an equally unimaginative but explicit name.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[bar/bottom] [bar/bottom]
#+END_SRC #+END_SRC
*** Positioning *** Positioning
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Positioning-b1883756 :CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Positioning-b1883756
:END: :END:
The variables are the same as above, but two of them will be slightly modified: The variables are the same as above, but two of them will be slightly modified:
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
bottom = true bottom = true
@ -294,9 +294,9 @@ However, we do display the system tray on this bottom bar at its right. It has n
#+END_SRC #+END_SRC
*** Colors and display *** Colors and display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82 :CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82
:END: :END:
Nothing changes from the top bar, all the variables stay with the same values. See [[#Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82][Colors and display]] of the top bar for more information. Nothing changes from the top bar, all the variables stay with the same values. See [[#Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82][Colors and display]] of the top bar for more information.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
<<bar-colors>> <<bar-colors>>
@ -305,9 +305,9 @@ Nothing changes from the top bar, all the variables stay with the same values. S
#+END_SRC #+END_SRC
*** Fonts and locale *** Fonts and locale
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Fonts_and_locale-67459d62 :CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Fonts_and_locale-67459d62
:END: :END:
Again, nothing changes from the top bar, so for more info on whats going on, see [[#Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466][Fonts and locale]] of the top bar. Again, nothing changes from the top bar, so for more info on whats going on, see [[#Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466][Fonts and locale]] of the top bar.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
<<locale-bar>> <<locale-bar>>
@ -315,9 +315,9 @@ Again, nothing changes from the top bar, so for more info on whats going on,
#+END_SRC #+END_SRC
*** Modules *** Modules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Modules-702b21fc :CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Modules-702b21fc
:END: :END:
Now, we can get to something interesting again: modules. This bar has a lot more modules than the top bar. Here is the list of the modules we have on the bottom bar: Now, we can get to something interesting again: modules. This bar has a lot more modules than the top bar. Here is the list of the modules we have on the bottom bar:
#+NAME: table-modules-bottom #+NAME: table-modules-bottom
| Module name | Position | Brief description | | Module name | Position | Brief description |
@ -342,9 +342,9 @@ All these modules will be explained below.
As you may have noticed, no modules will be displayed in the middle of this bar. As you may have noticed, no modules will be displayed in the middle of this bar.
* Modules * Modules
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-2e1a51bc :CUSTOM_ID: Modules-2e1a51bc
:END: :END:
Before we begin to describe the different modules, I would like to point out something that will be repeated multiple times if I dont talk about it right now: for each module, it is possible to declare the foreground and background color of the prefix of the modules, as well as the underline color and the padding of the module. I like these parameters to be rather consistent, so the code block you will see below will often be reused. The colors refer to the colors declared earlier, and the padding is minimal. Before we begin to describe the different modules, I would like to point out something that will be repeated multiple times if I dont talk about it right now: for each module, it is possible to declare the foreground and background color of the prefix of the modules, as well as the underline color and the padding of the module. I like these parameters to be rather consistent, so the code block you will see below will often be reused. The colors refer to the colors declared earlier, and the padding is minimal.
#+NAME: mod-prefix-col #+NAME: mod-prefix-col
#+BEGIN_SRC conf-windows :tangle no #+BEGIN_SRC conf-windows :tangle no
@ -355,13 +355,13 @@ Before we begin to describe the different modules, I would like to point out som
#+END_SRC #+END_SRC
** Hardware ** Hardware
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-26426ebd :CUSTOM_ID: Modules-Hardware-26426ebd
:END: :END:
*** Battery *** Battery
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Battery-299f2e42 :CUSTOM_ID: Modules-Hardware-Battery-299f2e42
:END: :END:
This module allows the user to get a battery widget among the polybar modules that will also send a notification to the user if the battery level drops below a certain value. This module relies on ~polybar-another-battery~ ([[https://github.com/drdeimos/polybar_another_battery][link]]) and its generated binary ~polybar-ab~ which should be in the ~$PATH~. This module allows the user to get a battery widget among the polybar modules that will also send a notification to the user if the battery level drops below a certain value. This module relies on ~polybar-another-battery~ ([[https://github.com/drdeimos/polybar_another_battery][link]]) and its generated binary ~polybar-ab~ which should be in the ~$PATH~.
The first line of the module declaration lets the user name the module however they want. In this case, the name is ~custom-battery~. The first line of the module declaration lets the user name the module however they want. In this case, the name is ~custom-battery~.
@ -382,9 +382,9 @@ The ~-thr 10~ specifies the threshold for polybar-ab at which it should warn the
Of course, users on desktop computers wont need this module which is aimed at laptop users. Feel free to remove it if you do not need it. Of course, users on desktop computers wont need this module which is aimed at laptop users. Feel free to remove it if you do not need it.
*** Filesystem *** Filesystem
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Filesystem-26f0a3c6 :CUSTOM_ID: Modules-Hardware-Filesystem-26f0a3c6
:END: :END:
This module allows to display information about our filesystem, including (and this is what I use this module for) displaying the used space and remaining space on different mount points. This module is an internal module to polybar, so lets declare it as such: This module allows to display information about our filesystem, including (and this is what I use this module for) displaying the used space and remaining space on different mount points. This module is an internal module to polybar, so lets declare it as such:
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/filesystem] [module/filesystem]
@ -423,9 +423,9 @@ If the volume is unmounted (which should be worrying considering the mountpoints
#+END_SRC #+END_SRC
*** Xbacklight *** Xbacklight
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Xbacklight-2901c504 :CUSTOM_ID: Modules-Hardware-Xbacklight-2901c504
:END: :END:
This module is used in order to display the level of brightness of a screen. It is not used by itself, but rather by other modules, such as [[#Modules-Hardware-ACPI_backlight-9eaeaa79][ACPI backlight]]. First of all, this module is an internal module for xbacklight. It will also display the brightness percentage, prefixed by a sun emoji. Lastly, it will be underlined by a green line. This module is used in order to display the level of brightness of a screen. It is not used by itself, but rather by other modules, such as [[#Modules-Hardware-ACPI_backlight-9eaeaa79][ACPI backlight]]. First of all, this module is an internal module for xbacklight. It will also display the brightness percentage, prefixed by a sun emoji. Lastly, it will be underlined by a green line.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/xbacklight] [module/xbacklight]
@ -437,9 +437,9 @@ This module is used in order to display the level of brightness of a screen. It
#+END_SRC #+END_SRC
*** ACPI backlight *** ACPI backlight
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-ACPI_backlight-9eaeaa79 :CUSTOM_ID: Modules-Hardware-ACPI_backlight-9eaeaa79
:END: :END:
This module indicates the backlight level of a screen thanks to the ACPI Linux module. There isnt much to tell about the module itself other than it inherits the module described above, [[#Modules-Hardware-Xbacklight-2901c504][xbacklight]]. It also sets which driver should be used, in this case the ~intel_backlight~ driver. This module indicates the backlight level of a screen thanks to the ACPI Linux module. There isnt much to tell about the module itself other than it inherits the module described above, [[#Modules-Hardware-Xbacklight-2901c504][xbacklight]]. It also sets which driver should be used, in this case the ~intel_backlight~ driver.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/backlight-acpi] [module/backlight-acpi]
@ -449,9 +449,9 @@ This module indicates the backlight level of a screen thanks to the ACPI Linux m
#+END_SRC #+END_SRC
*** CPU *** CPU
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-CPU-365dcb98 :CUSTOM_ID: Modules-Hardware-CPU-365dcb98
:END: :END:
This module indicates how much of the CPU is being used. As shown below, I made it so we can see the load on each core. The first thing to do is to declare the module as an internal module dedicated to the CPU. This module indicates how much of the CPU is being used. As shown below, I made it so we can see the load on each core. The first thing to do is to declare the module as an internal module dedicated to the CPU.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/cpu] [module/cpu]
@ -484,9 +484,9 @@ Finally, this module will be underlined in red.
#+END_SRC #+END_SRC
*** Memory *** Memory
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Memory-2f2f9475 :CUSTOM_ID: Modules-Hardware-Memory-2f2f9475
:END: :END:
Similarly to the CPU module, it is possible for Polybar to display the RAM load of the computer. As above, lets declare this module as an internal module to Polybar: Similarly to the CPU module, it is possible for Polybar to display the RAM load of the computer. As above, lets declare this module as an internal module to Polybar:
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/memory] [module/memory]
@ -511,9 +511,9 @@ Lastly, it will be underlined in green.
#+END_SRC #+END_SRC
*** Wlan *** Wlan
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Wlan-3457f36b :CUSTOM_ID: Modules-Hardware-Wlan-3457f36b
:END: :END:
It is possible for Polybar to display the name of the current WiFi network the computer is connected to. For that, we first need to declare the Wlan module as an internal module of Polybar. It is possible for Polybar to display the name of the current WiFi network the computer is connected to. For that, we first need to declare the Wlan module as an internal module of Polybar.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/wlan] [module/wlan]
@ -544,9 +544,9 @@ The format of the module when connected to a network will the the display of the
#+END_SRC #+END_SRC
*** Ethernet *** Ethernet
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Ethernet-dc749304 :CUSTOM_ID: Modules-Hardware-Ethernet-dc749304
:END: :END:
Just like any other module, the ethernet module has to be declared as an internal module. Just like any other module, the ethernet module has to be declared as an internal module.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/eth] [module/eth]
@ -578,9 +578,9 @@ The module will be underlined in green.
#+END_SRC #+END_SRC
*** Volume *** Volume
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Volume-ebf9f7a4 :CUSTOM_ID: Modules-Hardware-Volume-ebf9f7a4
:END: :END:
The volume module in Polybar is linked to its internal bindings to ALSA. Lets declare it accordingly. The volume module in Polybar is linked to its internal bindings to ALSA. Lets declare it accordingly.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/volume] [module/volume]
@ -606,9 +606,9 @@ In any case, it will be underlined in green.
#+END_SRC #+END_SRC
*** Temperature *** Temperature
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Hardware-Temperature-a9f08cde :CUSTOM_ID: Modules-Hardware-Temperature-a9f08cde
:END: :END:
The temperature module checks the temperature of the CPU, and warns the user above a certain threshold of heat, in my case if my CPU is above 60°C. The temperature module checks the temperature of the CPU, and warns the user above a certain threshold of heat, in my case if my CPU is above 60°C.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/temperature] [module/temperature]
@ -632,13 +632,13 @@ The format of the module is the thermometer emoji followed by the temperature of
#+END_SRC #+END_SRC
** Software ** Software
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-f6529189 :CUSTOM_ID: Modules-Software-f6529189
:END: :END:
*** Window title *** Window title
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-Window_title-3f931641 :CUSTOM_ID: Modules-Software-Window_title-3f931641
:END: :END:
This modules aim is to simply provide the name of the currently focused window given by Xorg. This module is an internal module to polybar, that is to say it is built-in, and is of the type ~xwindow~. So, lets declare the module accordingly, including the piece of common code declared at the beginning of the chapter: This modules aim is to simply provide the name of the currently focused window given by Xorg. This module is an internal module to polybar, that is to say it is built-in, and is of the type ~xwindow~. So, lets declare the module accordingly, including the piece of common code declared at the beginning of the chapter:
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/xwindow] [module/xwindow]
@ -653,9 +653,9 @@ Now we can take care of the label, which is the actual text that will be display
#+END_SRC #+END_SRC
*** i3 *** i3
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-db36ddfb :CUSTOM_ID: Modules-Software-i3-db36ddfb
:END: :END:
Now comes the module for i3 interaction. Thanks to this module, it is possible to show which workspaces are active and focused, and it is possible to change workspaces by clicking on the ones displayed in the bar. First, lets declare it; it is an internal module by the way. Now comes the module for i3 interaction. Thanks to this module, it is possible to show which workspaces are active and focused, and it is possible to change workspaces by clicking on the ones displayed in the bar. First, lets declare it; it is an internal module by the way.
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/i3] [module/i3]
@ -703,9 +703,9 @@ We also wand to set the label mode to be whichever mode the workspace described
#+end_src #+end_src
**** Workspace icons **** Workspace icons
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-Workspace_icons-89237191 :CUSTOM_ID: Modules-Software-i3-Workspace_icons-89237191
:END: :END:
Now, lets name our workspaces. We can give them whatever name we want them to have, but I just like the aesthetics of Japanese characters, so lets go with the kanji equivalent of the number of the workspaces. Now, lets name our workspaces. We can give them whatever name we want them to have, but I just like the aesthetics of Japanese characters, so lets go with the kanji equivalent of the number of the workspaces.
#+NAME: ws-names #+NAME: ws-names
| workspace number | name | | workspace number | name |
@ -732,9 +732,9 @@ In case we create a workspace which isnt named from ~0~ to ~9~, I want it to
#+end_src #+end_src
**** Focused workspaces **** Focused workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-Focused_workspaces-0ca3b93d :CUSTOM_ID: Modules-Software-i3-Focused_workspaces-0ca3b93d
:END: :END:
Now we can define the label itself. First, we will need to define the label when the workspace is focused. Well simply take the alternative background for the focused label, and the underline will be defined from Xrdbs 8th color, with yellow as the fallback color. It will also have a two pixels padding. The text itself will be the dynamic icons declared above. Now we can define the label itself. First, we will need to define the label when the workspace is focused. Well simply take the alternative background for the focused label, and the underline will be defined from Xrdbs 8th color, with yellow as the fallback color. It will also have a two pixels padding. The text itself will be the dynamic icons declared above.
#+begin_src conf-windows #+begin_src conf-windows
label-focused = %icon% label-focused = %icon%
@ -744,9 +744,9 @@ Now we can define the label itself. First, we will need to define the label when
#+end_src #+end_src
**** Visible workspaces **** Visible workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-Visible_workspaces-4be78e50 :CUSTOM_ID: Modules-Software-i3-Visible_workspaces-4be78e50
:END: :END:
The ~visible~ label is related to the ~focused~ labels since it is describing workspaces that can be seen, but are not currently focused, i.e. a workspace that appears on another screen than the one currently used so it is visible, but it isnt focused. The difference with the ~unfocused~ workspaces is that the latter are neither focused nor visible. As you can see, we are simply using all of the declarations from above for the focused labels so we can ensure they appear the same way the focused labels do. The ~visible~ label is related to the ~focused~ labels since it is describing workspaces that can be seen, but are not currently focused, i.e. a workspace that appears on another screen than the one currently used so it is visible, but it isnt focused. The difference with the ~unfocused~ workspaces is that the latter are neither focused nor visible. As you can see, we are simply using all of the declarations from above for the focused labels so we can ensure they appear the same way the focused labels do.
#+begin_src conf-windows #+begin_src conf-windows
label-visible = ${self.label-focused} label-visible = ${self.label-focused}
@ -756,9 +756,9 @@ The ~visible~ label is related to the ~focused~ labels since it is describing wo
#+end_src #+end_src
**** Unfocused workspaces **** Unfocused workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-Unfocused_workspaces-13063042 :CUSTOM_ID: Modules-Software-i3-Unfocused_workspaces-13063042
:END: :END:
When it comes to the unfocused label, there wont be any custom background or underline, so well just copy the two remaining lines from the focused labels for unfocused labels. When it comes to the unfocused label, there wont be any custom background or underline, so well just copy the two remaining lines from the focused labels for unfocused labels.
#+begin_src conf-windows #+begin_src conf-windows
label-unfocused = %icon% label-unfocused = %icon%
@ -766,9 +766,9 @@ When it comes to the unfocused label, there wont be any custom background or
#+end_src #+end_src
**** Urgent workspaces **** Urgent workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-i3-Urgent_workspaces-ed2bd93c :CUSTOM_ID: Modules-Software-i3-Urgent_workspaces-ed2bd93c
:END: :END:
Lastly, we get our urgent workspaces: workspaces in which most of the time its just a popup that appeared or a software that finally launched itself while working on something else on another workspace. To make it a bit more unique, lets declare its background as being the color 0 from xrdb, with some dark red as the fallback color. And as the other labels, the text will be the icon and it will have a two pixels padding. Lastly, we get our urgent workspaces: workspaces in which most of the time its just a popup that appeared or a software that finally launched itself while working on something else on another workspace. To make it a bit more unique, lets declare its background as being the color 0 from xrdb, with some dark red as the fallback color. And as the other labels, the text will be the icon and it will have a two pixels padding.
#+begin_src conf-windows #+begin_src conf-windows
label-urgent = %icon% label-urgent = %icon%
@ -777,9 +777,9 @@ Lastly, we get our urgent workspaces: workspaces in which most of the time it
#+end_src #+end_src
*** Mpd *** Mpd
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-Mpd-4b1ec78e :CUSTOM_ID: Modules-Software-Mpd-4b1ec78e
:END: :END:
Mpd is a music server for GNU/Linux systems that interfaces will several front-ends, including ncmpcpp (the main one I use), ncmpcpp and mpc. It also interfaces with polybar thanks to some built in commands. Mpd is a music server for GNU/Linux systems that interfaces will several front-ends, including ncmpcpp (the main one I use), ncmpcpp and mpc. It also interfaces with polybar thanks to some built in commands.
First, lets declare our module as an internal module. First, lets declare our module as an internal module.
@ -812,9 +812,9 @@ If Mpd is offline, then I would like to display a short messages that tells the
#+END_SRC #+END_SRC
*** Date *** Date
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Modules-Software-Date-f7338626 :CUSTOM_ID: Modules-Software-Date-f7338626
:END: :END:
This module is really simple: it gives the current date. It is an internal module, and as declared below, it updates every second: This module is really simple: it gives the current date. It is an internal module, and as declared below, it updates every second:
#+BEGIN_SRC conf-windows #+BEGIN_SRC conf-windows
[module/date] [module/date]
@ -846,9 +846,9 @@ This module is underlined in blue:
#+END_SRC #+END_SRC
* Footnotes * Footnotes
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Footnotes-62d05520 :CUSTOM_ID: Footnotes-62d05520
:END: :END:
[fn:1] [[https://github.com/polybar/polybar/wiki/Fonts][https://github.com/polybar/polybar/wiki/Fonts]] [fn:1] [[https://github.com/polybar/polybar/wiki/Fonts][https://github.com/polybar/polybar/wiki/Fonts]]

View File

@ -7,15 +7,15 @@
#+PROPERTY: header-args:toml :mkdirp yes :tangle ~/.rustfmt.toml #+PROPERTY: header-args:toml :mkdirp yes :tangle ~/.rustfmt.toml
* Introduction * Introduction
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Introduction-465e99fe :CUSTOM_ID: Introduction-465e99fe
:END: :END:
The ~.rustfmt.toml~ file located in the ~$HOME~ directory is a global configuration file for Rusts code formatters, such as ~rustfmt~. In this file, you can find how my Rust code is always formatted. The ~.rustfmt.toml~ file located in the ~$HOME~ directory is a global configuration file for Rusts code formatters, such as ~rustfmt~. In this file, you can find how my Rust code is always formatted.
* General settings * General settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: General_settings-7f5cb2f6 :CUSTOM_ID: General_settings-7f5cb2f6
:END: :END:
First, we are using the 2018 edition of Rust. First, we are using the 2018 edition of Rust.
#+BEGIN_SRC toml #+BEGIN_SRC toml
edition = "2018" edition = "2018"
@ -38,9 +38,9 @@ Merge multiple imports into a single nested import.
#+END_SRC #+END_SRC
* Structs and Enums * Structs and Enums
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Structs_and_Enums-6a2a856d :CUSTOM_ID: Structs_and_Enums-6a2a856d
:END: :END:
The maximum length of enum variant having discriminant, that gets vertically aligned with others. Variants without discriminants would be ignored for the purpose of alignment. The maximum length of enum variant having discriminant, that gets vertically aligned with others. Variants without discriminants would be ignored for the purpose of alignment.
Note that this is not how much whitespace is inserted, but instead the longest variant name that doesn't get ignored when aligning. Note that this is not how much whitespace is inserted, but instead the longest variant name that doesn't get ignored when aligning.
@ -57,9 +57,9 @@ Reorder impl items. ~type~ and ~const~ are put first, then macros and methods.
#+END_SRC #+END_SRC
* Comments * Comments
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Comments-b1904bb0 :CUSTOM_ID: Comments-b1904bb0
:END: :END:
Convert ~/* */~ comments to ~//~ comments where possible. Convert ~/* */~ comments to ~//~ comments where possible.
#+BEGIN_SRC toml #+BEGIN_SRC toml
normalize_comments = true normalize_comments = true
@ -78,9 +78,9 @@ Report ~TODO~ items in comments.
#+END_SRC #+END_SRC
* Documentation * Documentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Documentation-0c7981c7 :CUSTOM_ID: Documentation-0c7981c7
:END: :END:
Format code snippet included in doc comments. Format code snippet included in doc comments.
#+BEGIN_SRC toml #+BEGIN_SRC toml
format_code_in_doc_comments = true format_code_in_doc_comments = true
@ -91,9 +91,9 @@ Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
#+END_SRC #+END_SRC
* Whitespace * Whitespace
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Whitespace-e8792b44 :CUSTOM_ID: Whitespace-e8792b44
:END: :END:
Use tab characters for indentation, spaces for alignment. Use tab characters for indentation, spaces for alignment.
#+BEGIN_SRC toml #+BEGIN_SRC toml
hard_tabs = false hard_tabs = false

View File

@ -7,15 +7,15 @@
#+PROPERTY: header-args :mkdirp yes :tangle ~/.tmux.conf.local #+PROPERTY: header-args :mkdirp yes :tangle ~/.tmux.conf.local
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Presentation-0b37c6c0 :CUSTOM_ID: Presentation-0b37c6c0
:END: :END:
I dont really use tmux often, but I certainly do like a nice presentation and useful features, hence this configuration. This config file is inspired by gpakoszs tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]]. I dont really use tmux often, but I certainly do like a nice presentation and useful features, hence this configuration. This config file is inspired by gpakoszs tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]].
* Windows and pane creation * Windows and pane creation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Windows_and_pane_creation-66275518 :CUSTOM_ID: Windows_and_pane_creation-66275518
:END: :END:
Whether if a new *window* will retain the current path. Possible values are: Whether if a new *window* will retain the current path. Possible values are:
- ~true~ - ~true~
- ~false~ (default) - ~false~ (default)
@ -42,9 +42,9 @@ tmux_conf_new_session_prompt=false
#+END_SRC #+END_SRC
* Display * Display
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Display-d5ae1908 :CUSTOM_ID: Display-d5ae1908
:END: :END:
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2). Possible values are: Whether to activate RGB 24-bit color support (only available in tmux >= 2.2). Possible values are:
- ~true~ - ~true~
- ~false~ (default) - ~false~ (default)
@ -81,9 +81,9 @@ These variables set the left/right separators between sections. With the current
#+END_SRC #+END_SRC
** Colors and style ** Colors and style
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Display-Colors_and_style-0994a014 :CUSTOM_ID: Display-Colors_and_style-0994a014
:END: :END:
Colors displayed in tmux can be chosen thanks to the following variables. Any color should be formatted as a hexadecimal RGB value preceded by a pound sign =#= (e.g. =#00afff= for light blue) or =default= to let our terminal set it for us. Colors displayed in tmux can be chosen thanks to the following variables. Any color should be formatted as a hexadecimal RGB value preceded by a pound sign =#= (e.g. =#00afff= for light blue) or =default= to let our terminal set it for us.
Choose the style of the pane borders. Possible values are: Choose the style of the pane borders. Possible values are:
@ -133,9 +133,9 @@ Set the style of the status line.
#+END_SRC #+END_SRC
** Window status bar ** Window status bar
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Display-Window_status_bar-dff37ae7 :CUSTOM_ID: Display-Window_status_bar-dff37ae7
:END: :END:
The following variables are to set the windows status style and format. The following variables are to set the windows status style and format.
Sets the colors and style of the window status. Sets the colors and style of the window status.
@ -302,9 +302,9 @@ Set the clock style. If it is displayed on the right side of the status bar, it
#+END_SRC #+END_SRC
* Clipboard * Clipboard
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Clipboard-66d0d03a :CUSTOM_ID: Clipboard-66d0d03a
:END: :END:
Whether if in copy mode, copying the selection also copies to the OS clipboard. Possible values are: Whether if in copy mode, copying the selection also copies to the OS clipboard. Possible values are:
- ~true~ - ~true~
- ~false~ (default) - ~false~ (default)
@ -313,9 +313,9 @@ Whether if in copy mode, copying the selection also copies to the OS clipboard.
#+END_SRC #+END_SRC
* User customizations * User customizations
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_customizations-c913b5d7 :CUSTOM_ID: User_customizations-c913b5d7
:END: :END:
Here we can override or undo some setting from settings from tmux. First, we can increase the history size. Here we can override or undo some setting from settings from tmux. First, we can increase the history size.
#+BEGIN_SRC conf-unix #+BEGIN_SRC conf-unix
set -g history-limit 10000 set -g history-limit 10000