[Org, meta] Change formatting of org files
This commit is contained in:
parent
58b5b82531
commit
527380e5ff
@ -11,22 +11,35 @@
|
||||
: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.
|
||||
From the Arch Wiki: awesome is a highly configurable, next generation framework
|
||||
window manager for Xorg. It is very fast and extensible. It is primarily
|
||||
targeted at power users, developers and any people dealing with every day
|
||||
computing tasks and who want to have fine-grained control on its graphical
|
||||
environment.
|
||||
|
||||
Personally, what really made me want to try Awesome is the fact its configuration file is written with an actual programming language and not just a configuration language like with i3, and by the fact it works with tags and not workspaces which makes window management much more flexible.
|
||||
Personally, what really made me want to try Awesome is the fact its
|
||||
configuration file is written with an actual programming language and not just a
|
||||
configuration language like with i3, and by the fact it works with tags and not
|
||||
workspaces which makes window management much more flexible.
|
||||
|
||||
This document was written in Emacs with Org-mode and is both the documentation and source code of my configuration file which can be extracted to ~$HOME/.config/awesome/rc.lua~ through a call to ~org-babel-tangle~.
|
||||
This document was written in Emacs with Org-mode and is both the documentation
|
||||
and source code of my configuration file which can be extracted to
|
||||
~$HOME/.config/awesome/rc.lua~ through a call to ~org-babel-tangle~.
|
||||
|
||||
* Loading libraries
|
||||
: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:
|
||||
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())
|
||||
#+END_SRC
|
||||
|
||||
In order to be able to load libraries properly, I first need to make sure LuaRocks is installed, so I can also make sure the packages our configuration depends on installed through it can be found. If LuaRocks is not installed, then do nothing.
|
||||
In order to be able to load libraries properly, I first need to make sure
|
||||
LuaRocks is installed, so I can also make sure the packages our configuration
|
||||
depends on installed through it can be found. If LuaRocks is not installed, then
|
||||
do nothing.
|
||||
#+BEGIN_SRC lua
|
||||
pcall(require, "luarocks.loader")
|
||||
#+END_SRC
|
||||
@ -71,7 +84,8 @@ I also want to be able to autofocus the first window when I go to another worksp
|
||||
require("awful.autofocus")
|
||||
#+END_SRC
|
||||
|
||||
And finally, I want to be able to declare some shortcuts specific to some apps thanks to the hotkeys help widget.
|
||||
And finally, I want to be able to declare some shortcuts specific to some apps
|
||||
thanks to the hotkeys help widget.
|
||||
#+BEGIN_SRC lua
|
||||
require("awful.hotkeys_popup.keys")
|
||||
#+END_SRC
|
||||
@ -84,7 +98,8 @@ By the way, let’s initialize the ~random~ method of the ~math~ library:
|
||||
: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.
|
||||
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
|
||||
naughty.notify({ preset = naughty.config.presets.critical,
|
||||
@ -118,7 +133,10 @@ And this code handles runtime errors after startup thanks to signals.
|
||||
: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.
|
||||
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
|
||||
@ -127,7 +145,9 @@ With Awesome, it is possible to load or write custom themes in order to give Awe
|
||||
: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.
|
||||
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"
|
||||
editor = os.getenv("EDITOR") or "emacsclient -c"
|
||||
@ -137,7 +157,11 @@ The two following variables are set so that I don’t need to go over my whole c
|
||||
: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.
|
||||
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"
|
||||
shift = "Shift"
|
||||
@ -158,7 +182,8 @@ The following declares the default Modkey. Usually, ~Mod4~ is the Super key, sit
|
||||
: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 function sets a random wallpaper from the directory
|
||||
=~/Pictures/Wallpapers=, see [[file:bin.org::#pape-update-bdecbadf][pape-update]] in my custom scripts.
|
||||
#+BEGIN_SRC lua
|
||||
local function set_random_pape()
|
||||
awful.spawn.with_shell("pape-update")
|
||||
@ -172,7 +197,8 @@ This function sets a random wallpaper from the directory =~/Pictures/Wallpapers=
|
||||
: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:
|
||||
I also wrote the following function that will restore the previously set
|
||||
wallpaper:
|
||||
#+BEGIN_SRC lua
|
||||
local function set_wallpaper(_)
|
||||
awful.spawn.with_shell("nitrogen --restore")
|
||||
@ -183,7 +209,8 @@ I also wrote the following function that will restore the previously set wallpap
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Custom_functions-Layout_manipulation-6bc7db06
|
||||
:END:
|
||||
The following function is used by a shortcut described below in [[#Keybindings-Clients-f9f96d60]].
|
||||
The following function is used by a shortcut described below in
|
||||
[[#Keybindings-Clients-f9f96d60]].
|
||||
#+BEGIN_SRC lua
|
||||
local function client_go_back()
|
||||
awful.client.focus.history.previous()
|
||||
@ -302,7 +329,8 @@ The following function is used by a shortcut described below in [[#Keybindings-C
|
||||
: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.
|
||||
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? |
|
||||
|-----------------+----------|
|
||||
@ -358,7 +386,9 @@ Here is the code that activates these layouts:
|
||||
: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.
|
||||
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:
|
||||
@ -382,7 +412,9 @@ The top bar in Awesome is declared thanks to a ~wibar~ widget fro the ~awful~ li
|
||||
: { "restart", awesome.restart }
|
||||
: { "quit", function() awesome.quit() end }
|
||||
|
||||
It is possible to create actual menus in Awesome, including the one available at the top-left corner of the screen. First, let’s declare a menu related to Awesome:
|
||||
It is possible to create actual menus in Awesome, including the one available at
|
||||
the top-left corner of the screen. First, let’s declare a menu related to
|
||||
Awesome:
|
||||
#+NAME: table-awesome-menu
|
||||
| Name | Command |
|
||||
|-------------+---------------------------------------------------------------------|
|
||||
@ -398,7 +430,8 @@ And here is the actual code:
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Next, let’s create the main menu that will be used on ~S-w~ and at the top left of the window:
|
||||
Next, let’s create the main menu that will be used on ~S-w~ and at the top left
|
||||
of the window:
|
||||
#+NAME: table-main-menu
|
||||
| Name | Command | Icon |
|
||||
|---------------+----------------+------------------------|
|
||||
@ -412,7 +445,8 @@ Here is the actual code:
|
||||
}})
|
||||
#+END_SRC
|
||||
|
||||
For now it only has two entries: the Awesome menu and opening a terminal, I will add some more later probably. Let’s specify it as being our main launcher:
|
||||
For now it only has two entries: the Awesome menu and opening a terminal, I will
|
||||
add some more later probably. Let’s specify it as being our main launcher:
|
||||
#+BEGIN_SRC lua
|
||||
launcher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||
menu = mainmenu })
|
||||
@ -441,28 +475,39 @@ Let’s also create a clock widget:
|
||||
: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:
|
||||
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(
|
||||
-- configuration goes here
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
~gears.table.join()~ joins several tables together, as described [[https://awesomewm.org/doc/api/libraries/gears.table.html][here]], which will be useful since all its arguments will be tables generated by the ~awful.button~ method which will be useful in order to manage what clicks on the tags should do. First, let’s manage left clicks.
|
||||
~gears.table.join()~ joins several tables together, as described [[https://awesomewm.org/doc/api/libraries/gears.table.html][here]], which
|
||||
will be useful since all its arguments will be tables generated by the
|
||||
~awful.button~ method which will be useful in order to manage what clicks on the
|
||||
tags should do. First, let’s manage left clicks.
|
||||
|
||||
Left clicks in general are dedicated to tag visibility. A simple left click on a tag should switch this tag as the only visible tag, no matter how many of them were visible beforehand.
|
||||
Left clicks in general are dedicated to tag visibility. A simple left click on a
|
||||
tag should switch this tag as the only visible tag, no matter how many of them
|
||||
were visible beforehand.
|
||||
#+NAME: tag-simple-left-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 1, function(t) t:view_only() end)
|
||||
#+END_SRC
|
||||
|
||||
However, left clicks combined with the modkey will add the clicked tag to the list of visible tags, which allows the user to see windows from several tags at once.
|
||||
However, left clicks combined with the modkey will add the clicked tag to the
|
||||
list of visible tags, which allows the user to see windows from several tags at
|
||||
once.
|
||||
#+NAME: tag-mod-left-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ modkey }, 1, awful.tag.viewtoggle)
|
||||
#+END_SRC
|
||||
|
||||
Right clicks are dedicated to window tagging. A simple right click will untag the currently focused window and tag it again with the clicked tag, moving it effectively from one tag to another.
|
||||
Right clicks are dedicated to window tagging. A simple right click will untag
|
||||
the currently focused window and tag it again with the clicked tag, moving it
|
||||
effectively from one tag to another.
|
||||
#+NAME: tag-simple-right-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 3, function(t)
|
||||
@ -472,7 +517,8 @@ Right clicks are dedicated to window tagging. A simple right click will untag th
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
However, a right click combined with the modkey will add the clicked tag to the currently focused window, making it visible to both tags.
|
||||
However, a right click combined with the modkey will add the clicked tag to the
|
||||
currently focused window, making it visible to both tags.
|
||||
#+NAME: tag-mod-right-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ modkey }, 3, function(t)
|
||||
@ -482,7 +528,9 @@ However, a right click combined with the modkey will add the clicked tag to the
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
The scroll wheel is treated as clicks just as any right or left clicks and can be interpreted by Awesome. They can prove useful when it comes to tags. If a scroll up is detected over tags, then Awesome will display the previous tag.
|
||||
The scroll wheel is treated as clicks just as any right or left clicks and can
|
||||
be interpreted by Awesome. They can prove useful when it comes to tags. If a
|
||||
scroll up is detected over tags, then Awesome will display the previous tag.
|
||||
#+NAME: tag-simple-scroll-up
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end)
|
||||
@ -510,14 +558,17 @@ So, here’s the actual configuration code for the taglist:
|
||||
: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:
|
||||
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(
|
||||
-- List of clicks
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
A left click on a task in the taskbar will simply focus and raise the window linked to it if it is not focused. Otherwise, if the window is focused, the window will be minimized.
|
||||
A left click on a task in the taskbar will simply focus and raise the window
|
||||
linked to it if it is not focused. Otherwise, if the window is focused, the
|
||||
window will be minimized.
|
||||
#+NAME: task-simple-left-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 1, function (c)
|
||||
@ -533,7 +584,9 @@ A left click on a task in the taskbar will simply focus and raise the window lin
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
If the right click is detected, then a list of all the opened clients is invoked so we can switch to another (and if needed switch visible tag). The width of this list will be 250px.
|
||||
If the right click is detected, then a list of all the opened clients is invoked
|
||||
so we can switch to another (and if needed switch visible tag). The width of
|
||||
this list will be 250px.
|
||||
#+NAME: task-simple-right-click
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 3, function()
|
||||
@ -541,7 +594,8 @@ If the right click is detected, then a list of all the opened clients is invoked
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
If a scroll up is detected, then let’s select the previous client in the tasklist.
|
||||
If a scroll up is detected, then let’s select the previous client in the
|
||||
tasklist.
|
||||
#+NAME: task-simple-scroll-up
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 4, function ()
|
||||
@ -575,19 +629,26 @@ So, here’s the actual code for the tasklist:
|
||||
: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:
|
||||
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)
|
||||
#+END_SRC
|
||||
|
||||
If a new screen gets connected, it will need to get a new wallpaper. A lot needs to be done, and all the following lines of code will be inside a block like this:
|
||||
If a new screen gets connected, it will need to get a new wallpaper. A lot needs
|
||||
to be done, and all the following lines of code will be inside a block like
|
||||
this:
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.screen.connect_for_each_screen(function(s)
|
||||
-- Code to be executed goes here
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
So, due the code block above, if you see any reference to ~s~ in the code blocks below, it will refer to the screen being set up by the function.
|
||||
So, due the code block above, if you see any reference to ~s~ in the code blocks
|
||||
below, it will refer to the screen being set up by the function.
|
||||
|
||||
First, let’s set its wallpaper:
|
||||
#+NAME: screen-set-pape
|
||||
@ -595,14 +656,17 @@ First, let’s set its wallpaper:
|
||||
set_wallpaper()
|
||||
#+END_SRC
|
||||
|
||||
Next, let’s build a list of tags for the screen. *Be aware that each screen has its own tag table!* The default layout will be the first refered to in
|
||||
the layouts list described above]].
|
||||
Next, let’s build a list of tags for the screen. *Be aware that each screen has
|
||||
its own tag table!* The default layout will be the first refered to in the
|
||||
layouts list described above.
|
||||
#+NAME: screen-taglist
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" }, s, awful.layout.layouts[1])
|
||||
#+END_SRC
|
||||
|
||||
Next, let’s create the taglist widget. It will use the ~taglist_buttons~ [[#Top_bar-Tag_list-d43dbb62][declared above]] in order to handle clicks on tags, and due to the filter, all tags will be displayed in the tagbar ([[https://awesomewm.org/apidoc/widgets/awful.widget.taglist.html#List_filters][more about tag filters]]).
|
||||
Next, let’s create the taglist widget. It will use the ~taglist_buttons~
|
||||
[[#Top_bar-Tag_list-d43dbb62][declared above]] in order to handle clicks on tags, and due to the filter, all
|
||||
tags will be displayed in the tagbar ([[https://awesomewm.org/apidoc/widgets/awful.widget.taglist.html#List_filters][more about tag filters]]).
|
||||
#+NAME: screen-taglist-widget
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
s.taglist = awful.widget.taglist {
|
||||
@ -612,7 +676,10 @@ Next, let’s create the taglist widget. It will use the ~taglist_buttons~ [[#To
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
A tasklist widget will also get created thanks with the ~tasklist_button~ [[#Top_bar-Tag_list-d43dbb62][declared above]] that will handle clicks on tasks. Contrarily to the taglist widget above, the tasklist will only display the screen’s current tags thanks to its filter.
|
||||
A tasklist widget will also get created thanks with the ~tasklist_button~
|
||||
[[#Top_bar-Tag_list-d43dbb62][declared above]] that will handle clicks on tasks. Contrarily to the taglist
|
||||
widget above, the tasklist will only display the screen’s current tags thanks to
|
||||
its filter.
|
||||
#+NAME: screen-tasklist-widget
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
s.tasklist = awful.widget.tasklist {
|
||||
@ -628,7 +695,11 @@ A promptbox will also be created for the screen:
|
||||
s.promptbox = awful.widget.prompt()
|
||||
#+END_SRC
|
||||
|
||||
Then, Let’s create an imagebox widget in which will be contained an icon indicating which layout is being used. We need one per screen. We will also make it clickable: if there is a left click or a scroll up detected above it, the next layout will be loaded; otherwise if a right click or a scroll down is detected, the previous layout will be loaded.
|
||||
Then, Let’s create an imagebox widget in which will be contained an icon
|
||||
indicating which layout is being used. We need one per screen. We will also make
|
||||
it clickable: if there is a left click or a scroll up detected above it, the
|
||||
next layout will be loaded; otherwise if a right click or a scroll down is
|
||||
detected, the previous layout will be loaded.
|
||||
#+NAME: screen-layout-indicator
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
s.layoutbox = awful.widget.layoutbox(s)
|
||||
@ -645,7 +716,10 @@ Now it is time to create the widget, a ~wibox~ that will contain our bar.
|
||||
s.wibox = awful.wibar({ position = "top", screen = s })
|
||||
#+END_SRC
|
||||
|
||||
Finally, let’s set up our bar. Since it is a horizontal bar, its layout will be horizontal too. Our launcher, taglist and promptbox will be part of the left widgets, while the tasklist will be at the center, and the keyboard indicator, the system tray, the clock and the layout indicator will be on the right.
|
||||
Finally, let’s set up our bar. Since it is a horizontal bar, its layout will be
|
||||
horizontal too. Our launcher, taglist and promptbox will be part of the left
|
||||
widgets, while the tasklist will be at the center, and the keyboard indicator,
|
||||
the system tray, the clock and the layout indicator will be on the right.
|
||||
#+NAME: screen-wibox-setup
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
s.wibox:setup {
|
||||
@ -685,18 +759,23 @@ In the end, our code looks like this:
|
||||
: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.
|
||||
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(
|
||||
awful.button({}, 3, function() mainmenu:toggle() end)
|
||||
))
|
||||
#+END_SRC
|
||||
|
||||
I will also set three mouse bindings for when the mouse is above a client:
|
||||
I will also set three mouse bindings for when the mouse is above a client:
|
||||
- A simple click on a client will focus and raise it.
|
||||
- A click on a client combined with a modkey press will allow the user to move a client after focusing it and making it floating.
|
||||
- A middle click on a client combined with a modkey press will toggle the floating status of the client.
|
||||
- A right click combined with the modkey will allow the user to resize a after focusing it and making it a floating client.
|
||||
- A click on a client combined with a modkey press will allow the user to move a
|
||||
client after focusing it and making it floating.
|
||||
- A middle click on a client combined with a modkey press will toggle the
|
||||
floating status of the client.
|
||||
- A right click combined with the modkey will allow the user to resize a after
|
||||
focusing it and making it a floating client.
|
||||
|
||||
#+BEGIN_SRC lua
|
||||
clientbuttons = gears.table.join(
|
||||
@ -723,22 +802,32 @@ I will also set three mouse bindings for when the mouse is above a client:
|
||||
: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.
|
||||
Keybindings allow the user to execute some Lua code all across Awesome. They all
|
||||
bear at least a list of modifier keys, the actual key to be pressed, the action
|
||||
they keybinding should yield, a description, and a group. The latter two will be
|
||||
useful for the keybindings help window which will display them all, sorted by
|
||||
group and with the description displayed next to the keybinding itself.
|
||||
|
||||
Here are some keybindings related to Awesome itself. Most of them will be described in tables, but due to some limitations from Org-mode (the Emacs mode used to write this document and generate my Awesome configuration), a few of them will be directly written as Lua code.
|
||||
Here are some keybindings related to Awesome itself. Most of them will be
|
||||
described in tables, but due to some limitations from Org-mode (the Emacs mode
|
||||
used to write this document and generate my Awesome configuration), a few of
|
||||
them will be directly written as Lua code.
|
||||
|
||||
Here is a description of the tables displayed below:
|
||||
- Key :: key which toggles the shortcut
|
||||
- Modifiers :: modifier keys that are required to toggle the shortcut
|
||||
- Lambda? :: whether or not the ~Action~ should be nested in a lambda function. Possible values are:
|
||||
- Lambda? :: whether or not the ~Action~ should be nested in a lambda function.
|
||||
Possible values are:
|
||||
- ~no~ :: The value is a Lua function to be executed as is
|
||||
- ~yes~ :: The value is to be inserted into a lambda
|
||||
- ~spawn~ :: The value is to be inserted in an ~awful.spawn~ call in a lambda
|
||||
- ~shell~ :: The value is to be inserted in an ~awful.spawn.with_shell~ call in a lambda
|
||||
- ~shell~ :: The value is to be inserted in an ~awful.spawn.with_shell~ call
|
||||
in a lambda
|
||||
- Action :: code to be executed by the shortcut
|
||||
- What it does :: short description of the shortcut’s action
|
||||
- Group :: group in which the shortcut will appear in Awesome’s help window
|
||||
- Clientkey? :: whether this should be a global shortcut or a shortcut only aimed at clients (value is ~yes~ or ~no~)
|
||||
- Clientkey? :: whether this should be a global shortcut or a shortcut only
|
||||
aimed at clients (value is ~yes~ or ~no~)
|
||||
|
||||
#+NAME: gen-sc-text
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@ -832,7 +921,9 @@ awful.key({modkey, control},"Return",function(c) c:swap(awful.client.getmaster()
|
||||
",\n\n"))
|
||||
#+END_SRC
|
||||
|
||||
Most of these keybindings are available at root-level of Awesome and will be declared in the ~globalkeys~ variable, which will be added then to ~root.keys~ (see [[https://awesomewm.org/doc/api/libraries/root.html#keys]]).
|
||||
Most of these keybindings are available at root-level of Awesome and will be
|
||||
declared in the ~globalkeys~ variable, which will be added then to ~root.keys~
|
||||
(see [[https://awesomewm.org/doc/api/libraries/root.html#keys]]).
|
||||
#+BEGIN_SRC lua :cache yes
|
||||
globalkeys = gears.table.join(
|
||||
-- Awesome
|
||||
@ -950,7 +1041,7 @@ Here will be declared some shortcuts directly related to Awesome itself.
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Keybindings-Clients-f9f96d60
|
||||
:END:
|
||||
These shortcuts are related to clients (aka windows) management.
|
||||
These shortcuts are related to clients (aka windows) management.
|
||||
#+NAME: sc-client
|
||||
| Key | Modifiers | Lambda? | Action | What it does | Group | Clientkey? |
|
||||
|-----+------------------------+---------+----------------------------------+-------------------------------+--------+------------|
|
||||
@ -1045,7 +1136,9 @@ Here will be declared some shortcuts directly related to Awesome itself.
|
||||
| t | modkey, control | no | awful.tag.viewprev | view prev | tag |
|
||||
| s | modkey, control | no | awful.tag.viewnext | view next | tag |
|
||||
|
||||
Another set of shortcuts is linked to the number row on the keyboard that allow the manipulation of the default tags that range from ~1~ to ~10~ (the latter is displayed as ~0~). Here is what the possible actions are:
|
||||
Another set of shortcuts is linked to the number row on the keyboard that allow
|
||||
the manipulation of the default tags that range from ~1~ to ~10~ (the latter is
|
||||
displayed as ~0~). Here is what the possible actions are:
|
||||
#+NAME: sc-tag-num
|
||||
| Key | Modifiers | Action | What it does | Group |
|
||||
|--------+------------------------+---------------------------------+--------------------------------+-------|
|
||||
@ -1058,7 +1151,10 @@ Another set of shortcuts is linked to the number row on the keyboard that allow
|
||||
: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]].
|
||||
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 |
|
||||
|--------------------+-----------+---------+-----------+-------------------------+-------|
|
||||
@ -1068,7 +1164,10 @@ In this category you will find other keybindings that do not fit in other catego
|
||||
: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:
|
||||
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 = {
|
||||
-- Rules here
|
||||
@ -1085,13 +1184,15 @@ With ~awful.rules~, users are able to describe some rules for window clients whe
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
For more documentation on rules and their syntax, you can read the [[https://awesomewm.org/doc/api/libraries/awful.rules.html][official documentation]].
|
||||
For more documentation on rules and their syntax, you can read the [[https://awesomewm.org/doc/api/libraries/awful.rules.html][official
|
||||
documentation]].
|
||||
|
||||
** Universal rules
|
||||
: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:
|
||||
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 = {},
|
||||
properties = {
|
||||
@ -1100,7 +1201,8 @@ The first rule is a universal rule which will match all clients, as you can see
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Here is the list of properties with their value to apply to all clients, and a short explanation as to what they do.
|
||||
Here is the list of properties with their value to apply to all clients, and a
|
||||
short explanation as to what they do.
|
||||
#+NAME: rules-universal-properties-table
|
||||
| Property | Value | What it does |
|
||||
|---------------+---------------------------------------------------------+-------------------------------------------------------------------------|
|
||||
@ -1149,7 +1251,8 @@ This is what my universal rules look like:
|
||||
: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:
|
||||
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 |
|
||||
|----------+--------------+----------------------------------------------------------------|
|
||||
@ -1176,7 +1279,8 @@ Some clients will be declared by default as floating windows. For this, we will
|
||||
: name = { "Event Tester" },
|
||||
: role = { "pop-up" }
|
||||
|
||||
If any of these conditions is matched, then the client will be set as floating, as you can see below:
|
||||
If any of these conditions is matched, then the client will be set as floating,
|
||||
as you can see below:
|
||||
#+NAME: rules-floating
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
{ rule_any = {
|
||||
@ -1200,7 +1304,8 @@ Any normal or dialog client will get a titlebar. This is enabled like so:
|
||||
: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.
|
||||
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 |
|
||||
|-----------------+------------+-----|
|
||||
@ -1240,29 +1345,36 @@ This is what these rules look like:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Signals-e32971d6
|
||||
:END:
|
||||
Signals are a way for Awesome to handle events, such as client creation or deletion.
|
||||
Signals are a way for Awesome to handle events, such as client creation or
|
||||
deletion.
|
||||
|
||||
** Client creation
|
||||
: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.
|
||||
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)
|
||||
awful.client.movetoscreen(c, mouse.screen)
|
||||
if awesome.startup
|
||||
and not c.size_hints.user_position
|
||||
and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
end)
|
||||
#+END_SRC
|
||||
client.connect_signal("manage", function (c)
|
||||
awful.client.movetoscreen(c, mouse.screen)
|
||||
if awesome.startup
|
||||
and not c.size_hints.user_position
|
||||
and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
** Titlebar creation
|
||||
: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.
|
||||
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)
|
||||
local buttons = gears.table.join(
|
||||
@ -1273,14 +1385,19 @@ It is possible for Awesome to send request signals, such as the request to creat
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
The function has two main parts: the creation of the titlebar buttons (mouse handling on the titlebar), and the creation of the titlebar itself. The creation of the button is done by creating a local variable ~buttons~ which will be a table created by the library ~gears~, in which will be buttons created by the user.
|
||||
The function has two main parts: the creation of the titlebar buttons (mouse
|
||||
handling on the titlebar), and the creation of the titlebar itself. The creation
|
||||
of the button is done by creating a local variable ~buttons~ which will be a
|
||||
table created by the library ~gears~, in which will be buttons created by the
|
||||
user.
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
local buttons = gears.table.join(
|
||||
-- Buttons declared here
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
You can see a left click will enable the user to raise the window, but also it will enable the user to move the window (if it is floating of course).
|
||||
You can see a left click will enable the user to raise the window, but also it
|
||||
will enable the user to move the window (if it is floating of course).
|
||||
#+NAME: signal-titlebar-button1
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 1, function()
|
||||
@ -1289,7 +1406,8 @@ You can see a left click will enable the user to raise the window, but also it w
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
A right click on the titlebar will also raise the window, but will instead allow the user to resize the client.
|
||||
A right click on the titlebar will also raise the window, but will instead allow
|
||||
the user to resize the client.
|
||||
#+NAME: signal-titlebar-button3
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.button({ }, 3, function()
|
||||
@ -1298,7 +1416,9 @@ A right click on the titlebar will also raise the window, but will instead allow
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
Next comes the actual creation of the titlebar for the client ~c~. For that, we call ~awful.titlebar()~, tell it where the titlebar should be relative to the client and what its setup should be. The full call should look like so:
|
||||
Next comes the actual creation of the titlebar for the client ~c~. For that, we
|
||||
call ~awful.titlebar()~, tell it where the titlebar should be relative to the
|
||||
client and what its setup should be. The full call should look like so:
|
||||
#+NAME: signal-titlebar-create
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
awful.titlebar(c, {position="left", size = 22}) : setup {
|
||||
@ -1306,18 +1426,24 @@ Next comes the actual creation of the titlebar for the client ~c~. For that, we
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
In the setup, I need to repeat to Awesome the titlebar should be on the left of the client, and I also tell it the layout alignment of the titlebar will be vertical, because I like vertial titlebars. I also first send it three tables:
|
||||
In the setup, I need to repeat to Awesome the titlebar should be on the left of
|
||||
the client, and I also tell it the layout alignment of the titlebar will be
|
||||
vertical, because I like vertial titlebars. I also first send it three tables:
|
||||
- The top or left elements of the titlebar (here the top)
|
||||
- The middle elements of the titlebar
|
||||
- The bottom or right elements of the titlebar (here the bottom)
|
||||
You can notice in the setup’s code below that I haven’t included anything in the middle elements, the only elements I am interested in are the top and bottom elements. In the top elements, I have (top to bottom):
|
||||
You can notice in the setup’s code below that I haven’t included anything in the
|
||||
middle elements, the only elements I am interested in are the top and bottom
|
||||
elements. In the top elements, I have (top to bottom):
|
||||
- A close button
|
||||
- A maximize button
|
||||
- A minimize button
|
||||
- And an indication to Awesome these elements should be vertically aligned
|
||||
To make Awesome happy, I also must indicate that the middle elements are vertically aligned, and then I can declare my bottom elements:
|
||||
To make Awesome happy, I also must indicate that the middle elements are
|
||||
vertically aligned, and then I can declare my bottom elements:
|
||||
- A button for toggling client floating
|
||||
- And again the indication to Awesome these elements should be vertically aligned
|
||||
- And again the indication to Awesome these elements should be vertically
|
||||
aligned
|
||||
#+NAME: signal-titlebar-setup
|
||||
#+BEGIN_SRC lua :tangle no
|
||||
{ -- Top
|
||||
@ -1341,14 +1467,20 @@ To make Awesome happy, I also must indicate that the middle elements are vertica
|
||||
: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.
|
||||
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)
|
||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||
end)
|
||||
#+END_SRC
|
||||
|
||||
It is also possible to change the color of the borders based on client focus. While my clients don’t have any border, they do have a titlebar which color changes based on the client’s focus. This is handled by the following code snippet:
|
||||
It is also possible to change the color of the borders based on client focus.
|
||||
While my clients don’t have any border, they do have a titlebar which color
|
||||
changes based on the client’s focus. This is handled by the following code
|
||||
snippet:
|
||||
#+BEGIN_SRC lua
|
||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||
@ -1358,7 +1490,10 @@ It is also possible to change the color of the borders based on client focus. Wh
|
||||
: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.
|
||||
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
|
||||
|
File diff suppressed because it is too large
Load Diff
1492
org/config/emacs.org
1492
org/config/emacs.org
File diff suppressed because it is too large
Load Diff
@ -11,9 +11,12 @@
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Presentation-340195eb
|
||||
:END:
|
||||
The file present in =~/.config/fish/config.fish= is the configuration file for the [[https://fishshell.com/][fish shell]]. It contains custom functions, environment variables and abbreviations.
|
||||
The file present in =~/.config/fish/config.fish= is the configuration file for
|
||||
the [[https://fishshell.com/][fish shell]]. It contains custom functions, environment variables and
|
||||
abbreviations.
|
||||
|
||||
Just in case, we might need sometimes to declare the fish function =fish_title= as =true=, so let’s do so.
|
||||
Just in case, we might need sometimes to declare the fish function =fish_title=
|
||||
as =true=, so let’s do so.
|
||||
#+BEGIN_SRC fish
|
||||
function fish_title
|
||||
true
|
||||
@ -24,7 +27,8 @@ Just in case, we might need sometimes to declare the fish function =fish_title=
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Fish_from_within_Emacs-360c0a74
|
||||
:END:
|
||||
I sometimes call fish from within emacs, with =M-x ansi-term=. In this case, the variable =TERM= needs to have the value =eterm-color=.
|
||||
I sometimes call fish from within emacs, with =M-x ansi-term=. In this case, the
|
||||
variable =TERM= needs to have the value =eterm-color=.
|
||||
#+BEGIN_SRC fish
|
||||
if test -n "$EMACS"
|
||||
set -x TERM eterm-color
|
||||
@ -35,7 +39,10 @@ I sometimes call fish from within emacs, with =M-x ansi-term=. In this case, the
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Tramp_remote_access-72aedec2
|
||||
:END:
|
||||
When accessing from a remote machine our computer from Emacs, tramp needs a precise shell appearance: a simple =$= followed by a space after which to put the commands it needs to execute, and nothing else. Due to this, let’s deactivate and redefine some of the functions defining the appearance of fish.
|
||||
When accessing from a remote machine our computer from Emacs, tramp needs a
|
||||
precise shell appearance: a simple =$= followed by a space after which to put
|
||||
the commands it needs to execute, and nothing else. Due to this, let’s
|
||||
deactivate and redefine some of the functions defining the appearance of fish.
|
||||
#+BEGIN_SRC fish
|
||||
if test "$TERM" = "dumb"
|
||||
function fish_prompt
|
||||
@ -51,7 +58,10 @@ When accessing from a remote machine our computer from Emacs, tramp needs a prec
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Regular_fish_shell_appearance-c3e532e1
|
||||
:END:
|
||||
Now, there is only one function I modify when it comes to the appearance of fish when I’m the one using it: the ~fish_greeting~ function. I use it to give me an overview of my computer’s status, including its hostname, uptime, disks usage, ram usage, swap usage, and networking.
|
||||
Now, there is only one function I modify when it comes to the appearance of fish
|
||||
when I’m the one using it: the ~fish_greeting~ function. I use it to give me an
|
||||
overview of my computer’s status, including its hostname, uptime, disks usage,
|
||||
ram usage, swap usage, and networking.
|
||||
#+BEGIN_SRC fish
|
||||
set RED '\033[0;31m'
|
||||
set GREEN '\033[0;32m'
|
||||
@ -120,7 +130,9 @@ Now, there is only one function I modify when it comes to the appearance of fish
|
||||
end
|
||||
#+END_SRC
|
||||
|
||||
The theme I use for fish is [[https://github.com/oh-my-fish/theme-bobthefish][bobthefish]], which by default puts a really long timestamp to the right of the prompt. I want something shorter, so here is the variable to set, using the format specified in ~date(1)~.
|
||||
The theme I use for fish is [[https://github.com/oh-my-fish/theme-bobthefish][bobthefish]], which by default puts a really long
|
||||
timestamp to the right of the prompt. I want something shorter, so here is the
|
||||
variable to set, using the format specified in ~date(1)~.
|
||||
#+BEGIN_SRC fish
|
||||
set -g theme_date_format "+%g-%m-%d %H:%M:%S"
|
||||
#+END_SRC
|
||||
@ -139,12 +151,14 @@ Finally, let’s set our prompt’s theme to the Nord theme.
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Global_variables-1c84df8b
|
||||
:END:
|
||||
In order to keep some other code clean, I set the ~$BROWSER~ variable so I don’t have to call my web browser directly but rather with this variable.
|
||||
In order to keep some other code clean, I set the ~$BROWSER~ variable so I don’t
|
||||
have to call my web browser directly but rather with this variable.
|
||||
#+BEGIN_SRC fish
|
||||
set -gx BROWSER firefox
|
||||
#+END_SRC
|
||||
|
||||
Sometimes, software will rely on =SUDO_ASKPASS= to get a GUI from which it can get the sudo password. So, let’s declare it.
|
||||
Sometimes, software will rely on =SUDO_ASKPASS= to get a GUI from which it can
|
||||
get the sudo password. So, let’s declare it.
|
||||
#+BEGIN_SRC fish
|
||||
set -gx SUDO_ASKPASS ~/.local/bin/askpass
|
||||
#+END_SRC
|
||||
@ -153,7 +167,9 @@ Sometimes, software will rely on =SUDO_ASKPASS= to get a GUI from which it can g
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Global_variables-Development-76b3ff13
|
||||
:END:
|
||||
Now, let’s declare our editor of choice, EmacsClient; not Emacs itself since it will most often be just quick edits, nothing too heavy, if it is called from the ~EDITOR~ variable (from Git, for example), or from the ~VISUAL~ variable.
|
||||
Now, let’s declare our editor of choice, EmacsClient; not Emacs itself since it
|
||||
will most often be just quick edits, nothing too heavy, if it is called from the
|
||||
~EDITOR~ variable (from Git, for example), or from the ~VISUAL~ variable.
|
||||
#+BEGIN_SRC fish
|
||||
set -gx EDITOR emacsclient -c
|
||||
set -gx VISUAL emacsclient -c
|
||||
@ -174,13 +190,16 @@ Still related to Dart and Flutter development,
|
||||
set -gx CHROME_EXECUTABLE /usr/bin/chromium
|
||||
#+END_SRC
|
||||
|
||||
Next, we have two variables from Deno, the Node.js destroyer. Its base directory will be set in my XDG config directory, and its binaries will be located in my local binaries directory (see below).
|
||||
Next, we have two variables from Deno, the Node.js destroyer. Its base directory
|
||||
will be set in my XDG config directory, and its binaries will be located in my
|
||||
local binaries directory (see below).
|
||||
#+BEGIN_SRC fish
|
||||
set -gx DENO_DIR $HOME/.config/deno
|
||||
set -gx DENO_INSTALL_ROOT $HOME/.local/bin/deno
|
||||
#+END_SRC
|
||||
|
||||
Finally, some development packages require the =PKG_CONFIG_PATH= to be set, so let’s do so.
|
||||
Finally, some development packages require the =PKG_CONFIG_PATH= to be set, so
|
||||
let’s do so.
|
||||
#+BEGIN_SRC fish
|
||||
set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH
|
||||
#+END_SRC
|
||||
@ -189,7 +208,11 @@ Finally, some development packages require the =PKG_CONFIG_PATH= to be set, so l
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Global_variables-$PATH-e1320303
|
||||
:END:
|
||||
A variable available with the fish shell is ~fish_user_paths~ which lists custom paths to binaries specified by the user. Using this variable ensures they are included in the ~$PATH~ variable only once without the need to set it directly. For instance, my ~PATH~ variable needs Rust’s Cargo’s binaries, Go’s binaries, my own executables, and some more.
|
||||
A variable available with the fish shell is ~fish_user_paths~ which lists custom
|
||||
paths to binaries specified by the user. Using this variable ensures they are
|
||||
included in the ~$PATH~ variable only once without the need to set it directly.
|
||||
For instance, my ~PATH~ variable needs Rust’s Cargo’s binaries, Go’s binaries,
|
||||
my own executables, and some more.
|
||||
|
||||
#+NAME: extra-paths
|
||||
| additional path | what it leads to |
|
||||
@ -247,7 +270,16 @@ the terminal window will come back.
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-System_monitoring-bd909755
|
||||
:END:
|
||||
Here I have some abbreviations which are quite useful when performing some system monitoring. With =df=, we can get an overview of our filesystem usage, while with =diskspace= we get some more precise information. =meminfo= is a call to =free= with sane defaults, and similar to =meminfo=, we also have =gpumeminfo= so we can get a quick look at the memory-related logs of our X session. I also declared =cpuinfo= an alias of =lscpu= in order to keep consistent with =meminfo=. =pscpu= gives us information on what the CPU is running right now, and =pscpu10= limits that to the top 10 threads. Similarly, =psmem= gives us information on the memory usage of the current threads, and =psmem10= only the ten most important threads in terms of memory usage.
|
||||
Here I have some abbreviations which are quite useful when performing some
|
||||
system monitoring. With =df=, we can get an overview of our filesystem usage,
|
||||
while with =diskspace= we get some more precise information. =meminfo= is a call
|
||||
to =free= with sane defaults, and similar to =meminfo=, we also have
|
||||
=gpumeminfo= so we can get a quick look at the memory-related logs of our X
|
||||
session. I also declared =cpuinfo= an alias of =lscpu= in order to keep
|
||||
consistent with =meminfo=. =pscpu= gives us information on what the CPU is
|
||||
running right now, and =pscpu10= limits that to the top 10 threads. Similarly,
|
||||
=psmem= gives us information on the memory usage of the current threads, and
|
||||
=psmem10= only the ten most important threads in terms of memory usage.
|
||||
#+NAME: mgmt-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+--------------------------------------------|
|
||||
@ -270,13 +302,17 @@ Here I have some abbreviations which are quite useful when performing some syste
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-System_management_(packages_and_services)-7249fbb7
|
||||
:END:
|
||||
I added some of these abbreviations due to how often I have to write the whole thing.
|
||||
I added some of these abbreviations due to how often I have to write the whole
|
||||
thing.
|
||||
|
||||
*** Package management
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-System_management_(packages_and_services)-Package_management-efbcdf0f
|
||||
:END:
|
||||
The first command is =remove= which removes a package from my system, as well as its dependencies no longer needed. =p=. =pacman='s or =paru='s. This is why I simply type =purge=. And if I want to simply seach among the =pacman= repos, I can type =search=. Otherwise, if I want to include AUR results, I’ll use =paru=.
|
||||
The first command is =remove= which removes a package from my system, as well as
|
||||
its dependencies no longer needed. =p=. =pacman='s or =paru='s. This is why I
|
||||
simply type =purge=. And if I want to simply seach among the =pacman= repos, I
|
||||
can type =search=. Otherwise, if I want to include AUR results, I’ll use =paru=.
|
||||
|
||||
#+NAME: pm-abbr
|
||||
| abbreviation | command |
|
||||
@ -292,7 +328,9 @@ The first command is =remove= which removes a package from my system, as well as
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-System_management_(packages_and_services)-Service_management-8c5ae482
|
||||
:END:
|
||||
I don’t have the muscle memory of =systemctl=. So instead, I simply type =c= when I want to do something user service related. And if I want to manipulate system services, I can instead type a simple capital =S=.
|
||||
I don’t have the muscle memory of =systemctl=. So instead, I simply type =c=
|
||||
when I want to do something user service related. And if I want to manipulate
|
||||
system services, I can instead type a simple capital =S=.
|
||||
#+NAME: service-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+------------------|
|
||||
@ -307,13 +345,15 @@ I don’t have the muscle memory of =systemctl=. So instead, I simply type =c= w
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-d6050ca4
|
||||
:END:
|
||||
A good amount of these commands are development related, especially when it comes to compilation or Docker.
|
||||
A good amount of these commands are development related, especially when it
|
||||
comes to compilation or Docker.
|
||||
|
||||
*** CMake
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-CMake-f2951675
|
||||
:END:
|
||||
I have the following abbreviations so I can quickly run CMake and create a configuration for debug or release profiles.
|
||||
I have the following abbreviations so I can quickly run CMake and create a
|
||||
configuration for debug or release profiles.
|
||||
#+NAME: abbr-cmake
|
||||
| abbreviation | command |
|
||||
|--------------+----------------------------------|
|
||||
@ -329,7 +369,8 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-Docker-2d0a1288
|
||||
:END:
|
||||
And of course, when it comes to Docker Compose, I don't have time to write the full command, so I use these instead.
|
||||
And of course, when it comes to Docker Compose, I don't have time to write the
|
||||
full command, so I use these instead.
|
||||
#+NAME: abbr-docker
|
||||
| abbreviation | command |
|
||||
|--------------+------------------------------|
|
||||
@ -353,7 +394,13 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-Text_editors-5a23df47
|
||||
:END:
|
||||
I greatly prefer to use Emacsclient as my main text editor; Emacs has basically all I need. So, it's only normal I have an abbreviation to launch a new instance of it. If launched in the terminal, I’ll usually want Emacs to be displayed in CLI mode and not in GUI mode, otherwise I would invoke it with my WM’s shortcut. I also wish to completely stop using other text editors, such as ~vi~, ~vim~, ~nano~ and ~ed~, so let's all add their command as an abbreviation for Emacs. In case we want to launch Emacs in GUI mode anyways, ~egui~ is available too.
|
||||
I greatly prefer to use Emacsclient as my main text editor; Emacs has basically
|
||||
all I need. So, it's only normal I have an abbreviation to launch a new instance
|
||||
of it. If launched in the terminal, I’ll usually want Emacs to be displayed in
|
||||
CLI mode and not in GUI mode, otherwise I would invoke it with my WM’s shortcut.
|
||||
I also wish to completely stop using other text editors, such as ~vi~, ~vim~,
|
||||
~nano~ and ~ed~, so let's all add their command as an abbreviation for Emacs. In
|
||||
case we want to launch Emacs in GUI mode anyways, ~egui~ is available too.
|
||||
|
||||
#+NAME: abbr-text-ed
|
||||
| abbreviation | command |
|
||||
@ -374,7 +421,8 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-Compilation-dd066050
|
||||
:END:
|
||||
By default, I set ~clang~, ~clang++~, ~gcc~ and ~g++~ to the latest standard and with the ~-Wall~ flag activated.
|
||||
By default, I set ~clang~, ~clang++~, ~gcc~ and ~g++~ to the latest standard and
|
||||
with the ~-Wall~ flag activated.
|
||||
#+NAME: abbr-comp
|
||||
| abbreviation | command |
|
||||
|--------------+----------------------|
|
||||
@ -392,7 +440,9 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Development-Git-5e5055c1
|
||||
:END:
|
||||
And let's face it: we all at one point just wanted to commit our code without thinking about the message, to just get over with it. Don't worry, I got you covered.
|
||||
And let's face it: we all at one point just wanted to commit our code without
|
||||
thinking about the message, to just get over with it. Don't worry, I got you
|
||||
covered.
|
||||
#+NAME: abbr-git
|
||||
| abbreviation | command |
|
||||
|--------------+-----------------------------------------------------|
|
||||
@ -407,7 +457,11 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-LaTeX-76865eb9
|
||||
:END:
|
||||
Yes, although I use org-mode, I still have some use for LaTeX, especially when it comes to PDF exports of my org files. Hence why I use the LaTeX package manager. It is recommended to use ~tllocalmgr~ instead of ~tlmgr~, but I can never remember the command, and the latter is faster to type, so time for an abbreviation. Same goes for ~texhash~ which must be run as sudo.
|
||||
Yes, although I use org-mode, I still have some use for LaTeX, especially when
|
||||
it comes to PDF exports of my org files. Hence why I use the LaTeX package
|
||||
manager. It is recommended to use ~tllocalmgr~ instead of ~tlmgr~, but I can
|
||||
never remember the command, and the latter is faster to type, so time for an
|
||||
abbreviation. Same goes for ~texhash~ which must be run as sudo.
|
||||
#+NAME: latex-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+--------------|
|
||||
@ -423,7 +477,14 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Some_security_measures-489cb521
|
||||
:END:
|
||||
Some commands can be quite dangerous when not used properly, which is why I added default flags and options so I can get warnings before things get ugly. The =-i= and =-I= add prompts in case we might not want to do what we asked the shell to do. Notice =lns= which creates symlinks, =rmd= which removes directories, =rmf= which forces deletion, and =rmdf= which forces the delition of a directory. Notice also the =--preserve-root= which will prevent me from accidentally removing the root folder. I added the same option to =chgrp=, =chmod=, and =chown=.
|
||||
Some commands can be quite dangerous when not used properly, which is why I
|
||||
added default flags and options so I can get warnings before things get ugly.
|
||||
The =-i= and =-I= add prompts in case we might not want to do what we asked the
|
||||
shell to do. Notice =lns= which creates symlinks, =rmd= which removes
|
||||
directories, =rmf= which forces deletion, and =rmdf= which forces the delition
|
||||
of a directory. Notice also the =--preserve-root= which will prevent me from
|
||||
accidentally removing the root folder. I added the same option to =chgrp=,
|
||||
=chmod=, and =chown=.
|
||||
#+NAME: sec-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+--------------------------|
|
||||
@ -448,7 +509,12 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Typos-370bbb27
|
||||
:END:
|
||||
Let's admit it, we all make typos from time to time in the shell, and some are recurrent enough we make abbreviations or aliases of the correct command. Well, I have some of my abbreviations which were make exactly because of this. Sometimes for some reasons, my brain makes me write ~clean~ instead of ~clear~. So, let's just replace the former by the latter. I'm also very bad at typing ~exit~. And sometimes I suck at typing ~htop~.
|
||||
Let's admit it, we all make typos from time to time in the shell, and some are
|
||||
recurrent enough we make abbreviations or aliases of the correct command. Well,
|
||||
I have some of my abbreviations which were make exactly because of this.
|
||||
Sometimes for some reasons, my brain makes me write ~clean~ instead of ~clear~.
|
||||
So, let's just replace the former by the latter. I'm also very bad at typing
|
||||
~exit~. And sometimes I suck at typing ~htop~.
|
||||
#+NAME: typo-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+---------|
|
||||
@ -466,33 +532,42 @@ Here is the corresponding fish configuration:
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-c2631eb6
|
||||
:END:
|
||||
Finally, some miscellaneous abbreviations that don't really fit into any of the above categories.
|
||||
Finally, some miscellaneous abbreviations that don't really fit into any of the
|
||||
above categories.
|
||||
|
||||
*** Media
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-Media-e4b85d56
|
||||
:END:
|
||||
Here you will find various commands related to media in general. the first one is a command to play some chillhop from the [[https://www.youtube.com/user/Chillhopdotcom][Chillhop YouTube channel]]'s livestream.
|
||||
Here you will find various commands related to media in general. the first one
|
||||
is a command to play some chillhop from the [[https://www.youtube.com/user/Chillhopdotcom][Chillhop YouTube channel]]'s
|
||||
livestream.
|
||||
#+BEGIN_SRC fish
|
||||
abbr chill 'mpv --force-window=no --no-video "https://www.youtube.com/user/Chillhopdotcom/live" &'
|
||||
#+END_SRC
|
||||
|
||||
When it comes to mpv, I do not want to force it to open a graphical window if for example I want to listen to an audio file. I also do not want any border on that window. So, I declared this abbreviation.
|
||||
When it comes to mpv, I do not want to force it to open a graphical window if
|
||||
for example I want to listen to an audio file. I also do not want any border on
|
||||
that window. So, I declared this abbreviation.
|
||||
#+BEGIN_SRC fish
|
||||
abbr mpv 'devour mpv --no-border --force-window=no'
|
||||
#+END_SRC
|
||||
|
||||
When I want to download a song from YouTube, I'll just use the command ~flac videoIdentifier~ to get it through ~youtube-dl~.
|
||||
When I want to download a song from YouTube, I'll just use the command ~flac
|
||||
videoIdentifier~ to get it through ~youtube-dl~.
|
||||
#+BEGIN_SRC fish
|
||||
abbr flac 'youtube-dl -x --audio-format flac --audio-quality 0 -o "~/Music/%(uploader)s/%(title)s.%(ext)s"'
|
||||
#+END_SRC
|
||||
|
||||
Some sane default options for ~sxiv~, a simple X image Viewer. This includes playing GIFs and not displaying the filename below. Sxiv will also open in fullscreen and will fit the displayed image to the frame.
|
||||
Some sane default options for ~sxiv~, a simple X image Viewer. This includes
|
||||
playing GIFs and not displaying the filename below. Sxiv will also open in
|
||||
fullscreen and will fit the displayed image to the frame.
|
||||
#+BEGIN_SRC fish
|
||||
abbr sxiv 'devour sxiv -abfs f'
|
||||
abbr sxiv 'sxiv -abfs f'
|
||||
#+END_SRC
|
||||
|
||||
Finally, let's declare the following abbreviation that will launch an mpv instance displaying my webcam:
|
||||
Finally, let's declare the following abbreviation that will launch an mpv
|
||||
instance displaying my webcam:
|
||||
#+BEGIN_SRC fish
|
||||
abbr webcam 'devour mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0'
|
||||
#+END_SRC
|
||||
@ -501,7 +576,9 @@ Finally, let's declare the following abbreviation that will launch an mpv instan
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-Sudo-aef0214a
|
||||
:END:
|
||||
First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my custom graphical script for getting my password (see [[file:bin.org::#Askpass-d0d7a8c0][askpass]]). I also made it so ~please~ is an equivalent to ~sudo -A~ as a joke.
|
||||
First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my
|
||||
custom graphical script for getting my password (see [[file:bin.org::#Askpass-d0d7a8c0][askpass]]). I also made it so
|
||||
~please~ is an equivalent to ~sudo -A~ as a joke.
|
||||
#+BEGIN_SRC fish
|
||||
abbr please 'sudo -A'
|
||||
#+END_SRC
|
||||
@ -510,7 +587,8 @@ First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my c
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-History-a2124b23
|
||||
:END:
|
||||
I also find it more intuitive and faster to just write ~hist~ instead of ~history~, so let's declare that.
|
||||
I find it more intuitive and faster to just write ~hist~ instead of ~history~,
|
||||
so let's declare that.
|
||||
#+BEGIN_SRC fish
|
||||
abbr hist history
|
||||
#+END_SRC
|
||||
@ -519,7 +597,11 @@ I also find it more intuitive and faster to just write ~hist~ instead of ~histor
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-Compression-4fd4ffef
|
||||
:END:
|
||||
It seems it's just like many other people, but I cannot for the life of me remember the syntax of ~tar~. So, I made the following abbreviations, and one day hopefully, after seeing the abbreviations' expansion over and over I'll remember the command like I did for the abbreviation of ~remove~ (see [[#Abbreviations-System_management_(packages_and_services)-Package_management-efbcdf0f][Package management]]).
|
||||
It seems it's just like many other people, but I cannot for the life of me
|
||||
remember the syntax of ~tar~. So, I made the following abbreviations, and one
|
||||
day hopefully, after seeing the abbreviations' expansion over and over I'll
|
||||
remember the command like I did for the abbreviation of ~remove~ (see [[#Abbreviations-System_management_(packages_and_services)-Package_management-efbcdf0f][Package
|
||||
management]]).
|
||||
#+NAME: tar-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+-----------|
|
||||
@ -548,7 +630,8 @@ It seems it's just like many other people, but I cannot for the life of me remem
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-Network_Management-0b7fc91d
|
||||
:END:
|
||||
First, we have just =nmcli= with sane default options, that is a pretty output with colors.
|
||||
First, we have just =nmcli= with sane default options, that is a pretty output
|
||||
with colors.
|
||||
#+BEGIN_SRC fish
|
||||
abbr nmcli 'nmcli -p -c auto'
|
||||
#+END_SRC
|
||||
@ -557,7 +640,11 @@ First, we have just =nmcli= with sane default options, that is a pretty output w
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Abbreviations-Misc-NordVPN-09438638
|
||||
:END:
|
||||
Next, we have some NordVPN-related shortcuts. The first one is a simple abbreviation to =nordvpn=. The second one is a shortcut to connect to a server, and to disconnect from the current server. I also have a couple of shortcuts to quickly connect to some preselected countries, mainly France, Germany, Japan and the US.
|
||||
Next, we have some NordVPN-related shortcuts. The first one is a simple
|
||||
abbreviation to =nordvpn=. The second one is a shortcut to connect to a server,
|
||||
and to disconnect from the current server. I also have a couple of shortcuts to
|
||||
quickly connect to some preselected countries, mainly France, Germany, Japan and
|
||||
the US.
|
||||
#+NAME: nordvpn-abbr
|
||||
| abbreviation | command |
|
||||
|--------------+-------------------------|
|
||||
|
@ -9,9 +9,12 @@
|
||||
: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.
|
||||
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.
|
||||
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.
|
||||
- [[file:installation.org][Arch Linux bootstrap script]]
|
||||
- [[file:awesome.org][AwesomeWM configuration]]
|
||||
- [[file:bin.org][Custom scripts]]
|
||||
@ -26,11 +29,21 @@ For starters, here is the link to all the pages on my website that you might fin
|
||||
- [[file:rustfmt.org][Rustfmt configuration]]
|
||||
- [[file:tmux.org][Tmux configuration]]
|
||||
|
||||
As you can see, I personally use [[https://fishshell.com/][fish]] as my shell of choice, and [[https://www.gnu.org/software/emacs/][Emacs]] 28.0 (using the ~native-comp~ branch) using [[http://spacemacs.org][Spacemacs]] (still with Emacs keybinding in Insert mode but with Evil in Normal mode) as my main text editor.
|
||||
As you can see, I personally use [[https://fishshell.com/][fish]] as my shell of choice, and [[https://www.gnu.org/software/emacs/][Emacs]] 28.0
|
||||
(using the ~native-comp~ branch) using [[http://spacemacs.org][Spacemacs]] (still with Emacs keybinding in
|
||||
Insert mode but with Evil in Normal mode) as my main text editor.
|
||||
|
||||
When it comes to my graphical UI, I do not have any desktop environment. Instead, I have a tiling window manager, [[https://awesomewm.org/][Awesome]]. I used to use [[https://github.com/Airblader/i3][i3-gaps]], an [[https://i3wm.org/][i3]] fork by [[https://github.com/Airblader/i3][Airblader]], with which I used [[https://polybar.github.io/][Polybar]] as well as [[https://github.com/dylanaraps/pywal][pywal]] to define my system’s color scheme. But now, as said above, I prefer to use Awesome. It has a built-in status bar which I use, and I settled on the dark [[https://www.nordtheme.com/][Nord theme]] for pretty much everything I use.
|
||||
When it comes to my graphical UI, I do not have any desktop environment.
|
||||
Instead, I have a tiling window manager, [[https://awesomewm.org/][Awesome]]. I used to use [[https://github.com/Airblader/i3][i3-gaps]], an [[https://i3wm.org/][i3]]
|
||||
fork by [[https://github.com/Airblader/i3][Airblader]], with which I used [[https://polybar.github.io/][Polybar]] as well as [[https://github.com/dylanaraps/pywal][pywal]] to define my
|
||||
system’s color scheme. But now, as said above, I prefer to use Awesome. It has a
|
||||
built-in status bar which I use, and I settled on the dark [[https://www.nordtheme.com/][Nord theme]] for pretty
|
||||
much everything I use.
|
||||
|
||||
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. It has also a layer set to emulate a Qwerty layout when using the Bépo software layout due to some games that do not offer to remap keys (I’m looking at you, Among Us).
|
||||
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. It has also a
|
||||
layer set to emulate a Qwerty layout when using the Bépo software layout due to
|
||||
some games that do not offer to remap keys (I’m looking at you, Among Us).
|
||||
|
||||
* Features
|
||||
:PROPERTIES:
|
||||
@ -38,9 +51,15 @@ Finally, you can find my configuration for my ErgodoxEZ keyboard [[https://confi
|
||||
: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.
|
||||
- And enough information below to get basically the same distro install as I
|
||||
have on my main computer and my travel laptop.
|
||||
|
||||
Most of the org files you will find in this repos are the actual source code of much of my config files. For instance, the bootstrap found in [[file:installation.org][installation.org]] exports almost all of its code snippets to [[file:.config/yadm/bootstrap][.config/yadm/bootstrap]] thanks to =M-x org-babel-tangle= from within Emacs. Below I will also present and comment some of my short config files which do not deserve to have a full org file dedicated to them.
|
||||
Most of the org files you will find in this repos are the actual source code of
|
||||
much of my config files. For instance, the bootstrap found in [[file:installation.org][installation.org]]
|
||||
exports almost all of its code snippets to [[file:.config/yadm/bootstrap][.config/yadm/bootstrap]] thanks to =M-x
|
||||
org-babel-tangle= from within Emacs. Below I will also present and comment some
|
||||
of my short config files which do not deserve to have a full org file dedicated
|
||||
to them.
|
||||
|
||||
** Tiling Window Managers
|
||||
:PROPERTIES:
|
||||
@ -50,19 +69,25 @@ Most of the org files you will find in this repos are the actual source code of
|
||||
: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]].
|
||||
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:
|
||||
The i3 configuration is detailed in its corresponding README which you can find [[file:i3.org][here]]. Be aware I do not use i3 anymore, and I will not update it until I may someday use it again. This was deprecated on August 22nd, 2020.
|
||||
The i3 configuration is detailed in its corresponding README which you can find
|
||||
[[file:i3.org][here]]. Be aware I do not use i3 anymore, and I will not update it until I may
|
||||
someday use it again. This was deprecated on August 22nd, 2020.
|
||||
|
||||
**** Polybar config (Deprecated)
|
||||
: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.
|
||||
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.
|
||||
|
||||
** Theme and graphical tweaks
|
||||
:PROPERTIES:
|
||||
@ -81,7 +106,9 @@ My annotated polybar config can be found [[file:polybar.org][here]], if you wish
|
||||
: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.
|
||||
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 -*-
|
||||
gtk-theme-name="Nordic"
|
||||
@ -111,12 +138,14 @@ This changes the shortcuts in menu, let’s also make the menus snappier.
|
||||
[Filechooser Settings]
|
||||
#+END_SRC
|
||||
|
||||
The first option alows me to open the file chooser in the current working directory:
|
||||
The first option alows me to open the file chooser in the current working
|
||||
directory:
|
||||
#+BEGIN_SRC conf-unix
|
||||
StartupMode=cwd
|
||||
#+END_SRC
|
||||
|
||||
Next, setting the location mode to ~path-bar~ will show the path as buttons that can be clicked rather than the full path.
|
||||
Next, setting the location mode to ~path-bar~ will show the path as buttons that
|
||||
can be clicked rather than the full path.
|
||||
#+BEGIN_SRC conf-unix
|
||||
LocationMode=path-bar
|
||||
#+END_SRC
|
||||
@ -131,7 +160,8 @@ And we'll also see the size of the visible files.
|
||||
ShowSizeColumn=true
|
||||
#+END_SRC
|
||||
|
||||
Now, let’s choose the geometry of our file picker. These two first lines set where the file picker appears:
|
||||
Now, let’s choose the geometry of our file picker. These two first lines set
|
||||
where the file picker appears:
|
||||
#+BEGIN_SRC conf-unix
|
||||
GeometryX=566
|
||||
GeometryY=202
|
||||
@ -143,7 +173,8 @@ And these two describe the size of the window:
|
||||
GeometryHeight=400
|
||||
#+END_SRC
|
||||
|
||||
With these two lines, we set how our files are sorted: by name, and in the ascending order.
|
||||
With these two lines, we set how our files are sorted: by name, and in the
|
||||
ascending order.
|
||||
#+BEGIN_SRC conf-unix
|
||||
SortColumn=name
|
||||
SortOrder=ascending
|
||||
@ -154,7 +185,8 @@ Our default view mode is a list of files:
|
||||
ViewMode=list-view
|
||||
#+END_SRC
|
||||
|
||||
And finally, setting our icon view scale to ~-1~ sets the icon view to the max size.
|
||||
And finally, setting our icon view scale to ~-1~ sets the icon view to the max
|
||||
size.
|
||||
#+BEGIN_SRC conf-unix
|
||||
IconViewScale=-1
|
||||
#+END_SRC
|
||||
@ -164,12 +196,15 @@ And finally, setting our icon view scale to ~-1~ sets the icon view to the max s
|
||||
: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:
|
||||
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]
|
||||
#+END_SRC
|
||||
|
||||
Now, let’s hint to GTK that I prefer dark themes. This can have an influence also on some websites that can detect this preference and therefore set their own theme to dark by themselves.
|
||||
Now, let’s hint to GTK that I prefer dark themes. This can have an influence
|
||||
also on some websites that can detect this preference and therefore set their
|
||||
own theme to dark by themselves.
|
||||
#+BEGIN_SRC conf-unix
|
||||
gtk-application-prefer-dark-theme = true
|
||||
#+END_SRC
|
||||
@ -198,7 +233,8 @@ Now, the general theme for GTK3 is Nordic.
|
||||
# gtk-xft-rgba=rgb
|
||||
#+END_SRC
|
||||
|
||||
Since window decorations are handled by my WMs, I will leave this variable empty.
|
||||
Since window decorations are handled by my WMs, I will leave this variable
|
||||
empty.
|
||||
#+BEGIN_SRC conf-unix
|
||||
gtk-decoration-layout=
|
||||
#+END_SRC
|
||||
@ -207,14 +243,18 @@ Since window decorations are handled by my WMs, I will leave this variable empty
|
||||
: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]].
|
||||
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:
|
||||
My Xresources file is very short. Indeed, it only contains two lines which are dedicated to my =st= terminal to set its font and shell. The font is set as follows.
|
||||
My Xresources file is very short. Indeed, it only contains two lines which are
|
||||
dedicated to my =st= terminal to set its font and shell. The font is set as
|
||||
follows.
|
||||
#+BEGIN_SRC conf
|
||||
st.font: Fantasque Sans Mono:size=10:antialias=true
|
||||
#+END_SRC
|
||||
@ -224,7 +264,8 @@ I can also set the transparency of st (my terminal emulator) like so:
|
||||
st.alpha: 0.66
|
||||
#+END_SRC
|
||||
|
||||
Next is the declaration of my color theme. It is based on the [[https://www.nordtheme.com/][Nord]] theme, from their [[https://github.com/arcticicestudio/nord-xresources/][Git repository]].
|
||||
Next is the declaration of my color theme. It is based on the [[https://www.nordtheme.com/][Nord]] theme, from
|
||||
their [[https://github.com/arcticicestudio/nord-xresources/][Git repository]].
|
||||
#+BEGIN_SRC conf
|
||||
#define nord0 #2E3440
|
||||
#define nord1 #3B4252
|
||||
@ -275,18 +316,23 @@ Next is the declaration of my color theme. It is based on the [[https://www.nord
|
||||
: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…
|
||||
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.
|
||||
#+end_quote
|
||||
|
||||
You can find my Emacs config, based on Spacemacs, in my [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.spacemacs][.spacemacs]] file, and my user configuration in my [[file:emacs.org][emacs.org]] file.
|
||||
You can find my Emacs config, based on Spacemacs, in my [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.spacemacs][.spacemacs]] file, and my
|
||||
user configuration in my [[file:emacs.org][emacs.org]] file.
|
||||
|
||||
*** Nano (deprecated)
|
||||
: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.
|
||||
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:
|
||||
@ -298,7 +344,12 @@ You can find my Rustfmt configuration [[file:rustfmt.org][here]].
|
||||
: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.
|
||||
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.
|
||||
|
||||
** Terminal configuration
|
||||
:PROPERTIES:
|
||||
@ -308,13 +359,15 @@ I have written some scripts that help me daily accomplish some simple tasks, lik
|
||||
: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.
|
||||
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.
|
||||
|
||||
*** Tmux configuration
|
||||
: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]].
|
||||
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]].
|
||||
|
||||
** And some minor configuration files
|
||||
:PROPERTIES:
|
||||
@ -340,12 +393,16 @@ This file gets inserted automatically at the end of my emails.
|
||||
: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.
|
||||
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
|
||||
~*
|
||||
#+END_SRC
|
||||
|
||||
And object files and output binaries generated by =gcc= and the likes aren’t welcome either.
|
||||
And object files and output binaries generated by =gcc= and the likes aren’t
|
||||
welcome either.
|
||||
#+BEGIN_SRC text
|
||||
,*.out
|
||||
,*.o
|
||||
@ -355,7 +412,14 @@ And object files and output binaries generated by =gcc= and the likes aren’t w
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Features-And-some-minor-configuration-files-Paru-1f3ef49e
|
||||
:END:
|
||||
~paru~ is an AUR helper for Arch Linux which aims to be a replacement for ~yay~. A couple of the options you will see below aim at restoring the behavior of ~yay~ in ~paru~. I also activated the sudo loop so I don’t have to enter my password if one package takes too much time to compile and/or compress. I know it can be a security issue if someone ever get access to my computer while paru is running, but if it ever happens it will be already concerning enough they managed to. I also make use of [[file:bin.org::#Emacs-stuff-Dired-2eeca9da][my custom script dired]] so I can use Emacs’ Dired as the file manager for ~paru~.
|
||||
~paru~ is an AUR helper for Arch Linux which aims to be a replacement for ~yay~.
|
||||
A couple of the options you will see below aim at restoring the behavior of
|
||||
~yay~ in ~paru~. I also activated the sudo loop so I don’t have to enter my
|
||||
password if one package takes too much time to compile and/or compress. I know
|
||||
it can be a security issue if someone ever get access to my computer while paru
|
||||
is running, but if it ever happens it will be already concerning enough they
|
||||
managed to. I also make use of [[file:bin.org::#Emacs-stuff-Dired-2eeca9da][my custom script dired]] so I can use Emacs’ Dired
|
||||
as the file manager for ~paru~.
|
||||
#+BEGIN_SRC conf-space :tangle ~/.config/paru/paru.conf
|
||||
[options]
|
||||
BottomUp
|
||||
@ -372,37 +436,21 @@ And object files and output binaries generated by =gcc= and the likes aren’t w
|
||||
FileManager = dired
|
||||
#+END_SRC
|
||||
|
||||
* Dependencies
|
||||
: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)
|
||||
- My [[https://labs.phundrak.com/phundrak/conlang-layer][conlanging layer]]
|
||||
- [[https://github.com/venmos/w3m-layer][Venmos]]’ [[https://github.com/venmos/w3m-layer][w3m layer]]
|
||||
- The [[https://fishshell.com/][Fish shell]], using [[https://github.com/jorgebucaran/fisher][fisher]]
|
||||
- [[https://lukesmith.xyz/][Luke Smith]]’s [[https://github.com/LukeSmithxyz/st][fork]] of [[https://st.suckless.org/][st]]
|
||||
- [[https://tools.suckless.org/dmenu/][dmenu]]
|
||||
- [[https://github.com/enkore/j4-dmenu-desktop][j4-dmenu-desktop]]
|
||||
- [[https://github.com/davatorium/rofi][Rofi]]
|
||||
- [[https://github.com/gpoore/minted][minted]]
|
||||
- [[https://www.rust-lang.org/][Rust]] (stable and nightly)
|
||||
- [[https://www.latex-project.org/][LaTeX]] and [[http://xetex.sourceforge.net/][XeTeX]] (=texlive= packages on Arch Linux)
|
||||
- [[https://github.com/tmux/tmux][tmux]], based on [[https://github.com/gpakosz/.tmux][this repo]]’s configuration by [[https://pempek.net/][Grégory Pakosz]].
|
||||
- And a bunch of other stuff, see below
|
||||
And some other stuff scattered around in my dotfiles.
|
||||
|
||||
BTW, I use Arch.
|
||||
|
||||
* Installation
|
||||
: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.
|
||||
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:
|
||||
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.
|
||||
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.
|
||||
|
@ -13,17 +13,33 @@
|
||||
: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.
|
||||
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:
|
||||
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).
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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:
|
||||
@ -36,13 +52,20 @@ When you boot into the live ISO, execute the following command:
|
||||
--save /etc/pacman.d/mirrorlist --verbose
|
||||
#+END_SRC
|
||||
|
||||
This will update the packages from your live ISO, and you will get the best mirrors for your installation. Of course, change the countries accordingly to your location. In my case, I am only interested in French, German, and Belgian mirrors.
|
||||
This will update the packages from your live ISO, and you will get the best
|
||||
mirrors for your installation. Of course, change the countries accordingly to
|
||||
your location. In my case, I am only interested in French, German, and Belgian
|
||||
mirrors.
|
||||
|
||||
** Install the system
|
||||
: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.
|
||||
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
|
||||
#+END_SRC
|
||||
@ -54,16 +77,21 @@ Now, let’s grab the script. You can check it on [[https://github.com/matmoul/a
|
||||
sh archfi
|
||||
#+END_SRC
|
||||
|
||||
Then, follow the instructions and install Arch Linux. Take the opportunity to install as many packages as you need, mainly ~paru~ which I use as my package manager (it is just a wrapper for ~pacman~) and AUR helper, and ~pacman-contrib~ which will help us installing some packages later.
|
||||
Then, follow the instructions and install Arch Linux. Take the opportunity to
|
||||
install as many packages as you need, mainly ~paru~ which I use as my package
|
||||
manager (it is just a wrapper for ~pacman~) and AUR helper, and ~pacman-contrib~
|
||||
which will help us installing some packages later.
|
||||
|
||||
Once your system is installed, reboot and remove your installation media from your computer.
|
||||
Once your system is installed, reboot and remove your installation media from
|
||||
your computer.
|
||||
|
||||
* Execute bootstrap
|
||||
:PROPERTIES:
|
||||
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
|
||||
:CUSTOM_ID: Execute_bootstrap-e37054ef
|
||||
:END:
|
||||
The first thing I will do is add the [[https://github.com/archlinuxcn/repo][ArchLinuxCN]] repository so I can get access to ~paru~.
|
||||
The first thing I will do is add the [[https://github.com/archlinuxcn/repo][ArchLinuxCN]] repository so I can get access
|
||||
to ~paru~.
|
||||
#+BEGIN_SRC sh
|
||||
printf '[archlinuxcn]\nServer = https://repo.archlinuxcn.org/$arch\n' | sudo tee -a /etc/pacman.conf
|
||||
#+END_SRC
|
||||
@ -78,7 +106,8 @@ And now that ~paru~ is available, we can install ~yadm~:
|
||||
paru -S yadm
|
||||
#+END_SRC
|
||||
|
||||
~yadm~ comes with a very handy feature: its bootstrap script. It can be executed automatically once the dotfiles are cloned with yadm:
|
||||
~yadm~ comes with a very handy feature: its bootstrap script. It can be executed
|
||||
automatically once the dotfiles are cloned with yadm:
|
||||
#+BEGIN_SRC sh
|
||||
yadm clone https://labs.phundrak.com/phundrak/dotfiles
|
||||
# or if labs.phundrak.com is down or too slow for you
|
||||
@ -91,7 +120,8 @@ Let’s take a look at what it does.
|
||||
: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.
|
||||
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'
|
||||
yadm decrypt
|
||||
@ -104,7 +134,11 @@ Some private files are stored encrypted in the repository of my yadm dotfiles. I
|
||||
: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:
|
||||
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 \
|
||||
'Section "InputClass"
|
||||
@ -130,7 +164,8 @@ So, let’s ask the user if they want to set it as their keyboard configuration.
|
||||
: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.
|
||||
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"
|
||||
#+END_SRC
|
||||
@ -180,7 +215,8 @@ Now we can generate our locale!
|
||||
: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.
|
||||
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"
|
||||
sudo mkdir -p /mnt/{USB,CD,Android}
|
||||
@ -241,7 +277,8 @@ Let’s set in a custom varible what packages we’ll be needing.
|
||||
xorg-xinit xss-lock xvkbd xwallpaper yaml-language-server-bin zeal
|
||||
#+END_SRC
|
||||
|
||||
These are the minimum I would have in my own installation. You can edit it however you want. Let’s install those.
|
||||
These are the minimum I would have in my own installation. You can edit it
|
||||
however you want. Let’s install those.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Installing needed packages ##################################################\n\n"
|
||||
sudo pacman -Syu
|
||||
@ -254,7 +291,9 @@ These are the minimum I would have in my own installation. You can edit it howev
|
||||
: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:
|
||||
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 |
|
||||
| $HOME/.config/awesome/theme |
|
||||
@ -297,7 +336,8 @@ Our code to generate such directories looks like this:
|
||||
<<gen-dirs-tangle()>>
|
||||
#+END_SRC
|
||||
|
||||
The next step is to tangle all the Org files. Here is the list of files that are to be tangled:
|
||||
The next step is to tangle all the Org files. Here is the list of files that are
|
||||
to be tangled:
|
||||
#+NAME: tangled-files
|
||||
| filename |
|
||||
|-------------|
|
||||
@ -373,7 +413,12 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
|
||||
: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:
|
||||
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"
|
||||
rm -rf $HOME/.config/emacs $HOME/.emacs* .spacemacs
|
||||
@ -384,7 +429,8 @@ Now we can clone Spacemacs:
|
||||
git clone --branch develop https://github.com/syl20bnr/spacemacs ~/.config/emacs
|
||||
#+END_SRC
|
||||
|
||||
And we can restore what might have been deleted in our =~/.emacs.d/private= directory:
|
||||
And we can restore what might have been deleted in our =~/.emacs.d/private=
|
||||
directory:
|
||||
#+BEGIN_SRC fish
|
||||
yadm checkout -- ~/.config/emacs/private/
|
||||
#+END_SRC
|
||||
@ -397,12 +443,14 @@ And we can restore what might have been deleted in our =~/.emacs.d/private= dire
|
||||
: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.
|
||||
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'
|
||||
#+END_SRC
|
||||
|
||||
If it is me installing and using these dotfiles, I want the remotes of my dotfiles to be set to ssh remotes using my ssh keys.
|
||||
If it is me installing and using these dotfiles, I want the remotes of my
|
||||
dotfiles to be set to ssh remotes using my ssh keys.
|
||||
#+BEGIN_SRC fish
|
||||
printf "\n# Update yadm’s remotes #######################################################\n\n"
|
||||
yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
|
||||
@ -424,7 +472,8 @@ Finally, let’s close this ~if~ statement.
|
||||
: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:
|
||||
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"
|
||||
yadm submodule update --init --recursive
|
||||
@ -434,19 +483,22 @@ Now we can download the various dependencies of our dotfiles. To do so, let’s
|
||||
: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.
|
||||
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:
|
||||
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:
|
||||
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"
|
||||
sudo systemctl enable --now systemd-timesyncd
|
||||
#+END_SRC
|
||||
|
||||
Now, let systemd know I want to use the NTP protocol to keep my computer’s time synced.
|
||||
Now, let systemd know I want to use the NTP protocol to keep my computer’s time
|
||||
synced.
|
||||
#+BEGIN_SRC fish
|
||||
sudo timedatectl set-ntp true
|
||||
#+END_SRC
|
||||
@ -461,7 +513,8 @@ First, let’s activate Docker on startup.
|
||||
sudo systemctl enable --now docker
|
||||
#+END_SRC
|
||||
|
||||
Now, if we wish it, we can be added to the =docker= group so we won’t have to type =sudo= each time we call Docker or Docker Compose.
|
||||
Now, if we wish it, we can be added to the =docker= group so we won’t have to
|
||||
type =sudo= each time we call Docker or Docker Compose.
|
||||
#+BEGIN_SRC fish
|
||||
read --prompt "echo 'Do you wish to be added to the `docker` group? (Y/n): ' " -l adddockergroup
|
||||
if test $adddockergroup = 'y' || test $adddockergroup = "Y" || test $adddockergroup = ''
|
||||
@ -473,7 +526,10 @@ Now, if we wish it, we can be added to the =docker= group so we won’t have to
|
||||
: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.
|
||||
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"
|
||||
systemctl --user enable emacs
|
||||
@ -483,7 +539,8 @@ Emacs will run as a user service, which means it won’t be launched until we lo
|
||||
: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.
|
||||
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"
|
||||
mkdir -p ~/.config/mpd/playlists
|
||||
@ -494,7 +551,8 @@ Mpd will also use as a user service in order to get rid of some lines of code in
|
||||
: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.
|
||||
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
|
||||
if test $status -eq 0
|
||||
@ -507,7 +565,9 @@ Maybe we want to activate an SSH server on our machine. If so, we can enable it.
|
||||
: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).
|
||||
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
|
||||
sudo systemctl enable --now ly
|
||||
@ -517,7 +577,10 @@ Ly is a display manager based on ncurses which I find nice enough for me to use
|
||||
: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~.
|
||||
~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
|
||||
@ -526,12 +589,17 @@ Ly is a display manager based on ncurses which I find nice enough for me to use
|
||||
: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:
|
||||
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
|
||||
#+END_SRC
|
||||
|
||||
Let’s also set its default protocol to UDP. This will allow me to use any port while connected to any WiFi as long as the 443 port is available. Because yes, I do connect to a WiFi that blocks some important ports, such as the IMAP and SMTP ports. Thanks University of Paris 8 for being SO paranoid.
|
||||
Let’s also set its default protocol to UDP. This will allow me to use any port
|
||||
while connected to any WiFi as long as the 443 port is available. Because yes, I
|
||||
do connect to a WiFi that blocks some important ports, such as the IMAP and SMTP
|
||||
ports. Thanks University of Paris 8 for being SO paranoid.
|
||||
#+BEGIN_SRC fish
|
||||
nordvpn s protocol tcp
|
||||
#+END_SRC
|
||||
@ -548,7 +616,8 @@ We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
|
||||
end
|
||||
#+END_SRC
|
||||
|
||||
Let’s also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~ can find it.
|
||||
Let’s also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~
|
||||
can find it.
|
||||
#+BEGIN_SRC fish
|
||||
sudo ln -s (which plock) /usr/bin/plock
|
||||
#+END_SRC
|
||||
@ -566,7 +635,8 @@ Now, let’s install some packages from git directly.
|
||||
: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.
|
||||
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"
|
||||
cd ~/fromGIT
|
||||
@ -581,13 +651,16 @@ I sometimes use Reveal.JS to make presentations, and I set its location in my [[
|
||||
: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.
|
||||
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"
|
||||
rustup default stable
|
||||
#+END_SRC
|
||||
|
||||
This will both download the stable toolchain and set it as the default one. Now to install the nightly toolchain, let’s run this:
|
||||
This will both download the stable toolchain and set it as the default one. Now
|
||||
to install the nightly toolchain, let’s run this:
|
||||
#+BEGIN_SRC fish
|
||||
rustup toolchain install nightly
|
||||
#+END_SRC
|
||||
@ -596,7 +669,8 @@ This will both download the stable toolchain and set it as the default one. Now
|
||||
: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~.
|
||||
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"
|
||||
cargo install rustfmt racer
|
||||
@ -631,7 +705,8 @@ Here is the code to do so:
|
||||
: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.
|
||||
Some packages will be needed from pip in order to get our Emacs setup correctly
|
||||
working.
|
||||
#+NAME: python-packages-table
|
||||
| Package | Why |
|
||||
|-----------------------------+-------------------------|
|
||||
@ -659,7 +734,8 @@ Let’s install them locally for our user.
|
||||
: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.
|
||||
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"
|
||||
chicken-install -s apropos chicken-doc
|
||||
@ -675,7 +751,8 @@ Then, we’ll complete the documentation like so:
|
||||
: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.
|
||||
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:
|
||||
|
@ -9,18 +9,25 @@
|
||||
: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]].
|
||||
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:
|
||||
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.
|
||||
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 = true;
|
||||
#+END_SRC
|
||||
|
||||
The blur radius radius for shadows is measured in pixels, and it defaults to 12px.
|
||||
The blur radius radius for shadows is measured in pixels, and it defaults to
|
||||
12px.
|
||||
#+BEGIN_SRC conf
|
||||
shadow-radius = 17;
|
||||
#+END_SRC
|
||||
@ -40,7 +47,10 @@ The left and top offsets for shadows are expressed in pixels.
|
||||
shadow-offset-y = -12;
|
||||
#+END_SRC
|
||||
|
||||
It is possible to set the color of the shadow with the string contained in ~shadow-color~ with a hexadecimal value. I haven’t included these values in my config, but this value will override any value in ~shadow-red~, ~shadow-green~, or ~shadow-blue~.
|
||||
It is possible to set the color of the shadow with the string contained in
|
||||
~shadow-color~ with a hexadecimal value. I haven’t included these values in my
|
||||
config, but this value will override any value in ~shadow-red~, ~shadow-green~,
|
||||
or ~shadow-blue~.
|
||||
#+BEGIN_SRC conf
|
||||
shadow-color = "#000000"
|
||||
#+END_SRC
|
||||
@ -58,20 +68,19 @@ shadow.
|
||||
];
|
||||
#+END_SRC
|
||||
|
||||
It is also possible to specify an X geometry that describes the region in
|
||||
which shadows should not be painted in, such as a dock window region. For
|
||||
example,
|
||||
It is also possible to specify an X geometry that describes the region in which
|
||||
shadows should not be painted in, such as a dock window region. For example,
|
||||
#+BEGIN_SRC conf :tangle no
|
||||
# shadow-exclude-reg = "x10+0+0"
|
||||
#+END_SRC
|
||||
would make the 10 pixels at the bottom of the screen not have any shadow
|
||||
painted on.
|
||||
would make the 10 pixels at the bottom of the screen not have any shadow painted
|
||||
on.
|
||||
| Default value | ~""~ |
|
||||
#+BEGIN_SRC conf :tangle no
|
||||
shadow-exclude-reg = ""
|
||||
#+END_SRC
|
||||
|
||||
Finally, it is also possible to crop the shadow of a window fully on a
|
||||
Finally, it is also possible to crop the shadow of a window fully on a
|
||||
particular Xinerama screen to the screen.
|
||||
- Default value :: ~false~
|
||||
#+BEGIN_SRC conf
|
||||
@ -85,19 +94,26 @@ particular Xinerama screen to the screen.
|
||||
: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.
|
||||
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.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
no-dock-shadow = false;
|
||||
#+END_SRC
|
||||
|
||||
This option allows Picom not to draw on drag-and-drop windows. This option is deprecated, and users should use the ~wintypes~ option in their config file instead.
|
||||
This option allows Picom not to draw on drag-and-drop windows. This option is
|
||||
deprecated, and users should use the ~wintypes~ option in their config file
|
||||
instead.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
no-dnd-shadow = false;
|
||||
#+END_SRC
|
||||
|
||||
~shadow-ignore-shaped~ is also deprecated. It used to indicate Picom not to paint shadows on shaped windows. Note shaped windows here means windows setting their shape through X Shape extension. Those using ARGB background are beyond Picom’s control. Since it is deprecated, you could instead use
|
||||
~shadow-ignore-shaped~ is also deprecated. It used to indicate Picom not to
|
||||
paint shadows on shaped windows. Note shaped windows here means windows setting
|
||||
their shape through X Shape extension. Those using ARGB background are beyond
|
||||
Picom’s control. Since it is deprecated, you could instead use
|
||||
#+BEGIN_SRC conf :tangle no
|
||||
shadow-exclude = 'bounding_shaped'
|
||||
#+END_SRC
|
||||
@ -114,12 +130,15 @@ or
|
||||
: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:
|
||||
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;
|
||||
#+END_SRC
|
||||
|
||||
It is also possible to exclude some windows from getting their corners rounded. I personally excluded any window generated by AwesomeWM.
|
||||
It is also possible to exclude some windows from getting their corners rounded.
|
||||
I personally excluded any window generated by AwesomeWM.
|
||||
#+BEGIN_SRC conf
|
||||
rounded-corners-exclude = [
|
||||
"_NET_WM_WINDOW_TYPE@[0]:a = '_NET_WM_WINDOW_TYPE_DOCK'"
|
||||
@ -130,7 +149,10 @@ It is also possible to exclude some windows from getting their corners rounded.
|
||||
: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~.
|
||||
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
|
||||
fading = true
|
||||
@ -152,7 +174,8 @@ This value represents the time between steps in fade steps, in milliseconds.
|
||||
fade-delta = 20;
|
||||
#+END_SRC
|
||||
|
||||
It is possible to exclude some windows that should not be faded with a specified list of conditions.
|
||||
It is possible to exclude some windows that should not be faded with a specified
|
||||
list of conditions.
|
||||
| Default value | ~[]~ |
|
||||
#+BEGIN_SRC conf
|
||||
fade-exclude = [ "class_g = 'mpv'" ];
|
||||
@ -164,7 +187,8 @@ This option allows Picom not to create any fade on windows opening or closing.
|
||||
no-fading-openclose = true;
|
||||
#+END_SRC
|
||||
|
||||
Finally, this option is a workaround for Openbox, Fluxbox and others by not fading destroyed ARGB windows with WM frame.
|
||||
Finally, this option is a workaround for Openbox, Fluxbox and others by not
|
||||
fading destroyed ARGB windows with WM frame.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
no-fading-destroyed-argb = false
|
||||
@ -174,7 +198,9 @@ Finally, this option is a workaround for Openbox, Fluxbox and others by not fadi
|
||||
: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.
|
||||
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~ |
|
||||
| Max value | ~1.0~ |
|
||||
@ -182,7 +208,8 @@ Picom is also able to create some opacity or transparency for windows, depending
|
||||
inactive-opacity = 0.6;
|
||||
#+END_SRC
|
||||
|
||||
On the other hand, it is possible to declare a default opacity for active windows.
|
||||
On the other hand, it is possible to declare a default opacity for active
|
||||
windows.
|
||||
| Default value | ~1.0~ |
|
||||
| Min value | ~0.1~ |
|
||||
| Max value | ~1.0~ |
|
||||
@ -206,13 +233,15 @@ This however describes the opacity of window titlebars and borders.
|
||||
# menu-opacity = 0.9;
|
||||
#+END_SRC
|
||||
|
||||
~inactive-opacity-override~ allows the user to let inactive opacity set by ~-i~ override the ~_NET_WM_OPACITY_ values of windows.
|
||||
~inactive-opacity-override~ allows the user to let inactive opacity set by ~-i~
|
||||
override the ~_NET_WM_OPACITY_ values of windows.
|
||||
| Default value | ~true~ |
|
||||
#+BEGIN_SRC conf
|
||||
inactive-opacity-override = true;
|
||||
#+END_SRC
|
||||
|
||||
While it is possible to alter opacity on inactive windows, it is also possible to dim them.
|
||||
While it is possible to alter opacity on inactive windows, it is also possible
|
||||
to dim them.
|
||||
| Default value | ~1.0~ |
|
||||
| Min value | ~0.1~ |
|
||||
| Max value | ~1.0~ |
|
||||
@ -220,7 +249,8 @@ While it is possible to alter opacity on inactive windows, it is also possible t
|
||||
# inactive-dim = 1.0
|
||||
#+END_SRC
|
||||
|
||||
It is also possible to use a fixed inactive dim value, instead of adjusting according to window opacity.
|
||||
It is also possible to use a fixed inactive dim value, instead of adjusting
|
||||
according to window opacity.
|
||||
| Default value | ~1.0~ |
|
||||
| Min value | ~0.1~ |
|
||||
| Max value | ~1.0~ |
|
||||
@ -228,13 +258,17 @@ It is also possible to use a fixed inactive dim value, instead of adjusting acco
|
||||
# inactive-dim-fixed = 1.0
|
||||
#+END_SRC
|
||||
|
||||
It is also possible to specify a list of conditions of windows that should always be considered focused.
|
||||
It is also possible to specify a list of conditions of windows that should
|
||||
always be considered focused.
|
||||
| Default value | ~[]~ |
|
||||
#+BEGIN_SRC conf
|
||||
focus-exclude = [ "class_g = 'mpv'" ];
|
||||
#+END_SRC
|
||||
|
||||
The user can also specify a list of opacity rules, in the format ~PERCENT:PATTERN~, like ~50:name *= "Firefox"~ . ~picom-trans~ is recommended over this. Note we don't make any guarantee about possible conflicts with other programs that set ~_NET_WM_WINDOW_OPACITY~ on frame or client windows.
|
||||
The user can also specify a list of opacity rules, in the format
|
||||
~PERCENT:PATTERN~, like ~50:name *= "Firefox"~ . ~picom-trans~ is recommended
|
||||
over this. Note we don't make any guarantee about possible conflicts with other
|
||||
programs that set ~_NET_WM_WINDOW_OPACITY~ on frame or client windows.
|
||||
| Default value | ~[]~ |
|
||||
#+BEGIN_SRC conf
|
||||
opacity-rule = [];
|
||||
@ -244,7 +278,8 @@ The user can also specify a list of opacity rules, in the format ~PERCENT:PATTER
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Background_blurring-55835066
|
||||
:END:
|
||||
The following are the parameters for background blurring, see the \*BLUR\* section for more information.
|
||||
The following are the parameters for background blurring, see the \*BLUR\*
|
||||
section for more information.
|
||||
#+BEGIN_SRC conf
|
||||
blur: {
|
||||
method = "dual_kawase";
|
||||
@ -255,29 +290,33 @@ The following are the parameters for background blurring, see the \*BLUR\* secti
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
This value enables or disables the blur for the background of semi-transparent or ARGB windows. It has bad performances though, with driver-dependent behavior. The name of the switch may change without prior notifications.
|
||||
This value enables or disables the blur for the background of semi-transparent
|
||||
or ARGB windows. It has bad performances though, with driver-dependent behavior.
|
||||
The name of the switch may change without prior notifications.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
blur-background = true;
|
||||
#+END_SRC
|
||||
|
||||
Blur background of windows when the window frame is not opaque. If true, this implies the value ~true~ for ~blur-background~.
|
||||
Blur background of windows when the window frame is not opaque. If true, this
|
||||
implies the value ~true~ for ~blur-background~.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
blur-background-frame = true;
|
||||
#+END_SRC
|
||||
|
||||
The following determines whether to use fixed blur strength rather than adjusting according to window opacity.
|
||||
The following determines whether to use fixed blur strength rather than
|
||||
adjusting according to window opacity.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
blur-background-fixed = false;
|
||||
#+END_SRC
|
||||
|
||||
Specify the blur convolution kernel, with the format ~"5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"~.
|
||||
Specify the blur convolution kernel, with the format
|
||||
~"5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"~.
|
||||
| Default value | ~""~ |
|
||||
#+BEGIN_SRC conf
|
||||
# blur-kern = "3x3box";
|
||||
blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#+END_SRC
|
||||
|
||||
It is possible to write exclude conditions for background blur.
|
||||
@ -295,13 +334,15 @@ It is possible to write exclude conditions for background blur.
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: General_settings-41398de7
|
||||
:END:
|
||||
Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
Daemonize process. Fork to background after initialization. Causes issues with
|
||||
certain (badly-written) drivers.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
daemon = true;
|
||||
#+END_SRC
|
||||
|
||||
Picom has three backends it can use: ~xrender~, ~glx~, and ~xr_glx_hybrid~. GLX backend is typically much faster but depends on a sane driver.
|
||||
Picom has three backends it can use: ~xrender~, ~glx~, and ~xr_glx_hybrid~. GLX
|
||||
backend is typically much faster but depends on a sane driver.
|
||||
| Default value | ~xrender~ |
|
||||
#+BEGIN_SRC conf
|
||||
backend = "glx";
|
||||
@ -313,60 +354,72 @@ This enables or disables VSync.
|
||||
vsync = true;
|
||||
#+END_SRC
|
||||
|
||||
Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
Enable remote control via D-Bus. See the *D-BUS API* section below for more
|
||||
details.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
dbus = false;
|
||||
#+END_SRC
|
||||
|
||||
Try to detect WM windows (a non-override-redirect window with no child that has ~WM_STATE~) and markz them as active.
|
||||
Try to detect WM windows (a non-override-redirect window with no child that has
|
||||
~WM_STATE~) and markz them as active.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
mark-wmwin-focused = true;
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Mark override-redirect windows that doesn't have a child window with ~WM_STATE~ focused.
|
||||
Mark override-redirect windows that doesn't have a child window with ~WM_STATE~
|
||||
focused.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
mark-ovredir-focused = true;
|
||||
#+END_SRC
|
||||
|
||||
Try to detect windows with rounded corners and don't consider them shaped windows. The accuracy is not very high, unfortunately.
|
||||
Try to detect windows with rounded corners and don't consider them shaped
|
||||
windows. The accuracy is not very high, unfortunately.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
detect-rounded-corners = true;
|
||||
#+END_SRC
|
||||
|
||||
Detect ~_NET_WM_OPACITY~ on client windows, useful for window managers not passing ~_NET_WM_OPACITY~ of client windows to frame windows.
|
||||
Detect ~_NET_WM_OPACITY~ on client windows, useful for window managers not
|
||||
passing ~_NET_WM_OPACITY~ of client windows to frame windows.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
detect-client-opacity = true;
|
||||
#+END_SRC
|
||||
|
||||
Specify refresh rate of the screen. If not specified or 0, picom will try detecting this with X RandR extension.
|
||||
Specify refresh rate of the screen. If not specified or 0, picom will try
|
||||
detecting this with X RandR extension.
|
||||
| Default value | ~60~ |
|
||||
#+BEGIN_SRC conf
|
||||
refresh-rate = 120;
|
||||
#+END_SRC
|
||||
|
||||
Limit picom to repaint at most once every 1 / ~refresh_rate~ second to boost performance. This should not be used with
|
||||
Limit picom to repaint at most once every 1 / ~refresh_rate~ second to boost
|
||||
performance. This should not be used with
|
||||
#+BEGIN_SRC text :tangle no
|
||||
vsync drm/opengl/opengl-oml
|
||||
#+END_SRC
|
||||
as they essentially does sw-opti's job already, unless you wish to specify a lower refresh rate than the actual value.
|
||||
as they essentially does sw-opti's job already, unless you wish to specify a
|
||||
lower refresh rate than the actual value.
|
||||
| Default value | ~""~ |
|
||||
#+BEGIN_SRC conf
|
||||
# sw-opti =;
|
||||
#+END_SRC
|
||||
|
||||
Use EWMH ~_NET_ACTIVE_WINDOW~ to determine currently focused window, rather than listening to ~FocusIn~/~FocusOut~ event. Might have more accuracy, provided that the WM supports it.
|
||||
Use EWMH ~_NET_ACTIVE_WINDOW~ to determine currently focused window, rather than
|
||||
listening to ~FocusIn~/~FocusOut~ event. Might have more accuracy, provided that
|
||||
the WM supports it.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
# use-ewmh-active-win = false;
|
||||
#+END_SRC
|
||||
|
||||
Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows. Known to cause flickering when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
|
||||
Unredirect all windows if a full-screen opaque window is detected, to maximize
|
||||
performance for full-screen windows. Known to cause flickering when
|
||||
redirecting/unredirecting windows. paint-on-overlay may make the flickering less
|
||||
obvious.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
unredir-if-possible = false;
|
||||
@ -378,67 +431,91 @@ Delay before unredirecting the window, in milliseconds.
|
||||
unredir-if-possible-delay = 0;
|
||||
#+END_SRC
|
||||
|
||||
Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||
Conditions of windows that shouldn't be considered full-screen for unredirecting
|
||||
screen.
|
||||
| Default value | ~[]~ |
|
||||
#+BEGIN_SRC conf
|
||||
unredir-if-possible-exclude = [];
|
||||
#+END_SRC
|
||||
|
||||
Use ~WM_TRANSIENT_FOR~ to group windows, and consider windows in the same group focused at the same time.
|
||||
Use ~WM_TRANSIENT_FOR~ to group windows, and consider windows in the same group
|
||||
focused at the same time.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
detect-transient = true;
|
||||
#+END_SRC
|
||||
|
||||
Use ~WM_CLIENT_LEADER~ to group windows, and consider windows in the same group focused at the same time. ~WM_TRANSIENT_FOR~ has higher priority if detect-transient is enabled, too.
|
||||
Use ~WM_CLIENT_LEADER~ to group windows, and consider windows in the same group
|
||||
focused at the same time. ~WM_TRANSIENT_FOR~ has higher priority if
|
||||
detect-transient is enabled, too.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
detect-client-leader = true;
|
||||
#+END_SRC
|
||||
|
||||
Resize damaged region by a specific number of pixels. A positive value enlarges it while a negative one shrinks it. If the value is positive, those additional pixels will not be actually painted to screen, only used in blur calculation, and such. (Due to technical limitations, with use-damage, those pixels will still be incorrectly painted to screen.) Primarily used to fix the line corruption issues of blur, in which case you should use the blur radius value here (e.g. with a 3x3 kernel, you should use ~--resize-damage 1~, with a 5x5 one you use ~--resize-damage 2~, and so on). May or may not work with ~--glx-no-stencil~. Shrinking doesn't function correctly.
|
||||
Resize damaged region by a specific number of pixels. A positive value enlarges
|
||||
it while a negative one shrinks it. If the value is positive, those additional
|
||||
pixels will not be actually painted to screen, only used in blur calculation,
|
||||
and such. (Due to technical limitations, with use-damage, those pixels will
|
||||
still be incorrectly painted to screen.) Primarily used to fix the line
|
||||
corruption issues of blur, in which case you should use the blur radius value
|
||||
here (e.g. with a 3x3 kernel, you should use ~--resize-damage 1~, with a 5x5 one
|
||||
you use ~--resize-damage 2~, and so on). May or may not work with
|
||||
~--glx-no-stencil~. Shrinking doesn't function correctly.
|
||||
| Default value | ~1~ |
|
||||
#+BEGIN_SRC conf
|
||||
resize-damage = 1;
|
||||
#+END_SRC
|
||||
|
||||
Specify a list of conditions of windows that should be painted with inverted color. Resource-hogging, and is not well tested.
|
||||
Specify a list of conditions of windows that should be painted with inverted
|
||||
color. Resource-hogging, and is not well tested.
|
||||
| Default value | ~[]~ |
|
||||
#+BEGIN_SRC conf
|
||||
invert-color-include = [];
|
||||
#+END_SRC
|
||||
|
||||
Disable the use of damage information. This cause the whole screen to be redrawn everytime, instead of the part of the screen has actually changed. Potentially degrades the performance, but might fix some artifacts. The opposing option is use-damage
|
||||
Disable the use of damage information. This cause the whole screen to be redrawn
|
||||
everytime, instead of the part of the screen has actually changed. Potentially
|
||||
degrades the performance, but might fix some artifacts. The opposing option is
|
||||
use-damage
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
use-damage = false;
|
||||
#+END_SRC
|
||||
|
||||
Use X Sync fence to sync clients' draw calls, to make sure all draw calls are finished before picom starts drawing. Needed on nvidia-drivers with GLX backend for some users.
|
||||
Use X Sync fence to sync clients' draw calls, to make sure all draw calls are
|
||||
finished before picom starts drawing. Needed on nvidia-drivers with GLX backend
|
||||
for some users.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
xrender-sync-fence = false;
|
||||
#+END_SRC
|
||||
|
||||
Force all windows to be painted with blending. Useful if you have a glx-fshader-win that could turn opaque pixels transparent.
|
||||
Force all windows to be painted with blending. Useful if you have a
|
||||
glx-fshader-win that could turn opaque pixels transparent.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
force-win-blend = false;
|
||||
#+END_SRC
|
||||
|
||||
Do not use EWMH to detect fullscreen windows. Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||
Do not use EWMH to detect fullscreen windows. Reverts to checking if a window is
|
||||
fullscreen based only on its size and coordinates.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
no-ewmh-fullscreen = false;
|
||||
#+END_SRC
|
||||
|
||||
Dimming bright windows so their brightness doesn't exceed this set value. Brightness of a window is estimated by averaging all pixels in the window, so this could comes with a performance hit. Setting this to 1.0 disables this behaviour. Requires ~--use-damage~ to be disabled.
|
||||
Dimming bright windows so their brightness doesn't exceed this set value.
|
||||
Brightness of a window is estimated by averaging all pixels in the window, so
|
||||
this could comes with a performance hit. Setting this to 1.0 disables this
|
||||
behaviour. Requires ~--use-damage~ to be disabled.
|
||||
| Default value | ~1.0~ |
|
||||
#+BEGIN_SRC conf
|
||||
max-brightness = 1.0;
|
||||
#+END_SRC
|
||||
|
||||
Make transparent windows clip other windows like non-transparent windows do, instead of blending on top of them.
|
||||
Make transparent windows clip other windows like non-transparent windows do,
|
||||
instead of blending on top of them.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
transparent-clipping = false;
|
||||
@ -450,13 +527,18 @@ Set the log level. Possible values are:
|
||||
- ~info~
|
||||
- ~warn~
|
||||
- ~error~
|
||||
in increasing level of importance. Case doesn't matter. If using the "TRACE" log level, it's better to log into a file using ~--log-file~, since it can generate a huge stream of logs.
|
||||
in increasing level of importance. Case doesn't matter. If using the "TRACE" log
|
||||
level, it's better to log into a file using ~--log-file~, since it can generate
|
||||
a huge stream of logs.
|
||||
| Default value | ~"debug"~ |
|
||||
#+BEGIN_SRC conf
|
||||
log-level = "warn";
|
||||
#+END_SRC
|
||||
|
||||
Set the log file. If ~--log-file~ is never specified, logs will be written to stderr. Otherwise, logs will to written to the given file, though some of the early logs might still be written to the stderr. When setting this option from the config file, it is recommended to use an absolute path.
|
||||
Set the log file. If ~--log-file~ is never specified, logs will be written to
|
||||
stderr. Otherwise, logs will to written to the given file, though some of the
|
||||
early logs might still be written to the stderr. When setting this option from
|
||||
the config file, it is recommended to use an absolute path.
|
||||
| Default value | ~''~ |
|
||||
#+BEGIN_SRC conf
|
||||
# log-file = '/path/to/your/log/file';
|
||||
@ -474,7 +556,8 @@ Write process ID to a file.
|
||||
# write-pid-path = '/path/to/your/log/file';
|
||||
#+END_SRC
|
||||
|
||||
Window type settings. ~WINDOW_TYPE~ is one of the 15 window types defined in EWMH standard:
|
||||
Window type settings. ~WINDOW_TYPE~ is one of the 15 window types defined in
|
||||
EWMH standard:
|
||||
- ~"unknown"~
|
||||
- ~"desktop"~
|
||||
- ~"dock"~
|
||||
@ -493,9 +576,16 @@ Window type settings. ~WINDOW_TYPE~ is one of the 15 window types defined in EWM
|
||||
Following per window-type options are available:
|
||||
- fade, shadow :: Controls window-type-specific shadow and fade settings.
|
||||
- opacity :: Controls default opacity of the window type.
|
||||
- focus :: Controls whether the window of this type is to be always considered focused. (By default, all window types except "normal" and "dialog" has this on.)
|
||||
- full-shadow :: Controls whether shadow is drawn under the parts of the window that you normally won't be able to see. Useful when the window has parts of it transparent, and you want shadows in those areas.
|
||||
- redir-ignore :: Controls whether this type of windows should cause screen to become redirected again after been unredirected. If you have unredir-if-possible set, and doesn't want certain window to cause unnecessary screen redirection, you can set this to `true`.
|
||||
- focus :: Controls whether the window of this type is to be always considered
|
||||
focused. (By default, all window types except "normal" and "dialog" has this
|
||||
on.)
|
||||
- full-shadow :: Controls whether shadow is drawn under the parts of the window
|
||||
that you normally won't be able to see. Useful when the window has parts of it
|
||||
transparent, and you want shadows in those areas.
|
||||
- redir-ignore :: Controls whether this type of windows should cause screen to
|
||||
become redirected again after been unredirected. If you have
|
||||
unredir-if-possible set, and doesn't want certain window to cause unnecessary
|
||||
screen redirection, you can set this to `true`.
|
||||
#+BEGIN_SRC conf
|
||||
wintypes:
|
||||
{
|
||||
@ -511,19 +601,26 @@ Following per window-type options are available:
|
||||
: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.
|
||||
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
|
||||
glx-no-stencil = true;
|
||||
#+END_SRC
|
||||
|
||||
Avoid rebinding pixmap on window damage. Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). Recommended if it works.
|
||||
Avoid rebinding pixmap on window damage. Probably could improve performance on
|
||||
rapid window content changes, but is known to break things on some drivers
|
||||
(LLVMpipe, xf86-video-intel, etc.). Recommended if it works.
|
||||
| Default value | ~false~ |
|
||||
#+BEGIN_SRC conf
|
||||
glx-no-rebind-pixmap = false;
|
||||
#+END_SRC
|
||||
|
||||
Use specified GLSL fragment shader for rendering window contents. See ~compton-default-fshader-win.glsl~ and ~compton-fake-transparency-fshader-win.glsl~ in the source tree for examples.
|
||||
Use specified GLSL fragment shader for rendering window contents. See
|
||||
~compton-default-fshader-win.glsl~ and
|
||||
~compton-fake-transparency-fshader-win.glsl~ in the source tree for examples.
|
||||
| Default value | ~''~ |
|
||||
#+BEGIN_SRC conf :tangle no
|
||||
glx-fshader-win = '';
|
||||
|
@ -10,7 +10,9 @@
|
||||
: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.
|
||||
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:
|
||||
@ -41,9 +43,12 @@ Merge multiple imports into a single nested import.
|
||||
: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.
|
||||
The maximum length of enum variant having discriminant, that gets vertically
|
||||
aligned with others. Variants without discriminants would be ignored for the
|
||||
purpose of alignment.
|
||||
|
||||
Note that this is not how much whitespace is inserted, but instead the longest variant name that doesn't get ignored when aligning.
|
||||
Note that this is not how much whitespace is inserted, but instead the longest
|
||||
variant name that doesn't get ignored when aligning.
|
||||
#+BEGIN_SRC toml
|
||||
enum_discrim_align_threshold = 20
|
||||
#+END_SRC
|
||||
|
@ -10,7 +10,9 @@
|
||||
: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]].
|
||||
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:
|
||||
@ -28,13 +30,15 @@ Whether if a new *pane* should retain the current path. Possible values are:
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_new_window_retain_current_path=true
|
||||
#+END_SRC
|
||||
Whether or not tmux should attempt to reconnect to the current ssh session. This is still experimental. Possible values are:
|
||||
Whether or not tmux should attempt to reconnect to the current ssh session. This
|
||||
is still experimental. Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_new_pane_reconnect_ssh=true
|
||||
#+END_SRC
|
||||
Whether tmux should prompt for new session name when creating a new one. Possible values are:
|
||||
Whether tmux should prompt for new session name when creating a new one.
|
||||
Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
#+BEGIN_SRC conf-unix
|
||||
@ -45,7 +49,8 @@ tmux_conf_new_session_prompt=false
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Display-d5ae1908
|
||||
:END:
|
||||
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2). Possible values are:
|
||||
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2).
|
||||
Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
#+BEGIN_SRC conf-unix
|
||||
@ -56,7 +61,8 @@ These variables are for chosing the window style. I use the default one.
|
||||
tmux_conf_theme_window_fg='default'
|
||||
tmux_conf_theme_window_bg='default'
|
||||
#+END_SRC
|
||||
Whether the focused pane should be highlighted (only available in tmux >= 2.1). Possible values are:
|
||||
Whether the focused pane should be highlighted (only available in tmux >= 2.1).
|
||||
Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
#+BEGIN_SRC conf-unix
|
||||
@ -72,7 +78,9 @@ Set the terminal title. Built-in variables are:
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'
|
||||
#+END_SRC
|
||||
These variables set the left/right separators between sections. With the current values, you don’t need to install Powerline, but only fonts patched with Powerline symbols or the standalone PowerlineSymbols.otf font.
|
||||
These variables set the left/right separators between sections. With the current
|
||||
values, you don’t need to install Powerline, but only fonts patched with
|
||||
Powerline symbols or the standalone PowerlineSymbols.otf font.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_theme_left_separator_main='\uE0B0'
|
||||
tmux_conf_theme_left_separator_sub='\uE0B1'
|
||||
@ -84,7 +92,10 @@ These variables set the left/right separators between sections. With the current
|
||||
: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.
|
||||
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:
|
||||
- ~thin~ (default)
|
||||
@ -92,7 +103,8 @@ Choose the style of the pane borders. Possible values are:
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_theme_pane_border_style=thin
|
||||
#+END_SRC
|
||||
Declare what the colors of the focused pane should be. The first variable specifies the foreground color, the other the background color.
|
||||
Declare what the colors of the focused pane should be. The first variable
|
||||
specifies the foreground color, the other the background color.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_theme_focused_pane_fg='default'
|
||||
tmux_conf_theme_focused_pane_bg='#0087d7'
|
||||
@ -188,7 +200,8 @@ Sets the window last status style.
|
||||
tmux_conf_theme_window_status_last_bg='default'
|
||||
tmux_conf_theme_window_status_last_attr='none'
|
||||
#+END_SRC
|
||||
Sets the left and right content of the status bar of tmux. Sections should be separated with =|=, subsections with =,=. The built-in values are:
|
||||
Sets the left and right content of the status bar of tmux. Sections should be
|
||||
separated with =|=, subsections with =,=. The built-in values are:
|
||||
- =#{battery_bar}=
|
||||
- =#{battery_hbar}=
|
||||
- =#{battery_percentage}=
|
||||
@ -268,7 +281,8 @@ Set the battery bar length in terms of amount of symbols. Possible values are:
|
||||
Set the battery bar palette. Possible values are:
|
||||
- =gradient= (default)
|
||||
- =heat=
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB value preceded by a pound symbol =#=.
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
|
||||
value preceded by a pound symbol =#=.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_battery_bar_palette='gradient'
|
||||
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'
|
||||
@ -276,14 +290,16 @@ Set the battery bar palette. Possible values are:
|
||||
Set the hbar palette. Possible values are:
|
||||
- =gradient= (default)
|
||||
- =heat=
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB value preceded by a pound symbol =#=.
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
|
||||
value preceded by a pound symbol =#=.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_battery_hbar_palette='gradient'
|
||||
#+END_SRC
|
||||
Set the vbar palette. Possible values are:
|
||||
- =gradient= (default)
|
||||
- =heat=
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB value preceded by a pound symbol =#=.
|
||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
|
||||
value preceded by a pound symbol =#=.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_battery_vbar_palette='gradient'
|
||||
#+END_SRC
|
||||
@ -295,7 +311,9 @@ Set symbols used to indicate whether the battery is charging or discharging.
|
||||
# tmux_conf_battery_status_discharging='↓' # U+2193
|
||||
#tmux_conf_battery_status_charging='🔌 ' # U+1F50C
|
||||
#+END_SRC
|
||||
Set the clock style. If it is displayed on the right side of the status bar, it might be better to use =%I:%M %p= rather than =%R= in =tmux_conf_theme_status_right=.
|
||||
Set the clock style. If it is displayed on the right side of the status bar, it
|
||||
might be better to use =%I:%M %p= rather than =%R= in
|
||||
=tmux_conf_theme_status_right=.
|
||||
#+BEGIN_SRC conf-unix
|
||||
tmux_conf_theme_clock_colour='#00afff'
|
||||
tmux_conf_theme_clock_style='24'
|
||||
@ -305,7 +323,8 @@ Set the clock style. If it is displayed on the right side of the status bar, it
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Clipboard-66d0d03a
|
||||
:END:
|
||||
Whether if in copy mode, copying the selection also copies to the OS clipboard. Possible values are:
|
||||
Whether if in copy mode, copying the selection also copies to the OS clipboard.
|
||||
Possible values are:
|
||||
- ~true~
|
||||
- ~false~ (default)
|
||||
#+BEGIN_SRC conf-unix
|
||||
@ -316,7 +335,8 @@ Whether if in copy mode, copying the selection also copies to the OS clipboard.
|
||||
: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.
|
||||
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
|
||||
#+END_SRC
|
||||
@ -324,12 +344,15 @@ We can also start with mouse mode enabled. But I don’t.
|
||||
#+BEGIN_SRC conf-unix
|
||||
#set -g mouse on
|
||||
#+END_SRC
|
||||
Whether or not Vi mode should be enabled. But really, we should rather export the =VISUAL= or =EDITOR= environment variables, see the tmux manual. Although I don’t, as said in my dotfish, I prefer to use Emacs.
|
||||
Whether or not Vi mode should be enabled. But really, we should rather export
|
||||
the =VISUAL= or =EDITOR= environment variables, see the tmux manual. Although I
|
||||
don’t, as said in my dotfish, I prefer to use Emacs.
|
||||
#+BEGIN_SRC conf-unix
|
||||
#set -g status-keys vi
|
||||
#set -g mode-keys vi
|
||||
#+END_SRC
|
||||
Replace =C-b= by =C-a= instead of using both prefixes. I personally prefer to just use =C-b=, hence why the lines are commented.
|
||||
Replace =C-b= by =C-a= instead of using both prefixes. I personally prefer to
|
||||
just use =C-b=, hence why the lines are commented.
|
||||
#+BEGIN_SRC conf-unix
|
||||
# set -gu prefix2
|
||||
# unbind C-a
|
||||
|
Loading…
Reference in New Issue
Block a user