[Org files] Formatting
This commit is contained in:
parent
54e9e00078
commit
6665074db0
@ -8,9 +8,9 @@
|
||||
#+PROPERTY: header-args:lua :tangle ~/.config/awesome/rc.lua :exports code :noweb yes :mkdirp yes
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-4c41360e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-4c41360e
|
||||
: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.
|
||||
|
||||
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~.
|
||||
|
||||
* Loading libraries
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Loading_libraries-4df76999
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Loading_libraries-4df76999
|
||||
:END:
|
||||
First of all, some initialization is needed, and this initialization is about math randomness. So, let’s initialize the ~random~ method of the ~math~ library:
|
||||
#+BEGIN_SRC lua
|
||||
math.randomseed(os.time())
|
||||
@ -81,9 +81,9 @@ By the way, let’s initialize the ~random~ method of the ~math~ library:
|
||||
#+END_SRC
|
||||
|
||||
* Error handling
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Error_handling-f6a6668f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Error_handling-f6a6668f
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
if awesome.startup_errors then
|
||||
@ -111,22 +111,22 @@ And this code handles runtime errors after startup thanks to signals.
|
||||
#+END_SRC
|
||||
|
||||
* Variable definitions
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-06b2bcbf
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-06b2bcbf
|
||||
:END:
|
||||
** Themes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Themes-591886b4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Themes-591886b4
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
beautiful.init("/home/phundrak/.config/awesome/nord/theme.lua")
|
||||
#+END_SRC
|
||||
|
||||
** Default terminal and text editor
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Default_terminal_and_text_editor-44b84e20
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Default_terminal_and_text_editor-44b84e20
|
||||
:END:
|
||||
The two following variables are set so that I don’t 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
|
||||
terminal = "st"
|
||||
@ -134,9 +134,9 @@ The two following variables are set so that I don’t need to go over my whole c
|
||||
#+END_SRC
|
||||
|
||||
** Keys
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Keys-b8def4ac
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variable_definitions-Keys-b8def4ac
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
modkey = "Mod4"
|
||||
@ -147,17 +147,17 @@ The following declares the default Modkey. Usually, ~Mod4~ is the Super key, sit
|
||||
#+END_SRC
|
||||
|
||||
* Custom functions
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-ed54dbe2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-ed54dbe2
|
||||
:END:
|
||||
** Wallpaper-related functions
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-5912f7dd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-5912f7dd
|
||||
:END:
|
||||
*** Set a random wallpaper
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Set_a_random_wallpaper-104bbeec
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Set_a_random_wallpaper-104bbeec
|
||||
: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]].
|
||||
#+BEGIN_SRC lua
|
||||
local function set_random_pape()
|
||||
@ -169,9 +169,9 @@ This function sets a random wallpaper from the directory =~/Pictures/Wallpapers=
|
||||
#+END_SRC
|
||||
|
||||
*** Restore previous wallpaper
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Wallpaper-related_functions-Restore_previous_wallpaper-8b5bc08c
|
||||
:END:
|
||||
I also wrote the following function that will restore the previously set wallpaper:
|
||||
#+BEGIN_SRC lua
|
||||
local function set_wallpaper(_)
|
||||
@ -180,9 +180,9 @@ I also wrote the following function that will restore the previously set wallpap
|
||||
#+END_SRC
|
||||
|
||||
** Layout manipulation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Layout_manipulation-6bc7db06
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Layout_manipulation-6bc7db06
|
||||
:END:
|
||||
The following function is used by a shortcut described below in [[#Keybindings-Clients-f9f96d60]].
|
||||
#+BEGIN_SRC lua
|
||||
local function client_go_back()
|
||||
@ -194,9 +194,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
|
||||
#+END_SRC
|
||||
|
||||
** Clients manipulation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Clients_manipulation-7e958fed
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Clients_manipulation-7e958fed
|
||||
:END:
|
||||
#+BEGIN_SRC lua
|
||||
local function restore_minimized_clients()
|
||||
local c = awful.client.restore()
|
||||
@ -238,9 +238,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
|
||||
#+END_SRC
|
||||
|
||||
** Tag manipulation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Tag_manipulation-5fc67669
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Tag_manipulation-5fc67669
|
||||
:END:
|
||||
#+BEGIN_SRC lua
|
||||
local function view_tag_n(i)
|
||||
local screen = awful.screen.focused()
|
||||
@ -284,9 +284,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
|
||||
#+END_SRC
|
||||
|
||||
** Awesome prompt
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Awesome_prompt-de4fde50
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Awesome_prompt-de4fde50
|
||||
:END:
|
||||
#+BEGIN_SRC lua
|
||||
local function invoke_lua_execute_prompt()
|
||||
awful.prompt.run {
|
||||
@ -299,9 +299,9 @@ The following function is used by a shortcut described below in [[#Keybindings-C
|
||||
#+END_SRC
|
||||
|
||||
* Layouts
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Layouts-be55a7fd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Layouts-be55a7fd
|
||||
: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.
|
||||
#+NAME: table-layouts
|
||||
| Layout | Enabled? |
|
||||
@ -355,15 +355,15 @@ Here is the code that activates these layouts:
|
||||
#+END_SRC
|
||||
|
||||
* Top bar
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-d3117294
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-d3117294
|
||||
: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.
|
||||
|
||||
** Menus
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Menus-cf468ca8
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Menus-cf468ca8
|
||||
:END:
|
||||
#+NAME: make-menu
|
||||
#+BEGIN_SRC emacs-lisp :var menu=table-awesome-menu
|
||||
(mapconcat (lambda (x)
|
||||
@ -423,10 +423,10 @@ Finally, let’s declare the menubar’s terminal for applications that require
|
||||
menubar.utils.terminal = terminal
|
||||
#+END_SRC
|
||||
|
||||
** Other widgets
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Other_widgets-0b255378
|
||||
:END:
|
||||
** widgets
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Other_widgets-0b255378
|
||||
:END:
|
||||
Let’s declare the keyboard map indicator and switcher for the top bar:
|
||||
#+BEGIN_SRC lua
|
||||
keyboardlayout = awful.widget.keyboardlayout()
|
||||
@ -438,9 +438,9 @@ Let’s also create a clock widget:
|
||||
#+END_SRC
|
||||
|
||||
** Tag list
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Tag_list-d43dbb62
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Tag_list-d43dbb62
|
||||
: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:
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
local tasklist_buttons = gears.table.join(
|
||||
@ -507,9 +507,9 @@ So, here’s the actual configuration code for the taglist:
|
||||
#+END_SRC
|
||||
|
||||
** Tasks list
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Tasks_list-fb7c9b20
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Top_bar-Tasks_list-fb7c9b20
|
||||
: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:
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
local tasklist_buttons = gears.table.join(
|
||||
@ -568,13 +568,13 @@ So, here’s the actual code for the tasklist:
|
||||
#+END_SRC
|
||||
|
||||
* Theme and display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Theme_and_display-6f94bad4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Theme_and_display-6f94bad4
|
||||
:END:
|
||||
** Screen update
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Theme_and_display-Screen_update-e162a27a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Theme_and_display-Screen_update-e162a27a
|
||||
:END:
|
||||
When a screen’s 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 won’t 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]]! Let’s connect this function to the geometry change signal:
|
||||
#+BEGIN_SRC lua
|
||||
screen.connect_signal("property::geometry", set_wallpaper)
|
||||
@ -682,9 +682,9 @@ In the end, our code looks like this:
|
||||
#+END_SRC
|
||||
|
||||
* Mouse bindings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Mouse_bindings-eb4a69a8
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Mouse_bindings-eb4a69a8
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
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
|
||||
|
||||
* Keybindings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-a4e415b3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-a4e415b3
|
||||
: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.
|
||||
|
||||
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
|
||||
|
||||
** Applications
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-8321c6c9
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-8321c6c9
|
||||
:END:
|
||||
#+NAME: sc-app
|
||||
| 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 |
|
||||
|
||||
*** Internet apps
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Internet_apps-87e80705
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Internet_apps-87e80705
|
||||
:END:
|
||||
#+NAME: sc-app-internet
|
||||
| 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 |
|
||||
|
||||
*** Screenshots
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Screenshots-fa63a5a5
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Screenshots-fa63a5a5
|
||||
:END:
|
||||
#+NAME: sc-app-screenshot
|
||||
| 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 |
|
||||
|
||||
*** Emacs
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Emacs-95f8f6a4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Emacs-95f8f6a4
|
||||
:END:
|
||||
#+NAME: sc-app-emacs
|
||||
| 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 |
|
||||
|
||||
*** Rofi
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Rofi-ca998c87
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Applications-Rofi-ca998c87
|
||||
:END:
|
||||
#+NAME: sc-app-rofi
|
||||
| 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 |
|
||||
|
||||
** Awesome
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Awesome-7b691e10
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Awesome-7b691e10
|
||||
:END:
|
||||
Here will be declared some shortcuts directly related to Awesome itself.
|
||||
#+NAME: sc-awesome
|
||||
| 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 |
|
||||
|
||||
** Clients
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Clients-f9f96d60
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Clients-f9f96d60
|
||||
:END:
|
||||
These shortcuts are related to clients (aka windows) management.
|
||||
#+NAME: sc-client
|
||||
| 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 |
|
||||
|
||||
** Layout manipulation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Layout_manipulation-648b4581
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Layout_manipulation-648b4581
|
||||
:END:
|
||||
#+NAME: sc-layout
|
||||
| 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 |
|
||||
|
||||
** Media
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Media-f2cc1324
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Media-f2cc1324
|
||||
:END:
|
||||
#+NAME: sc-media
|
||||
| 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 |
|
||||
|
||||
** Screen
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Screen-b73991f0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Screen-b73991f0
|
||||
:END:
|
||||
#+NAME: sc-screen
|
||||
| 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 |
|
||||
|
||||
** Tags
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Tags-3424b757
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Tags-3424b757
|
||||
:END:
|
||||
#+NAME: sc-tag
|
||||
| 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 |
|
||||
|
||||
** Misc
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Misc-0b45ce02
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Misc-0b45ce02
|
||||
: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 touchpad’s tapping ability. This is linked to a special script I wrote [[file:bin.org::#Toggle_touchpad_tapping-23348b00][here]].
|
||||
#+NAME: sc-misc
|
||||
| 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 |
|
||||
|
||||
* Rules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-c6142cdf
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-c6142cdf
|
||||
: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:
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
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]].
|
||||
|
||||
** Universal rules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Universal_rules-50aad2ce
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Universal_rules-50aad2ce
|
||||
:END:
|
||||
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
|
||||
{ rule = {},
|
||||
@ -1145,9 +1145,9 @@ This is what my universal rules look like:
|
||||
#+END_SRC
|
||||
|
||||
** Floating clients
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Floating_clients-49ab582e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Floating_clients-49ab582e
|
||||
: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:
|
||||
#+NAME: rules-floating-conditions-table
|
||||
| Property | Matches | Comment |
|
||||
@ -1184,9 +1184,9 @@ If any of these conditions is matched, then the client will be set as floating,
|
||||
#+END_SRC
|
||||
|
||||
** Titlebars
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Titlebars-b532fdba
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Titlebars-b532fdba
|
||||
:END:
|
||||
Any normal or dialog client will get a titlebar. This is enabled like so:
|
||||
#+NAME: rules-titlebars
|
||||
#+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
|
||||
|
||||
** Default tag for clients
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Default_tag_for_clients-6ded2a47
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rules-Default_tag_for_clients-6ded2a47
|
||||
:END:
|
||||
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
|
||||
| Client Property | Value | Tag |
|
||||
@ -1236,15 +1236,15 @@ This is what these rules look like:
|
||||
#+END_SRC
|
||||
|
||||
* Signals
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-e32971d6
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-e32971d6
|
||||
:END:
|
||||
Signals are a way for Awesome to handle events, such as client creation or deletion.
|
||||
|
||||
** Client creation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Client_creation-8048ac12
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Client_creation-8048ac12
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
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
|
||||
|
||||
** Titlebar creation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Titlebar_creation-3b1aaa14
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Titlebar_creation-3b1aaa14
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
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
|
||||
|
||||
** Changes of focus
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Changes_of_focus-1b73902c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-Changes_of_focus-1b73902c
|
||||
:END:
|
||||
The default Awesome configuration enables the following snippet of code that makes windows hovered by the user’s mouse focused. Just for completeness’ sake, I included it in this document, but be aware this won’t be tangled into my configuration file and focus will not follow my mouse.
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
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
|
||||
|
||||
* Autostart
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Autostart-f2cf42fe
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Autostart-f2cf42fe
|
||||
: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.
|
||||
#+BEGIN_SRC lua
|
||||
awful.spawn.with_shell("autostart")
|
||||
#+END_SRC
|
||||
|
||||
* What to do now :noexport:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-bce61fe1
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-bce61fe1
|
||||
:END:
|
||||
** DONE Error on S-q
|
||||
CLOSED: [2020-04-12 dim. 15:47]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-Error_on_S-q-beea9b99
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-Error_on_S-q-beea9b99
|
||||
:END:
|
||||
~attempt to index a nil value (global 'c')~
|
||||
|
||||
** TODO Make custom theme
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-Make_custom_theme-5837307e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: What_to_do_now-Make_custom_theme-5837307e
|
||||
:END:
|
||||
|
@ -8,9 +8,9 @@
|
||||
#+PROPERTY: header-args:emacs-lisp :exports none :tangle no
|
||||
|
||||
* Presentation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-9c7a53bf
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-9c7a53bf
|
||||
:END:
|
||||
*Before proceeding, be aware that I deprecated this i3 config on August 22nd, 2020, meaning I won’t 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.
|
||||
@ -22,13 +22,13 @@ It is to be noted I am using [[https://github.com/Airblader/i3][Airblader’s fo
|
||||
#+END_SRC
|
||||
|
||||
* Variables declaration
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-0ebc9a21
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-0ebc9a21
|
||||
:END:
|
||||
** Global
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-Global-1cf1bfe4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-Global-1cf1bfe4
|
||||
:END:
|
||||
The first I do is declaring the modifier key and the alt key —I don’t 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.
|
||||
|
||||
Let’s 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
|
||||
|
||||
** Floating windows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-Floating_windows-897d0c3b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Variables_declaration-Floating_windows-897d0c3b
|
||||
: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).
|
||||
|
||||
Let’s declare our floading modyfier. With floating windows, you can move them around by clicking on the window’s borders; but since we don’t 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
|
||||
|
||||
* i3 global settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-1b863d93
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-1b863d93
|
||||
: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.
|
||||
|
||||
** Mouse settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Mouse_settings-4630241d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Mouse_settings-4630241d
|
||||
:END:
|
||||
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
|
||||
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
|
||||
|
||||
** Popup handling
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Popup_handling-51b6ed8d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Popup_handling-51b6ed8d
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
popup_during_fullscreen leave_fullscreen
|
||||
#+END_SRC
|
||||
|
||||
** Behavior of workspace changes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Behavior_of_workspace_changes-00202985
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Behavior_of_workspace_changes-00202985
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
workspace_auto_back_and_forth yes
|
||||
#+END_SRC
|
||||
|
||||
** Gaps and window appearance
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Gaps_and_window_appearance-749e9f7b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3_global_settings-Gaps_and_window_appearance-749e9f7b
|
||||
:END:
|
||||
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.
|
||||
@ -196,9 +196,9 @@ Some parameters are also available when it comes to the colors i3 uses. Honestly
|
||||
#+END_SRC
|
||||
|
||||
* Assigning windows to workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Assigning_windows_to_workspaces-e59f61e5
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Assigning_windows_to_workspaces-e59f61e5
|
||||
:END:
|
||||
I decided to bind some windows to some workspaces in order to have a better organization of my desktop.
|
||||
#+NAME: assignment-table
|
||||
| Application | Class | Workspace |
|
||||
@ -255,9 +255,9 @@ Now I’ll call the above code as a noweb reference that should be executed.
|
||||
#+END_SRC
|
||||
|
||||
* Shortcuts
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-9c7074d3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-9c7074d3
|
||||
: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 I’ll try to make it readable still.
|
||||
|
||||
Shortcuts are set like so:
|
||||
@ -273,9 +273,9 @@ bindsym shortcut command
|
||||
#+END_SRC
|
||||
|
||||
** Terminal shortcuts
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Terminal_shortcuts-514ecdbe
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Terminal_shortcuts-514ecdbe
|
||||
: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.
|
||||
#+NAME: terminal-shortcuts
|
||||
| shortcut | command | What it does |
|
||||
@ -293,9 +293,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
** i3 shortcuts
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-i3_shortcuts-369039ae
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-i3_shortcuts-369039ae
|
||||
:END:
|
||||
A couple of shortcuts are dedicated to i3 itself.
|
||||
#+NAME: i3-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -327,13 +327,13 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
** Window and workspace management
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-a384b8f8
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-a384b8f8
|
||||
:END:
|
||||
*** Managing how windows will split
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Managing_how_windows_will_split-5a22ae31
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Managing_how_windows_will_split-5a22ae31
|
||||
: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.
|
||||
#+NAME: split-win-sh
|
||||
| shortcuts | command | what it does |
|
||||
@ -347,9 +347,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Focus windows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_windows-69a00ae9
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_windows-69a00ae9
|
||||
:END:
|
||||
To change window focus, you can use one of the following shortcuts:
|
||||
#+NAME: window-focus-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -365,9 +365,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Focus workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_workspaces-9f4bee74
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Focus_workspaces-9f4bee74
|
||||
:END:
|
||||
Just like windows, it is also possible to change focus between workspaces, because let’s be honest, most people won’t have ten screens to display all ten workspaces at the same time, and frankly that would be impractical.
|
||||
#+NAME: ws-focus-sh
|
||||
| shortcut | window | what it does |
|
||||
@ -389,9 +389,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Moving windows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_windows-d8c90ac2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_windows-d8c90ac2
|
||||
:END:
|
||||
To move windows, a couple of shortcuts are available:
|
||||
#+NAME: window-move-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -407,9 +407,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Moving containers
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_containers-b97cf4ae
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_containers-b97cf4ae
|
||||
:END:
|
||||
To move containers between the available screens, you have the following shortcuts:
|
||||
#+NAME: containers-move-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -441,9 +441,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Moving workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_workspaces-a71d7b54
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Moving_workspaces-a71d7b54
|
||||
:END:
|
||||
|
||||
It is also possible to move workspaces. The related shortcuts available are the following:
|
||||
|
||||
@ -461,9 +461,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Close windows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Close_windows-5e521a48
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Close_windows-5e521a48
|
||||
:END:
|
||||
To close windows, we have two main shortcuts: Alt+F4 and mod+q. The first one is here due to habits, but I don’t really use it anymore due to my main keyboard which doesn’t have any easy access to the functions keys, hence mod+q.
|
||||
#+NAME: close-win-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -477,9 +477,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Manage the size of the current window
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_the_size_of_the_current_window-11afa914
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_the_size_of_the_current_window-11afa914
|
||||
: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.
|
||||
#+NAME: size-win-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -519,9 +519,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Manage floating windows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_floating_windows-9206f4da
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Manage_floating_windows-9206f4da
|
||||
: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:
|
||||
#+NAME: float-win-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -537,9 +537,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Scratchpad and window display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Scratchpad_and_window_display-10d8d1f4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Scratchpad_and_window_display-10d8d1f4
|
||||
:END:
|
||||
You can think of i3’s 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.
|
||||
@ -556,9 +556,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Gaps management
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Gaps_management-33979213
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Window_and_workspace_management-Gaps_management-33979213
|
||||
: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.
|
||||
#+NAME: gaps-resize-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -575,15 +575,15 @@ Here is the corresponding configuration:
|
||||
#+END_SRC
|
||||
|
||||
** Launching software
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-0e088e69
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-0e088e69
|
||||
:END:
|
||||
A big part of my i3 shortcuts though are related to launching various software. I’ll 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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Software_and_command_launcher-a3f5863e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Software_and_command_launcher-a3f5863e
|
||||
: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.
|
||||
#+NAME: launcher-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -597,9 +597,9 @@ Here is the configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Internet software
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Internet_software-a0524cd8
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Internet_software-a0524cd8
|
||||
:END:
|
||||
I have a couple of Internet-related software I can launch easily.
|
||||
#+NAME: internet-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -614,9 +614,9 @@ Hence this configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Screenshots
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screenshots-41e41c88
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screenshots-41e41c88
|
||||
:END:
|
||||
A couple of shortcuts are available for taking screenshots.
|
||||
#+NAME: screenshot-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -631,9 +631,9 @@ This gives us this configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Screen brightness
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screen_brightness-6855d53f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screen_brightness-6855d53f
|
||||
:END:
|
||||
Here we have four commands for managing our screen’s 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 doesn’t have dedicated keys or we are using a keyboard which doesn’t provide them.
|
||||
#+NAME: brightness-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -649,9 +649,9 @@ This gives us this configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Media control
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Media_control-18ad2815
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Media_control-18ad2815
|
||||
: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.
|
||||
#+NAME: media-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -695,9 +695,9 @@ This gives us this configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Rofi utilities
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Rofi_utilities-b8eb5b95
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Rofi_utilities-b8eb5b95
|
||||
:END:
|
||||
We also have some utilities I’ve written and which are interfaced with rofi. Here are said shortcuts.
|
||||
#+NAME: rofi-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -716,9 +716,9 @@ This gives us the following configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Miscellaneous
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Miscellaneous-7ec80fea
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Miscellaneous-7ec80fea
|
||||
: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.
|
||||
#+NAME: misc-sh
|
||||
| shortcut | command | what it does |
|
||||
@ -734,9 +734,9 @@ This gives us the following configuration:
|
||||
#+END_SRC
|
||||
|
||||
*** Screen management
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screen_management-f9b35bf2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shortcuts-Launching_software-Screen_management-f9b35bf2
|
||||
: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. We’ll use some Emacs Lisp to determine on the configuration file export which screens names to use.
|
||||
#+NAME: hostname-screen-management
|
||||
#+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
|
||||
|
||||
* Software autolaunch
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Software_autolaunch-ccee82f6
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Software_autolaunch-ccee82f6
|
||||
:END:
|
||||
When i3 is launched, I want it to also launch some software automatically. Here is what we will launch:
|
||||
#+NAME: autolaunch
|
||||
| always execute it? | command | what it is |
|
||||
|
@ -6,9 +6,9 @@
|
||||
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the dotfiles of Phundrak" />
|
||||
|
||||
* Presentation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-981f2f04
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-981f2f04
|
||||
: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.
|
||||
|
||||
For starters, here is the link to all the pages on my website that you might find interesting. I’ll 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.
|
||||
|
||||
* Screenshots
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Screenshots-51f1cef3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Screenshots-51f1cef3
|
||||
:END:
|
||||
#+CAPTION: Desktop with Neofetch in the terminal
|
||||
[[./img/neofetch.png.webp]]
|
||||
|
||||
@ -46,9 +46,9 @@ Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://confi
|
||||
[[./img/rofi.png.webp]]
|
||||
|
||||
* Features
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-5ab2a2c0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-5ab2a2c0
|
||||
:END:
|
||||
- Emacs configuration perfectly tailored for my own use
|
||||
- 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.
|
||||
@ -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.
|
||||
|
||||
** Tiling Window Managers
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-da221e37
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-da221e37
|
||||
:END:
|
||||
*** AwesomeWM
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-AwesomeWM-2eac61a9
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-AwesomeWM-2eac61a9
|
||||
: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]].
|
||||
|
||||
*** i3 configuration (Deprecated)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-i3_configuration-9c92e43c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tiling_Window_Managers-i3_configuration-9c92e43c
|
||||
: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.
|
||||
|
||||
** Polybar config (Deprecated)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Polybar_config_(Deprecated)-c8f95774
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Polybar_config_(Deprecated)-c8f95774
|
||||
: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.
|
||||
|
||||
** Graphical tweaks
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-9879f6b0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-9879f6b0
|
||||
:END:
|
||||
*** GTK Settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-752e9916
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-752e9916
|
||||
:END:
|
||||
**** GTK2
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-74c9de24
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-74c9de24
|
||||
:END:
|
||||
***** General configuration
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.gtkrc-2.0
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-General_configuration-eb1f1f3c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.gtkrc-2.0
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-General_configuration-eb1f1f3c
|
||||
: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, let’s select the Nordic theme for GTK2. Let’s also set the icon theme.
|
||||
#+BEGIN_SRC conf-unix
|
||||
# -*- mode: unix-config -*-
|
||||
@ -116,10 +116,10 @@ This changes the shortcuts in menu, let’s also make the menus snappier.
|
||||
#+END_SRC
|
||||
|
||||
***** Filechooser
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-2.0/gtkfilechooser.ini
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-Filechooser-389f040d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-2.0/gtkfilechooser.ini
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-Filechooser-389f040d
|
||||
:END:
|
||||
#+BEGIN_SRC conf-unix
|
||||
[Filechooser Settings]
|
||||
#+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
|
||||
|
||||
**** GTK3
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-3.0/settings.ini
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK3-3d6cba86
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.config/gtk-3.0/settings.ini
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK3-3d6cba86
|
||||
:END:
|
||||
The following file helps me choosing the aspect of various GTK+ 3 software, including their theme and icons. First, let’s declare the header:
|
||||
#+BEGIN_SRC conf-unix
|
||||
[Settings]
|
||||
@ -217,16 +217,16 @@ Since window decorations are handled by my WMs, I will leave this variable empty
|
||||
#+END_SRC
|
||||
|
||||
*** Picom (Compton)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-Picom-b5b9a4dd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-Picom-b5b9a4dd
|
||||
: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]].
|
||||
|
||||
*** Xresources
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code
|
||||
:CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
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
|
||||
|
||||
** Text and source code editing
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-63cc66d5
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-63cc66d5
|
||||
:END:
|
||||
*** Emacs configuration
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Emacs_configuration-ef937102
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Emacs_configuration-ef937102
|
||||
:END:
|
||||
Emacs is my main text editor, which I use for almost everything. Because, you know…
|
||||
#+begin_quote
|
||||
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.
|
||||
|
||||
*** Nano (deprecated)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Nano-a9d4839f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Nano-a9d4839f
|
||||
: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.
|
||||
|
||||
*** Rustfmt
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Rustfmt-2c4ac0b3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Text_and_source_code_editing-Rustfmt-2c4ac0b3
|
||||
:END:
|
||||
You can find my Rustfmt configuration [[file:rustfmt.org][here]].
|
||||
|
||||
** Custom scripts in =PATH=
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Custom_scripts_in_=PATH=-043e8c8e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Custom_scripts_in_=PATH=-043e8c8e
|
||||
: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.
|
||||
|
||||
** Fish configuration with useful abbreviations
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Fish_configuration_with_useful_abbreviations-c71ffba0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Fish_configuration_with_useful_abbreviations-c71ffba0
|
||||
: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.
|
||||
|
||||
** And some minor configuration files
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-d5cec319
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-d5cec319
|
||||
:END:
|
||||
*** Email signature
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.signature
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-Email_signature-8c5f2218
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.signature
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-Email_signature-8c5f2218
|
||||
:END:
|
||||
This file gets inserted automatically at the end of my emails.
|
||||
#+BEGIN_SRC text
|
||||
Lucien “Phundrak” Cartier-Tilet
|
||||
@ -339,10 +339,10 @@ This file gets inserted automatically at the end of my emails.
|
||||
#+END_SRC
|
||||
|
||||
*** Global gitignore
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.gitignore_global
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-Global_gitignore-42467108
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.gitignore_global
|
||||
:CUSTOM_ID: Features-And_some_minor_configuration_files-Global_gitignore-42467108
|
||||
: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 don’t want nano’s backup files.
|
||||
#+BEGIN_SRC text
|
||||
~*
|
||||
@ -355,15 +355,15 @@ And object files and output binaries generated by =gcc= and the likes aren’t w
|
||||
#+END_SRC
|
||||
|
||||
** Tmux configuration
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tmux_configuration-ce76e030
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-Tmux_configuration-ce76e030
|
||||
: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]].
|
||||
|
||||
* Dependencies
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Dependencies-ef5057dd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Dependencies-ef5057dd
|
||||
: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:
|
||||
- [[https://www.gnu.org/software/emacs/][GNU/Emacs]] >= 26.2
|
||||
- [[http://spacemacs.org][Spacemacs]] (develop branch)
|
||||
@ -384,13 +384,13 @@ And some other stuff scattered around in my dotfiles.
|
||||
BTW, I use Arch.
|
||||
|
||||
* Installation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Installation-9ec2ae86
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Installation-9ec2ae86
|
||||
: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.
|
||||
|
||||
* Licence
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Licence-48911096
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Licence-48911096
|
||||
: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, it’s your own responsibility.
|
||||
|
@ -10,15 +10,15 @@
|
||||
#+PROPERTY: header-args:emacs-lisp :exports none :noweb yes :tangle no :cache yes
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-cd5792cd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-cd5792cd
|
||||
: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 computer’s and my travelling laptop’s configuration.
|
||||
|
||||
* Install Arch Linux
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-ac7ad3b2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-ac7ad3b2
|
||||
: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 (I’ve 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.
|
||||
@ -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 won’t 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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-Get_the_latest_fastest_mirrors-765401c9
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-Get_the_latest_fastest_mirrors-765401c9
|
||||
:END:
|
||||
When you boot into the live ISO, execute the following command:
|
||||
#+BEGIN_SRC sh
|
||||
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.
|
||||
|
||||
** Install the system
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-Install_the_system-3ff49aa6
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Install_Arch_Linux-Install_the_system-3ff49aa6
|
||||
:END:
|
||||
Then you can use a custom script to ease your installation of Arch if you do not wish to do it manually. Personally, I’ve done it several times already, I know how the distro works, I just want to be able to install my distro quickly now. I’ll need to download the script with ~wget~, but apparently it isn’t installed by default on Arch ISOs anymore, so I’ll need to install it.
|
||||
#+BEGIN_SRC sh
|
||||
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.
|
||||
|
||||
* Execute bootstrap
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
|
||||
:CUSTOM_ID: Execute_bootstrap-e37054ef
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
|
||||
:CUSTOM_ID: Execute_bootstrap-e37054ef
|
||||
: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, let’s install ~fish~ (our shell running the script), ~git~, and my dotfiles manager ~yadm~.
|
||||
#+BEGIN_SRC sh
|
||||
yay -Sy fish git yadm
|
||||
@ -78,9 +78,9 @@ With the installation of Arch with ~archfi~, I will have [[https://github.com/Jg
|
||||
Let’s take a look at what it does.
|
||||
|
||||
** Decrypt private yadm files
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Decrypt_private_yadm_files-68af7157
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Decrypt_private_yadm_files-68af7157
|
||||
:END:
|
||||
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
|
||||
if test "$USER" = 'phundrak'
|
||||
@ -91,9 +91,9 @@ Some private files are stored encrypted in the repository of my yadm dotfiles. I
|
||||
#+END_SRC
|
||||
|
||||
** Get a correct keyboard layout
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Get_a_correct_keyboard_layout-77d24b30
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Get_a_correct_keyboard_layout-77d24b30
|
||||
: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:
|
||||
#+BEGIN_SRC fish
|
||||
set keyboardconf \
|
||||
@ -117,9 +117,9 @@ So, let’s ask the user if they want to set it as their keyboard configuration.
|
||||
#+END_SRC
|
||||
|
||||
** Set our locale
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_our_locale-e74d772a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_our_locale-e74d772a
|
||||
: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.
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
** Create some folders
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Create_some_folders-bf701387
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Create_some_folders-bf701387
|
||||
:END:
|
||||
Let’s create some folders we might need for mounting our drives, Android devices and CDs.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Create directories for mounting #############################################\n\n"
|
||||
@ -178,9 +178,9 @@ Let’s create some folders we might need for mounting our drives, Android devic
|
||||
#+END_SRC
|
||||
|
||||
** Set user’s shell to fish
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_user’s_shell_to_fish-1a794be2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_user’s_shell_to_fish-1a794be2
|
||||
:END:
|
||||
First of all, the bootstrap shell will set the user’s shell to fish.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Set fish as the default shell ###############################################\n\n"
|
||||
@ -191,9 +191,9 @@ First of all, the bootstrap shell will set the user’s shell to fish.
|
||||
#+END_SRC
|
||||
|
||||
** Install basic packages
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_basic_packages-17173316
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_basic_packages-17173316
|
||||
:END:
|
||||
Let’s set in a custom varible what packages we’ll be needing.
|
||||
#+BEGIN_SRC fish
|
||||
set PACKAGES \
|
||||
@ -242,9 +242,9 @@ These are the minimum I would have in my own installation. You can edit it howev
|
||||
#+END_SRC
|
||||
|
||||
** Tangle configuration files from Org files
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Tangle_configuration_files_from_Org_files-cc524361
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Tangle_configuration_files_from_Org_files-cc524361
|
||||
:END:
|
||||
Before tangling our configuration files, we need to create some directories first so our files can be properly tangled. Here’s the list of directories we need to create:
|
||||
#+NAME: dirs-tangled-files
|
||||
| $HOME/.config/awesome |
|
||||
@ -361,9 +361,9 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
|
||||
#+END_SRC
|
||||
|
||||
** Setting up Emacs: Installing Spacemacs
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Setting_up_Emacs:_Installing_Spacemacs-0b3d44b2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Setting_up_Emacs:_Installing_Spacemacs-0b3d44b2
|
||||
:END:
|
||||
Now, the first thing we want to do with Emacs is install its Spacemacs distribution. We’ll 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 won’t let us clone Spacemacs in an already existing and non-empty directory. To make sure it isn’t one, let’s delete any potentially existing =~/.config/emacs= directory:
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
** Set up dotfiles’ git repository
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9
|
||||
:END:
|
||||
*** Update our dotfiles’ remotes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_dotfiles’_remotes-5a0fe6f7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_dotfiles’_remotes-5a0fe6f7
|
||||
:END:
|
||||
This line in the bootstrap script will test if the current user is using my username. If yes, it’s probably me.
|
||||
#+BEGIN_SRC fish
|
||||
if test "$USER" = 'phundrak'
|
||||
@ -412,9 +412,9 @@ Finally, let’s close this ~if~ statement.
|
||||
#+END_SRC
|
||||
|
||||
*** Update our submodules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_submodules-3e921579
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-Update_our_submodules-3e921579
|
||||
:END:
|
||||
Now we can download the various dependencies of our dotfiles. To do so, let’s run the following command:
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Getting yadm susbmodules ####################################################\n\n"
|
||||
@ -422,15 +422,15 @@ Now we can download the various dependencies of our dotfiles. To do so, let’s
|
||||
#+END_SRC
|
||||
|
||||
** Enable some services
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-3d38d98e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-3d38d98e
|
||||
:END:
|
||||
We have installed some packages which require some services to run. Let’s enable them.
|
||||
|
||||
*** Systemd-timesyncd
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Systemd-timesyncd-d887e45b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Systemd-timesyncd-d887e45b
|
||||
:END:
|
||||
This service enables time syncing with the NTP protocol, so I can be sure my computer’s time is correct. The service first needs to be enabled:
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Enabling timesync ###########################################################\n\n"
|
||||
@ -443,9 +443,9 @@ Now, let systemd know I want to use the NTP protocol to keep my computer’s tim
|
||||
#+END_SRC
|
||||
|
||||
*** Docker
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Docker-305e8309
|
||||
:END:
|
||||
First, let’s activate Docker on startup.
|
||||
#+BEGIN_SRC fish
|
||||
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 won’t have to
|
||||
#+END_SRC
|
||||
|
||||
*** Emacs
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Emacs-c7785c21
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Emacs-c7785c21
|
||||
:END:
|
||||
Emacs will run as a user service, which means it won’t be launched until we log in. However, the service won’t 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
|
||||
printf "\n# Enabling Emacs as user service ##############################################\n\n"
|
||||
@ -471,9 +471,9 @@ Emacs will run as a user service, which means it won’t be launched until we lo
|
||||
#+END_SRC
|
||||
|
||||
*** Mpd
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7
|
||||
:END:
|
||||
Mpd will also use as a user service in order to get rid of some lines of code in my configuration.
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
*** SSH server
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-SSH_server-204f5997
|
||||
:END:
|
||||
Maybe we want to activate an SSH server on our machine. If so, we can enable it. Let’s ask the question.
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
*** Ly
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Ly-f4b161c0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Ly-f4b161c0
|
||||
:END:
|
||||
Ly is a display manager based on ncurses which I find nice enough for me to use (I generally don’t like using display managers). Let’s enable it, and let’s disable tty2 while we’re at it (Ly uses it to run X).
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
*** Acpilight
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
|
||||
: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~.
|
||||
#+BEGIN_SRC fish
|
||||
sudo usermod -aG video $USER
|
||||
#+END_SRC
|
||||
|
||||
*** NordVPN
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-NordVPN-75c1bd88
|
||||
: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:
|
||||
#+BEGIN_SRC fish
|
||||
sudo systemctl enable --now nordvpnd
|
||||
@ -528,9 +528,9 @@ Let’s also set its default protocol to UDP. This will allow me to use any port
|
||||
#+END_SRC
|
||||
|
||||
** Symlink some system config files
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175
|
||||
:END:
|
||||
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
|
||||
#+BEGIN_SRC fish
|
||||
for f in (find ~/.etc -type f)
|
||||
@ -545,18 +545,18 @@ Let’s also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source
|
||||
#+END_SRC
|
||||
|
||||
** Install packages from git
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-7c6a6ea4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-7c6a6ea4
|
||||
:END:
|
||||
Now, let’s install some packages from git directly.
|
||||
#+BEGIN_SRC fish
|
||||
mkdir -p ~/fromGIT
|
||||
#+END_SRC
|
||||
|
||||
*** Reveal.JS
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-Reveal.JS-bb4da0bf
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_packages_from_git-Reveal.JS-bb4da0bf
|
||||
: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 let’s clone it there.
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
** Install Rust
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-1839c4d0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-1839c4d0
|
||||
:END:
|
||||
*** Install the toolchains
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_the_toolchains-3480764a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_the_toolchains-3480764a
|
||||
: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.
|
||||
#+BEGIN_SRC fish
|
||||
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
|
||||
|
||||
*** Install some utilities
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_some_utilities-c4a7c785
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_Rust-Install_some_utilities-c4a7c785
|
||||
:END:
|
||||
We’ll need some utilities when developing Rust from Emacs, namely ~rustfmt~ and ~racer~. Let’s install them with ~cargo~.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Add rust utilities ##########################################################\n\n"
|
||||
@ -619,9 +619,9 @@ Here is the code to do so:
|
||||
#+END_SRC
|
||||
|
||||
** Install some python packages
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_some_python_packages-a4447a6f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Install_some_python_packages-a4447a6f
|
||||
:END:
|
||||
Some packages will be needed from pip in order to get our Emacs setup correctly working.
|
||||
#+NAME: python-packages-table
|
||||
| Package | Why |
|
||||
@ -647,9 +647,9 @@ Let’s install them locally for our user.
|
||||
#+END_SRC
|
||||
|
||||
** Set up Chicken (Scheme interpreter/compiler)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_Chicken_(Scheme_interpreter-compiler)-3c1a3c4a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_Chicken_(Scheme_interpreter-compiler)-3c1a3c4a
|
||||
:END:
|
||||
Chicken needs to be set up before being used. First, we need to install its documentation.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Setting up Chicken ##########################################################\n\n"
|
||||
@ -663,15 +663,15 @@ Then, we’ll complete the documentation like so:
|
||||
#+END_SRC
|
||||
|
||||
** Set up our fish shell
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22
|
||||
: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.
|
||||
|
||||
*** Install ~fisher~
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_=fisher=-3a44531b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_=fisher=-3a44531b
|
||||
:END:
|
||||
We will be using ~fisher~ as our extensions manager for Fish. Let’s install it.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Installing fisher ###########################################################\n\n"
|
||||
@ -679,9 +679,9 @@ We will be using ~fisher~ as our extensions manager for Fish. Let’s install it
|
||||
#+END_SRC
|
||||
|
||||
*** Install our extensions
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_our_extensions-188e4566
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-Install_our_extensions-188e4566
|
||||
:END:
|
||||
I generally use the following extensions in my Fish shell.
|
||||
#+NAME: fish-extensions-table
|
||||
#+CAPTION: Fish extensions managed by Fisher
|
||||
|
@ -7,17 +7,17 @@
|
||||
#+PROPERTY: header-args :tangle ~/.config/nano/nanorc
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-7e535842
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-7e535842
|
||||
:END:
|
||||
*Before proceeding, be aware that I deprecated this nano config on August 28th, 2020, meaning I won’t 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 won’t work or won’t 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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-b55668a7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-b55668a7
|
||||
: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/=.
|
||||
#+BEGIN_SRC conf
|
||||
set backup
|
||||
@ -30,18 +30,18 @@ Save a file by default in Unix format. This overrides nano's default behavior of
|
||||
#+END_SRC
|
||||
|
||||
** Keys behavior
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Keys_behavior-c665fa36
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Keys_behavior-c665fa36
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
set smarthome
|
||||
#+END_SRC
|
||||
|
||||
** Search
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Search-6e458076
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Search-6e458076
|
||||
:END:
|
||||
Do case-unsensitive searches by default.
|
||||
#+BEGIN_SRC conf
|
||||
unset casesensitive
|
||||
@ -53,9 +53,9 @@ Do regular-expression searches by default. Regular expressions in =nano= are of
|
||||
#+END_SRC
|
||||
|
||||
** Visual settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Visual_settings-9952f2ae
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Visual_settings-9952f2ae
|
||||
: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=.
|
||||
#+BEGIN_SRC conf
|
||||
set boldtext
|
||||
@ -82,9 +82,9 @@ Constantly display the cursor position in the status bar. This overrides the opt
|
||||
#+END_SRC
|
||||
|
||||
** Whitespace settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Whitespace_settings-8cef9cd7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Whitespace_settings-8cef9cd7
|
||||
:END:
|
||||
Convert typed tabs to spaces. Sue me.
|
||||
#+BEGIN_SRC conf
|
||||
set tabstospaces
|
||||
@ -106,9 +106,9 @@ set trimblanks
|
||||
#+END_SRC
|
||||
|
||||
** Included configuration file
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Included_configuration_file-70b0f35b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Configuration-Included_configuration_file-70b0f35b
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
include ~/.config/nano/nano-syntax/*.nanorc
|
||||
|
@ -7,9 +7,9 @@
|
||||
#+PROPERTY: header-args :tangle ~/.config/ncmpcpp/config2 :exports code
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-3e61ecfc
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-3e61ecfc
|
||||
:END:
|
||||
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
|
||||
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]]
|
||||
|
||||
* Core Ncmpcpp settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-8cacae18
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-8cacae18
|
||||
:END:
|
||||
#+BEGIN_SRC conf :exports none
|
||||
# -*- mode: conf -*-
|
||||
#+END_SRC
|
||||
|
||||
** Directories
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-Directories-28092c92
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-Directories-28092c92
|
||||
: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/~.
|
||||
#+BEGIN_SRC conf
|
||||
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
|
||||
|
||||
** MPD
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-MPD-a2a7452e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Core_Ncmpcpp_settings-MPD-a2a7452e
|
||||
: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.
|
||||
#+BEGIN_SRC conf
|
||||
mpd_host = localhost
|
||||
|
@ -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"
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-5942aea3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-5942aea3
|
||||
: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]].
|
||||
|
||||
* The ~print_info~ functions
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: The_print_info_functions-bb30763f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: The_print_info_functions-bb30763f
|
||||
:END:
|
||||
The ~print_info~ function is the function called by Neofetch in order to print the system information it could fetch. In this function, we’ll choose what to display, and how. This function looks like this:
|
||||
#+BEGIN_SRC sh :tangle no
|
||||
print_info() {
|
||||
@ -85,23 +85,23 @@ Hence, the function looks like so:
|
||||
Each of these modules can be tuned with the variables presented below.
|
||||
|
||||
* Information settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-9d4cfe88
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-9d4cfe88
|
||||
: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.
|
||||
|
||||
** Software
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-59f4cb0f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-59f4cb0f
|
||||
:END:
|
||||
*** OS
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-67908fc4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-67908fc4
|
||||
:END:
|
||||
**** Distro
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Distro-cd12bc4f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Distro-cd12bc4f
|
||||
:END:
|
||||
This variable can shorten the output of the ~distro~ function.
|
||||
- Default value :: ~"on"~
|
||||
- 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.
|
||||
|
||||
**** Kernel
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce
|
||||
:END:
|
||||
The variable below can shorten the output ofh the ~kernel~ function.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -137,9 +137,9 @@ The variable below can shorten the output ofh the ~kernel~ function.
|
||||
#+end_src
|
||||
|
||||
**** OS Architecture
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-OS_Architecture-2f60c93c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-OS_Architecture-2f60c93c
|
||||
:END:
|
||||
This variable can show or hide the OS architecture in the ~distro~ output.
|
||||
- Default value :: ~"off"~
|
||||
- Values ::
|
||||
@ -154,9 +154,9 @@ This variable can show or hide the OS architecture in the ~distro~ output.
|
||||
#+end_src
|
||||
|
||||
**** Packages
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Packages-f836a58d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-OS-Packages-f836a58d
|
||||
:END:
|
||||
It is possible to show or hide Package Manager names.
|
||||
- Default :: ~'tiny'~
|
||||
- Values :: ~'on'~ / ~'tiny'~ / ~'off'~
|
||||
@ -170,13 +170,13 @@ It is possible to show or hide Package Manager names.
|
||||
#+END_SRC
|
||||
|
||||
**** Shell
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-76439406
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-76439406
|
||||
:END:
|
||||
***** Shell path
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-Shell_path-9eda636d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-Shell_path-9eda636d
|
||||
:END:
|
||||
This allows to show either the path of the user’s shell, or simply its name.
|
||||
- Default value :: ~"off"~
|
||||
- Values ::
|
||||
@ -191,9 +191,9 @@ This allows to show either the path of the user’s shell, or simply its name.
|
||||
+end_src
|
||||
|
||||
***** Shell version
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-Shell_version-03964bb3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Shell-Shell_version-03964bb3
|
||||
:END:
|
||||
This allows to show the shell’s version in the output of ~shell~.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -208,9 +208,9 @@ This allows to show the shell’s version in the output of ~shell~.
|
||||
#+end_src
|
||||
|
||||
*** Uptime
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Uptime-a7b5361a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Uptime-a7b5361a
|
||||
:END:
|
||||
This variable can shorten the output of the ~uptime~ function. ~on~ shortens
|
||||
it a bit, while ~tiny~ shortens it greatly.
|
||||
- Default value :: ~"on"~
|
||||
@ -228,9 +228,9 @@ it a bit, while ~tiny~ shortens it greatly.
|
||||
#+end_src
|
||||
|
||||
*** IP address
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d
|
||||
:END:
|
||||
It is possible to display the machine’s 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"~
|
||||
- Value :: ~"url"~
|
||||
@ -252,15 +252,15 @@ It is possible to display the machine’s public IP address with the function ~i
|
||||
#+end_src
|
||||
|
||||
*** Theming
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd
|
||||
:END:
|
||||
This section will allow the user to modify what Neofetch can and cannot display about the machine’s theming —by this, I mean its GTK theme, its icons and its default font.
|
||||
|
||||
**** Shorten output
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Shorten_output-cbef1fa4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Shorten_output-cbef1fa4
|
||||
:END:
|
||||
With this value, it is possible to shorten the output of the computer’s theming.
|
||||
- Default value :: ~"off"~
|
||||
- Values ::
|
||||
@ -275,9 +275,9 @@ With this value, it is possible to shorten the output of the computer’s themin
|
||||
#+end_src
|
||||
|
||||
**** Enable or disable theming display for GTK2
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571
|
||||
:END:
|
||||
It is possible to explicitely show or hide the computer’s theming with GTK2 with this variable.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -292,9 +292,9 @@ It is possible to explicitely show or hide the computer’s theming with GTK2 wi
|
||||
#+end_src
|
||||
|
||||
**** Enable or disable theming display for GTK3
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK3-c4070e66
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK3-c4070e66
|
||||
:END:
|
||||
The same variable as above is also available for GTK3.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -309,17 +309,17 @@ The same variable as above is also available for GTK3.
|
||||
#+end_src
|
||||
|
||||
** Hardware
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-de7ed990
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-de7ed990
|
||||
:END:
|
||||
*** CPU
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-eb0bcd7d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-eb0bcd7d
|
||||
:END:
|
||||
**** CPU brand
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b
|
||||
:END:
|
||||
With this variables, it is possible to show or hide the brand of a CPU in
|
||||
the ~cpu~ output.
|
||||
- Default value :: ~"on"~
|
||||
@ -335,9 +335,9 @@ the ~cpu~ output.
|
||||
#+end_src
|
||||
|
||||
**** CPU speed
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed-2bf6e5f7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed-2bf6e5f7
|
||||
:END:
|
||||
With this variable, it is possible to show or hide the speed of the CPU.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -352,9 +352,9 @@ With this variable, it is possible to show or hide the speed of the CPU.
|
||||
#+end_src
|
||||
|
||||
**** CPU speed type
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f
|
||||
:END:
|
||||
This allows Neofetch to know what type of speed it has to fetch regarding the machine’s CPU. Any file in ~/sys/devices/system/cpu/cpu0/cpufreq~ can be used as a value.
|
||||
- Default value :: ~"bios_limit"~
|
||||
- Values ::
|
||||
@ -369,9 +369,9 @@ This allows Neofetch to know what type of speed it has to fetch regarding the ma
|
||||
#+end_src
|
||||
|
||||
**** CPU speed shorthand
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08
|
||||
:END:
|
||||
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"~
|
||||
- Values ::
|
||||
@ -386,9 +386,9 @@ This value allows to show sorter CPU speed with less digits. This flag is not su
|
||||
#+end_src
|
||||
|
||||
**** CPU cores
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354
|
||||
:END:
|
||||
With this variable, it is possible to display the number of cores that are available in the CPU.
|
||||
- Default value :: ~"logical"~
|
||||
- Values ::
|
||||
@ -406,9 +406,9 @@ With this variable, it is possible to display the number of cores that are avail
|
||||
#+end_src
|
||||
|
||||
**** CPU temperature
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c
|
||||
:END:
|
||||
This variable allows the user to hide or show the CPU’s temperature, and if shown, the user can display it in Celcius or Farenheit degrees. For FreeBSD and NetBSD-based systems, you’ll need to enable the ~coretemp~ kernel module. This only supports newer Intel processors.
|
||||
- Default value :: ~"off"~
|
||||
- Values ::
|
||||
@ -426,15 +426,15 @@ This variable allows the user to hide or show the CPU’s temperature, and if sh
|
||||
#+end_src
|
||||
|
||||
*** GPU
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-2c842575
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-2c842575
|
||||
: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.
|
||||
|
||||
**** GPU brand
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615
|
||||
:END:
|
||||
This value allows the user to hide or show the brand of their GPU in the output of ~gpu~.
|
||||
- Default value :: ~"on"~
|
||||
- Values ::
|
||||
@ -450,9 +450,9 @@ This value allows the user to hide or show the brand of their GPU in the output
|
||||
#+end_src
|
||||
|
||||
**** Which GPU to display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac
|
||||
:END:
|
||||
This allows the user to choose which GPU appears in the output of the function ~gpu~.
|
||||
- Default value :: ~"all"~
|
||||
- Values ::
|
||||
@ -474,9 +474,9 @@ This allows the user to choose which GPU appears in the output of the function ~
|
||||
#+end_src
|
||||
|
||||
*** Resolution
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865
|
||||
: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.
|
||||
- Default value :: ~"off"~
|
||||
- Values ::
|
||||
|
@ -6,15 +6,15 @@
|
||||
#+PROPERTY: header-args:conf :exports code :mkdirp yes :tangle ~/.config/picom/picom.conf
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-a5320326
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-a5320326
|
||||
: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][ibhagwan’s fork of compton]] which provides the ~dual-kawase~ blur from [[https://github.com/tryone144/compton][tryone’s compton]] and rounded corners from [[https://github.com/sdhand/picom][sdhand’s compton]].
|
||||
|
||||
* Shadows
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shadows-f4ffbb27
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Shadows-f4ffbb27
|
||||
: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 don’t work out too well with rounded corners.
|
||||
#+BEGIN_SRC conf
|
||||
shadow = false;
|
||||
@ -84,10 +84,10 @@ particular Xinerama screen to the screen.
|
||||
#+END_SRC
|
||||
|
||||
** Deprecated options
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS:conf: :tangle no
|
||||
:CUSTOM_ID: Shadows-Deprecated_options-da215d5a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS:conf: :tangle no
|
||||
:CUSTOM_ID: Shadows-Deprecated_options-da215d5a
|
||||
:END:
|
||||
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.
|
||||
@ -116,9 +116,9 @@ or
|
||||
#+END_SRC
|
||||
|
||||
* Rounded corners
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rounded_corners-33bfcd20
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Rounded_corners-33bfcd20
|
||||
:END:
|
||||
A great feature added by ibhagwan’s fork of picom is the addition of rounded corners from sdhand’s fork, and the Kawase blur (described [[#Background_blurring-55835066][here]]) from tryone144’s fork. Here we can see the declaration of the corners’ radius:
|
||||
#+BEGIN_SRC conf
|
||||
corner-radius = 9.0;
|
||||
@ -132,9 +132,9 @@ It is also possible to exclude some windows from getting their corners rounded.
|
||||
#+END_SRC
|
||||
|
||||
* Fading
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Fading-419d8047
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Fading-419d8047
|
||||
: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~.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
@ -176,9 +176,9 @@ Finally, this option is a workaround for Openbox, Fluxbox and others by not fadi
|
||||
#+END_SRC
|
||||
|
||||
* Transparency and opacity
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Transparency_and_opacity-6c6b36d2
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Transparency_and_opacity-6c6b36d2
|
||||
: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.
|
||||
| Default value | ~1.0~ |
|
||||
| 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
|
||||
|
||||
* Background blurring
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Background_blurring-55835066
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Background_blurring-55835066
|
||||
:END:
|
||||
The following are the parameters for background blurring, see the \*BLUR\* section for more information.
|
||||
#+BEGIN_SRC conf
|
||||
blur: {
|
||||
@ -296,9 +296,9 @@ It is possible to write exclude conditions for background blur.
|
||||
];
|
||||
#+END_SRC
|
||||
* General settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-41398de7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-41398de7
|
||||
:END:
|
||||
Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
@ -512,9 +512,9 @@ Following per window-type options are available:
|
||||
#+END_SRC
|
||||
|
||||
** GLX backend-specific options
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-GLX_backend-specific_options-43892981
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-GLX_backend-specific_options-43892981
|
||||
: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.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
|
@ -9,9 +9,9 @@
|
||||
#+PROPERTY: header-args:conf-windows :tangle ~/.config/polybar/config :noweb yes :exports code :mkdirp yes
|
||||
|
||||
* Presentation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-4e723f32
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-4e723f32
|
||||
:END:
|
||||
*Before proceeding, be aware that I deprecated this polybar config on August 22nd, 2020, meaning I won’t 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.
|
||||
@ -23,9 +23,9 @@ Be aware that this PDF documents suffers from a couple of issues with some chara
|
||||
#+END_EXPORT
|
||||
|
||||
* General settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-e02fb78c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-e02fb78c
|
||||
:END:
|
||||
Some general settings are available for Polybar, and they are declared under
|
||||
the ~[settings]~ section.
|
||||
#+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
|
||||
|
||||
* Colors declaration for polybar
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Colors_declaration_for_polybar-75ee0b65
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Colors_declaration_for_polybar-75ee0b65
|
||||
:END:
|
||||
#+BEGIN_SRC conf-windows :exports none
|
||||
; -*- mode: conf-windows -*-
|
||||
#+END_SRC
|
||||
@ -74,9 +74,9 @@ Polybar is also aware of alerts sent by window managers such as i3 when a window
|
||||
#+END_SRC
|
||||
|
||||
* Declaration of the bars
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-a95135a3
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-a95135a3
|
||||
: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:
|
||||
#+BEGIN_SRC conf-windows :tangle no
|
||||
[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.
|
||||
|
||||
** Top bar declaration
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-fc0cd977
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-fc0cd977
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[bar/top]
|
||||
#+END_SRC
|
||||
|
||||
*** Positioning
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Positioning-2505760c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Positioning-2505760c
|
||||
: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.
|
||||
#+NAME: monitor-bar
|
||||
#+BEGIN_SRC conf-windows
|
||||
@ -132,9 +132,9 @@ The top bar doesn’t include any system tray, so let’s disable that.
|
||||
#+END_SRC
|
||||
|
||||
*** Colors and display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Colors_and_display-30f12652
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Colors_and_display-30f12652
|
||||
:END:
|
||||
As explained above, we declared some global variables when it comes to colors, and this is where they will be used. The bar’s background will be of the same color as the main background color declared earlier, and the same goes for the foreground.
|
||||
#+NAME: bar-colors
|
||||
#+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
|
||||
|
||||
*** Fonts and locale
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Fonts_and_locale-70a25466
|
||||
: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:
|
||||
#+NAME: locale-bar
|
||||
#+BEGIN_SRC conf-windows
|
||||
@ -204,9 +204,9 @@ Here’s 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.
|
||||
|
||||
*** Modules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Modules-18979638
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Top_bar_declaration-Modules-18979638
|
||||
: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, we’ll get the title of the focused window, and to the left we’ll have the date and time.
|
||||
#+NAME: modules-generate
|
||||
#+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.
|
||||
|
||||
** Bottom bar declaration
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-8504b5ec
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-8504b5ec
|
||||
:END:
|
||||
As described above, we will once again have to declare our bar with an equally unimaginative but explicit name.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[bar/bottom]
|
||||
#+END_SRC
|
||||
|
||||
*** Positioning
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Positioning-b1883756
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Positioning-b1883756
|
||||
:END:
|
||||
The variables are the same as above, but two of them will be slightly modified:
|
||||
#+BEGIN_SRC conf-windows
|
||||
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
|
||||
|
||||
*** Colors and display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Colors_and_display-854aae82
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
<<bar-colors>>
|
||||
@ -305,9 +305,9 @@ Nothing changes from the top bar, all the variables stay with the same values. S
|
||||
#+END_SRC
|
||||
|
||||
*** Fonts and locale
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Fonts_and_locale-67459d62
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Fonts_and_locale-67459d62
|
||||
:END:
|
||||
Again, nothing changes from the top bar, so for more info on what’s 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
|
||||
<<locale-bar>>
|
||||
@ -315,9 +315,9 @@ Again, nothing changes from the top bar, so for more info on what’s going on,
|
||||
#+END_SRC
|
||||
|
||||
*** Modules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Modules-702b21fc
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Declaration_of_the_bars-Bottom_bar_declaration-Modules-702b21fc
|
||||
: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:
|
||||
#+NAME: table-modules-bottom
|
||||
| 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.
|
||||
|
||||
* Modules
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-2e1a51bc
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-2e1a51bc
|
||||
:END:
|
||||
Before we begin to describe the different modules, I would like to point out something that will be repeated multiple times if I don’t 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
|
||||
#+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
|
||||
|
||||
** Hardware
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-26426ebd
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-26426ebd
|
||||
:END:
|
||||
*** Battery
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Battery-299f2e42
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Battery-299f2e42
|
||||
: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~.
|
||||
|
||||
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 won’t need this module which is aimed at laptop users. Feel free to remove it if you do not need it.
|
||||
|
||||
*** Filesystem
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Filesystem-26f0a3c6
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Filesystem-26f0a3c6
|
||||
: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 let’s declare it as such:
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/filesystem]
|
||||
@ -423,9 +423,9 @@ If the volume is unmounted (which should be worrying considering the mountpoints
|
||||
#+END_SRC
|
||||
|
||||
*** Xbacklight
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Xbacklight-2901c504
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Xbacklight-2901c504
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/xbacklight]
|
||||
@ -437,9 +437,9 @@ This module is used in order to display the level of brightness of a screen. It
|
||||
#+END_SRC
|
||||
|
||||
*** ACPI backlight
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-ACPI_backlight-9eaeaa79
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-ACPI_backlight-9eaeaa79
|
||||
:END:
|
||||
This module indicates the backlight level of a screen thanks to the ACPI Linux module. There isn’t 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
|
||||
[module/backlight-acpi]
|
||||
@ -449,9 +449,9 @@ This module indicates the backlight level of a screen thanks to the ACPI Linux m
|
||||
#+END_SRC
|
||||
|
||||
*** CPU
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-CPU-365dcb98
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-CPU-365dcb98
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/cpu]
|
||||
@ -484,9 +484,9 @@ Finally, this module will be underlined in red.
|
||||
#+END_SRC
|
||||
|
||||
*** Memory
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Memory-2f2f9475
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Memory-2f2f9475
|
||||
:END:
|
||||
Similarly to the CPU module, it is possible for Polybar to display the RAM load of the computer. As above, let’s declare this module as an internal module to Polybar:
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/memory]
|
||||
@ -511,9 +511,9 @@ Lastly, it will be underlined in green.
|
||||
#+END_SRC
|
||||
|
||||
*** Wlan
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Wlan-3457f36b
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Wlan-3457f36b
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/wlan]
|
||||
@ -544,9 +544,9 @@ The format of the module when connected to a network will the the display of the
|
||||
#+END_SRC
|
||||
|
||||
*** Ethernet
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Ethernet-dc749304
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Ethernet-dc749304
|
||||
:END:
|
||||
Just like any other module, the ethernet module has to be declared as an internal module.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/eth]
|
||||
@ -578,9 +578,9 @@ The module will be underlined in green.
|
||||
#+END_SRC
|
||||
|
||||
*** Volume
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Volume-ebf9f7a4
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Volume-ebf9f7a4
|
||||
:END:
|
||||
The volume module in Polybar is linked to its internal bindings to ALSA. Let’s declare it accordingly.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/volume]
|
||||
@ -606,9 +606,9 @@ In any case, it will be underlined in green.
|
||||
#+END_SRC
|
||||
|
||||
*** Temperature
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Temperature-a9f08cde
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Hardware-Temperature-a9f08cde
|
||||
: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.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/temperature]
|
||||
@ -632,13 +632,13 @@ The format of the module is the thermometer emoji followed by the temperature of
|
||||
#+END_SRC
|
||||
|
||||
** Software
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-f6529189
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-f6529189
|
||||
:END:
|
||||
*** Window title
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Window_title-3f931641
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Window_title-3f931641
|
||||
:END:
|
||||
This module’s 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, let’s declare the module accordingly, including the piece of common code declared at the beginning of the chapter:
|
||||
#+BEGIN_SRC conf-windows
|
||||
[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
|
||||
|
||||
*** i3
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-db36ddfb
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-db36ddfb
|
||||
: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, let’s declare it; it is an internal module by the way.
|
||||
#+BEGIN_SRC conf-windows
|
||||
[module/i3]
|
||||
@ -703,9 +703,9 @@ We also wand to set the label mode to be whichever mode the workspace described
|
||||
#+end_src
|
||||
|
||||
**** Workspace icons
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Workspace_icons-89237191
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Workspace_icons-89237191
|
||||
:END:
|
||||
Now, let’s name our workspaces. We can give them whatever name we want them to have, but I just like the aesthetics of Japanese characters, so let’s go with the kanji equivalent of the number of the workspaces.
|
||||
#+NAME: ws-names
|
||||
| workspace number | name |
|
||||
@ -732,9 +732,9 @@ In case we create a workspace which isn’t named from ~0~ to ~9~, I want it to
|
||||
#+end_src
|
||||
|
||||
**** Focused workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Focused_workspaces-0ca3b93d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Focused_workspaces-0ca3b93d
|
||||
:END:
|
||||
Now we can define the label itself. First, we will need to define the label when the workspace is focused. We’ll simply take the alternative background for the focused label, and the underline will be defined from Xrdb’s 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
|
||||
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
|
||||
|
||||
**** Visible workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Visible_workspaces-4be78e50
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Visible_workspaces-4be78e50
|
||||
: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 isn’t 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
|
||||
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
|
||||
|
||||
**** Unfocused workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Unfocused_workspaces-13063042
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Unfocused_workspaces-13063042
|
||||
:END:
|
||||
When it comes to the unfocused label, there won’t be any custom background or underline, so we’ll just copy the two remaining lines from the focused labels for unfocused labels.
|
||||
#+begin_src conf-windows
|
||||
label-unfocused = %icon%
|
||||
@ -766,9 +766,9 @@ When it comes to the unfocused label, there won’t be any custom background or
|
||||
#+end_src
|
||||
|
||||
**** Urgent workspaces
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Urgent_workspaces-ed2bd93c
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-i3-Urgent_workspaces-ed2bd93c
|
||||
:END:
|
||||
Lastly, we get our urgent workspaces: workspaces in which most of the time it’s 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, let’s 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
|
||||
label-urgent = %icon%
|
||||
@ -777,9 +777,9 @@ Lastly, we get our urgent workspaces: workspaces in which most of the time it’
|
||||
#+end_src
|
||||
|
||||
*** Mpd
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Mpd-4b1ec78e
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Mpd-4b1ec78e
|
||||
: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.
|
||||
|
||||
First, let’s 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
|
||||
|
||||
*** Date
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Date-f7338626
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Modules-Software-Date-f7338626
|
||||
:END:
|
||||
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
|
||||
[module/date]
|
||||
@ -846,9 +846,9 @@ This module is underlined in blue:
|
||||
#+END_SRC
|
||||
|
||||
* Footnotes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Footnotes-62d05520
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Footnotes-62d05520
|
||||
:END:
|
||||
|
||||
[fn:1] [[https://github.com/polybar/polybar/wiki/Fonts][https://github.com/polybar/polybar/wiki/Fonts]]
|
||||
|
||||
|
@ -7,15 +7,15 @@
|
||||
#+PROPERTY: header-args:toml :mkdirp yes :tangle ~/.rustfmt.toml
|
||||
|
||||
* Introduction
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-465e99fe
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Introduction-465e99fe
|
||||
:END:
|
||||
The ~.rustfmt.toml~ file located in the ~$HOME~ directory is a global configuration file for Rust’s code formatters, such as ~rustfmt~. In this file, you can find how my Rust code is always formatted.
|
||||
|
||||
* General settings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-7f5cb2f6
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-7f5cb2f6
|
||||
:END:
|
||||
First, we are using the 2018 edition of Rust.
|
||||
#+BEGIN_SRC toml
|
||||
edition = "2018"
|
||||
@ -38,9 +38,9 @@ Merge multiple imports into a single nested import.
|
||||
#+END_SRC
|
||||
|
||||
* Structs and Enums
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Structs_and_Enums-6a2a856d
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Structs_and_Enums-6a2a856d
|
||||
: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.
|
||||
|
||||
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
|
||||
|
||||
* Comments
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Comments-b1904bb0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Comments-b1904bb0
|
||||
:END:
|
||||
Convert ~/* */~ comments to ~//~ comments where possible.
|
||||
#+BEGIN_SRC toml
|
||||
normalize_comments = true
|
||||
@ -78,9 +78,9 @@ Report ~TODO~ items in comments.
|
||||
#+END_SRC
|
||||
|
||||
* Documentation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Documentation-0c7981c7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Documentation-0c7981c7
|
||||
:END:
|
||||
Format code snippet included in doc comments.
|
||||
#+BEGIN_SRC toml
|
||||
format_code_in_doc_comments = true
|
||||
@ -91,9 +91,9 @@ Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
|
||||
#+END_SRC
|
||||
|
||||
* Whitespace
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Whitespace-e8792b44
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Whitespace-e8792b44
|
||||
:END:
|
||||
Use tab characters for indentation, spaces for alignment.
|
||||
#+BEGIN_SRC toml
|
||||
hard_tabs = false
|
||||
|
@ -7,15 +7,15 @@
|
||||
#+PROPERTY: header-args :mkdirp yes :tangle ~/.tmux.conf.local
|
||||
|
||||
* Presentation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-0b37c6c0
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-0b37c6c0
|
||||
:END:
|
||||
I don’t really use tmux often, but I certainly do like a nice presentation and useful features, hence this configuration. This config file is inspired by gpakosz’s tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]].
|
||||
|
||||
* Windows and pane creation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Windows_and_pane_creation-66275518
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Windows_and_pane_creation-66275518
|
||||
:END:
|
||||
Whether if a new *window* will retain the current path. Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
@ -42,9 +42,9 @@ tmux_conf_new_session_prompt=false
|
||||
#+END_SRC
|
||||
|
||||
* Display
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-d5ae1908
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-d5ae1908
|
||||
:END:
|
||||
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2). Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
@ -81,9 +81,9 @@ These variables set the left/right separators between sections. With the current
|
||||
#+END_SRC
|
||||
|
||||
** Colors and style
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-Colors_and_style-0994a014
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-Colors_and_style-0994a014
|
||||
: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.
|
||||
|
||||
Choose the style of the pane borders. Possible values are:
|
||||
@ -133,9 +133,9 @@ Set the style of the status line.
|
||||
#+END_SRC
|
||||
|
||||
** Window status bar
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-Window_status_bar-dff37ae7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-Window_status_bar-dff37ae7
|
||||
:END:
|
||||
The following variables are to set the window’s status style and format.
|
||||
|
||||
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
|
||||
|
||||
* Clipboard
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Clipboard-66d0d03a
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Clipboard-66d0d03a
|
||||
:END:
|
||||
Whether if in copy mode, copying the selection also copies to the OS clipboard. Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
@ -313,9 +313,9 @@ Whether if in copy mode, copying the selection also copies to the OS clipboard.
|
||||
#+END_SRC
|
||||
|
||||
* User customizations
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: User_customizations-c913b5d7
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: User_customizations-c913b5d7
|
||||
:END:
|
||||
Here we can override or undo some setting from settings from tmux. First, we can increase the history size.
|
||||
#+BEGIN_SRC conf-unix
|
||||
set -g history-limit 10000
|
||||
|
Loading…
Reference in New Issue
Block a user