Compare commits
No commits in common. "55eb0dfb09973d6a595310ecf02d28a2fecdb445" and "95a16788e763e43c7d037b04ec2cde445435255d" have entirely different histories.
55eb0dfb09
...
95a16788e7
File diff suppressed because it is too large
Load Diff
@ -1,43 +1,30 @@
|
|||||||
#+title: Neofetch configuration
|
#+title: Neofetch configuration
|
||||||
#+setupfile: headers
|
#+setupfile: ../headers
|
||||||
#+OPTIONS: auto-id:t
|
#+OPTIONS: auto-id:t
|
||||||
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's Neofetch config" />
|
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's Neofetch config" />
|
||||||
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's Neofetch config" />
|
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's Neofetch config" />
|
||||||
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the Neofetch config file of Phundrak" />
|
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the Neofetch config file of Phundrak" />
|
||||||
#+PROPERTY: header-args :noweb yes :exports code :tangle no :exports none
|
#+PROPERTY: header-args :noweb yes :exports code :tangle no :exports none
|
||||||
#+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code :noweb yes :padline no :mkdir yes
|
#+PROPERTY: header-args:sh :tangle ~/.config/neofetch/config.conf :exports code :noweb yes :padline no :mkdir yes :shebang "#!/usr/bin/env sh"
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Introduction-5942aea3
|
:CUSTOM_ID: Introduction-5942aea3
|
||||||
:END:
|
:END:
|
||||||
[[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was written in
|
[[https://github.com/dylanaraps/neofetch][Neofetch]] is a CLI utility used to display system information. It was written in Bash, and thus its configuration file is written as a Bash script too. This document was written with org-mode, and my configuration file is tangled from the source blocks you will see below to ~~/.config/neofetch/config.conf~. This configuration will only contain what I need. For any further information, please refer to the [[https://github.com/dylanaraps/neofetch][original repository]] and [[https://github.com/dylanaraps/neofetch/wiki/Customizing-Info][its documentation]].
|
||||||
Bash, and thus its configuration file is written as a Bash script too. This
|
|
||||||
document was written with org-mode, and my configuration file is tangled from
|
|
||||||
the source blocks you will see below to ~~/.config/neofetch/config.conf~. This
|
|
||||||
configuration will only contain what I need. For any further information, please
|
|
||||||
refer to the [[https://github.com/dylanaraps/neofetch][original repository]] and [[https://github.com/dylanaraps/neofetch/wiki/Customizing-Info][its documentation]].
|
|
||||||
|
|
||||||
* The ~print_info~ functions
|
* The ~print_info~ functions
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: The_print_info_functions-bb30763f
|
:CUSTOM_ID: The_print_info_functions-bb30763f
|
||||||
:END:
|
:END:
|
||||||
The ~print_info~ function is the function called by Neofetch in order to print
|
The ~print_info~ function is the function called by Neofetch in order to print the system information it could fetch. In this function, we’ll choose what to display, and how. This function looks like this:
|
||||||
the system information it could fetch. In this function, we’ll choose what to
|
|
||||||
display, and how. This function looks like this:
|
|
||||||
#+BEGIN_SRC sh :tangle no
|
#+BEGIN_SRC sh :tangle no
|
||||||
print_info() {
|
print_info() {
|
||||||
# Print information here…
|
# Print information here…
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Generally, what we will display will be shown through the ~info~ function,
|
Generally, what we will display will be shown through the ~info~ function, redefined inside Neofetch (this is not ~info(1)~). This ~info~ function accepts one or two arguments. With one argument, such as with ~info memory~, we can get a result that looks like ~5136MiB / 15873MiB~, while calling it with two arguments will treat the first one as a prefix and the second one as the interesting information; ~info "Memory" memory~ will look like ~Memory: 5136MiB / 15873MiB~. Here is what we want to display:
|
||||||
redefined inside Neofetch (this is not ~info(1)~). This ~info~ function accepts
|
|
||||||
one or two arguments. With one argument, such as with ~info memory~, we can get
|
|
||||||
a result that looks like ~5136MiB / 15873MiB~, while calling it with two
|
|
||||||
arguments will treat the first one as a prefix and the second one as the
|
|
||||||
interesting information; ~info "Memory" memory~ will look like
|
|
||||||
~Memory: 5136MiB / 15873MiB~. Here is what we want to display:
|
|
||||||
#+NAME: info-elements-table
|
#+NAME: info-elements-table
|
||||||
| Prefix | Information | What it does |
|
| Prefix | Information | What it does |
|
||||||
|----------+-------------+------------------------------|
|
|----------+-------------+------------------------------|
|
||||||
@ -45,7 +32,7 @@ interesting information; ~info "Memory" memory~ will look like
|
|||||||
| | line_break | Insert a blank line |
|
| | line_break | Insert a blank line |
|
||||||
| | cols | System theme |
|
| | cols | System theme |
|
||||||
| | line_break | Insert a blank line |
|
| | line_break | Insert a blank line |
|
||||||
| Distro | distro | Distribution name |
|
| OS | distro | Distribution name |
|
||||||
| Kernel | kernel | Kernel version |
|
| Kernel | kernel | Kernel version |
|
||||||
| Uptime | uptime | Machine uptime |
|
| Uptime | uptime | Machine uptime |
|
||||||
| Packages | packages | Number of installed packages |
|
| Packages | packages | Number of installed packages |
|
||||||
@ -101,11 +88,7 @@ Each of these modules can be tuned with the variables presented below.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-9d4cfe88
|
:CUSTOM_ID: Information_settings-9d4cfe88
|
||||||
:END:
|
:END:
|
||||||
Each of the following variable tunes a function that can be called in
|
Each of the following variable tunes a function that can be called in ~print_info~ described above. It is possible to tune them by modifying this document or the configuration file itself, and they can be overridden by the command line with flags passed to ~neofetch~. I will divide these variables in two main categories: hardware and software-related properties.
|
||||||
~print_info~ described above. It is possible to tune them by modifying this
|
|
||||||
document or the configuration file itself, and they can be overridden by the
|
|
||||||
command line with flags passed to ~neofetch~. I will divide these variables in
|
|
||||||
two main categories: hardware and software-related properties.
|
|
||||||
|
|
||||||
** Software
|
** Software
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -135,69 +118,6 @@ This variable can shorten the output of the ~distro~ function.
|
|||||||
|
|
||||||
It is possible to display when the distro has been installed on the computer.
|
It is possible to display when the distro has been installed on the computer.
|
||||||
|
|
||||||
***** Distro art or image
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: Information-settings-Software-OS-Distro-Distro-art-or-image-e60cbd1e
|
|
||||||
:END:
|
|
||||||
By default, Neofetch will display ascii art next to our system information
|
|
||||||
representing our distro’s logo. We’ll customize it a bit. First, let’s change
|
|
||||||
the ~backend~ value. Note that most of them (except ~off~ of course) support
|
|
||||||
shorthands such as ~--kitty~ when passed as arguments from the command line. In
|
|
||||||
my case, I will use the Kitty backend since it is the native backend of the
|
|
||||||
terminal emulator I use.
|
|
||||||
- Default value :: ~"ascii"~
|
|
||||||
- Values ::
|
|
||||||
- ~ascii~
|
|
||||||
- ~caca~
|
|
||||||
- ~catimg~
|
|
||||||
- ~chafa~
|
|
||||||
- ~jp2a~
|
|
||||||
- ~iterm2~
|
|
||||||
- ~off~
|
|
||||||
- ~pot~
|
|
||||||
- ~termpix~
|
|
||||||
- ~pixterm~
|
|
||||||
- ~tycat~
|
|
||||||
- ~w3m~
|
|
||||||
- ~kitty~
|
|
||||||
- ~ueberzug~
|
|
||||||
- ~viu~
|
|
||||||
- flag :: ~--backend~
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
image_backend="kitty"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Now, since I indicated I wanted an image engine, I’ll indicate neofetch which
|
|
||||||
image to find. Note that ~auto~ will pick the best image source for whatever
|
|
||||||
image backend is used. In ascii mode, distro ascii art will be used and in an
|
|
||||||
image mode, your wallpaper will be used.
|
|
||||||
- Default value :: ~auto~
|
|
||||||
- Values ::
|
|
||||||
- ~auto~
|
|
||||||
- ~ascii~
|
|
||||||
- ~wallpaper~
|
|
||||||
- ~/path/to/img~
|
|
||||||
- ~/path/to/ascii~
|
|
||||||
- ~/path/to/dir/~
|
|
||||||
- ~command output (neofetch --ascii "$(fortune | cowsay -W 30)")~
|
|
||||||
- Flag :: ~--source~
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
image_source="$HOME/org/config/img/leon.png"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
The default image size will probably not be correct since it is half the
|
|
||||||
terminal width and I have an ultrawide monitor, so I’ll need to set it manually.
|
|
||||||
- Default value :: ~auto~
|
|
||||||
- Values ::
|
|
||||||
- ~auto~
|
|
||||||
- ~00px~
|
|
||||||
- ~00%~
|
|
||||||
- ~none~
|
|
||||||
- Flag :: ~--image-size~ or ~--size~
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
image_size="224px"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** Kernel
|
**** Kernel
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce
|
:CUSTOM_ID: Information_settings-Software-OS-Kernel-658cedce
|
||||||
@ -266,9 +186,9 @@ This allows to show either the path of the user’s shell, or simply its name.
|
|||||||
- Examples ::
|
- Examples ::
|
||||||
- on :: ~/bin/bash~
|
- on :: ~/bin/bash~
|
||||||
- off :: ~bash~
|
- off :: ~bash~
|
||||||
#+begin_src sh
|
+begin_src sh
|
||||||
shell_path="off"
|
shell_path="off"
|
||||||
#+end_src
|
+end_src
|
||||||
|
|
||||||
***** Shell version
|
***** Shell version
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -311,8 +231,7 @@ it a bit, while ~tiny~ shortens it greatly.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d
|
:CUSTOM_ID: Information_settings-Software-IP_address-26df5e1d
|
||||||
:END:
|
:END:
|
||||||
It is possible to display the machine’s public IP address with the function
|
It is possible to display the machine’s public IP address with the function ~ip~. The value below allows the user to change the website used to fetch it.
|
||||||
~ip~. The value below allows the user to change the website used to fetch it.
|
|
||||||
- Default value :: ~"http://ident.me"~
|
- Default value :: ~"http://ident.me"~
|
||||||
- Value :: ~"url"~
|
- Value :: ~"url"~
|
||||||
- Flag :: ~--ip_host~
|
- Flag :: ~--ip_host~
|
||||||
@ -336,9 +255,7 @@ It is possible to display the machine’s public IP address with the function
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd
|
:CUSTOM_ID: Information_settings-Software-Theming-ba7f1ccd
|
||||||
:END:
|
:END:
|
||||||
This section will allow the user to modify what Neofetch can and cannot display
|
This section will allow the user to modify what Neofetch can and cannot display about the machine’s theming —by this, I mean its GTK theme, its icons and its default font.
|
||||||
about the machine’s theming —by this, I mean its GTK theme, its icons and its
|
|
||||||
default font.
|
|
||||||
|
|
||||||
**** Shorten output
|
**** Shorten output
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -361,8 +278,7 @@ With this value, it is possible to shorten the output of the computer’s themin
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571
|
:CUSTOM_ID: Information_settings-Software-Theming-Enable_or_disable_theming_display_for_GTK2-f4398571
|
||||||
:END:
|
:END:
|
||||||
It is possible to explicitely show or hide the computer’s theming with GTK2 with
|
It is possible to explicitely show or hide the computer’s theming with GTK2 with this variable.
|
||||||
this variable.
|
|
||||||
- Default value :: ~"on"~
|
- Default value :: ~"on"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"on"~
|
- ~"on"~
|
||||||
@ -404,8 +320,8 @@ The same variable as above is also available for GTK3.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b
|
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_brand-5b25776b
|
||||||
:END:
|
:END:
|
||||||
With this variables, it is possible to show or hide the brand of a CPU in the
|
With this variables, it is possible to show or hide the brand of a CPU in
|
||||||
~cpu~ output.
|
the ~cpu~ output.
|
||||||
- Default value :: ~"on"~
|
- Default value :: ~"on"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"on"~
|
- ~"on"~
|
||||||
@ -439,9 +355,7 @@ With this variable, it is possible to show or hide the speed of the CPU.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f
|
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_type-a24de48f
|
||||||
:END:
|
:END:
|
||||||
This allows Neofetch to know what type of speed it has to fetch regarding the
|
This allows Neofetch to know what type of speed it has to fetch regarding the machine’s CPU. Any file in ~/sys/devices/system/cpu/cpu0/cpufreq~ can be used as a value.
|
||||||
machine’s CPU. Any file in ~/sys/devices/system/cpu/cpu0/cpufreq~ can be used as
|
|
||||||
a value.
|
|
||||||
- Default value :: ~"bios_limit"~
|
- Default value :: ~"bios_limit"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"scaling_cur_freq"~
|
- ~"scaling_cur_freq"~
|
||||||
@ -458,8 +372,7 @@ a value.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08
|
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_speed_shorthand-0d15fe08
|
||||||
:END:
|
:END:
|
||||||
This value allows to show sorter CPU speed with less digits. This flag is not
|
This value allows to show sorter CPU speed with less digits. This flag is not supported in systems with CPU speed below 1GHz.
|
||||||
supported in systems with CPU speed below 1GHz.
|
|
||||||
- Default value :: ~"off"~
|
- Default value :: ~"off"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"on"~
|
- ~"on"~
|
||||||
@ -476,8 +389,7 @@ supported in systems with CPU speed below 1GHz.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354
|
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_cores-30177354
|
||||||
:END:
|
:END:
|
||||||
With this variable, it is possible to display the number of cores that are
|
With this variable, it is possible to display the number of cores that are available in the CPU.
|
||||||
available in the CPU.
|
|
||||||
- Default value :: ~"logical"~
|
- Default value :: ~"logical"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"logical"~
|
- ~"logical"~
|
||||||
@ -497,10 +409,7 @@ available in the CPU.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c
|
:CUSTOM_ID: Information_settings-Hardware-CPU-CPU_temperature-a22e522c
|
||||||
:END:
|
:END:
|
||||||
This variable allows the user to hide or show the CPU’s temperature, and if
|
This variable allows the user to hide or show the CPU’s temperature, and if shown, the user can display it in Celcius or Farenheit degrees. For FreeBSD and NetBSD-based systems, you’ll need to enable the ~coretemp~ kernel module. This only supports newer Intel processors.
|
||||||
shown, the user can display it in Celcius or Farenheit degrees. For FreeBSD and
|
|
||||||
NetBSD-based systems, you’ll need to enable the ~coretemp~ kernel module. This
|
|
||||||
only supports newer Intel processors.
|
|
||||||
- Default value :: ~"off"~
|
- Default value :: ~"off"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"C"~
|
- ~"C"~
|
||||||
@ -520,15 +429,13 @@ only supports newer Intel processors.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-GPU-2c842575
|
:CUSTOM_ID: Information_settings-Hardware-GPU-2c842575
|
||||||
:END:
|
:END:
|
||||||
The function responsible for displaying information regarding the GPUs is ~gpu~.
|
The function responsible for displaying information regarding the GPUs is ~gpu~. It will try to list all available GPUs and display what it knows about them.
|
||||||
It will try to list all available GPUs and display what it knows about them.
|
|
||||||
|
|
||||||
**** GPU brand
|
**** GPU brand
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615
|
:CUSTOM_ID: Information_settings-Hardware-GPU-GPU_brand-6e2da615
|
||||||
:END:
|
:END:
|
||||||
This value allows the user to hide or show the brand of their GPU in the output
|
This value allows the user to hide or show the brand of their GPU in the output of ~gpu~.
|
||||||
of ~gpu~.
|
|
||||||
- Default value :: ~"on"~
|
- Default value :: ~"on"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"on"~
|
- ~"on"~
|
||||||
@ -546,8 +453,7 @@ of ~gpu~.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac
|
:CUSTOM_ID: Information_settings-Hardware-GPU-Which_GPU_to_display-f40d3aac
|
||||||
:END:
|
:END:
|
||||||
This allows the user to choose which GPU appears in the output of the function
|
This allows the user to choose which GPU appears in the output of the function ~gpu~.
|
||||||
~gpu~.
|
|
||||||
- Default value :: ~"all"~
|
- Default value :: ~"all"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"all"~
|
- ~"all"~
|
||||||
@ -571,8 +477,7 @@ This allows the user to choose which GPU appears in the output of the function
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865
|
:CUSTOM_ID: Information_settings-Hardware-Resolution-b768f865
|
||||||
:END:
|
:END:
|
||||||
This will try to list all the connected screens and display their resolution
|
This will try to list all the connected screens and display their resolution individually. It is possible to display the refresh rate or to hide it.
|
||||||
individually. It is possible to display the refresh rate or to hide it.
|
|
||||||
- Default value :: ~"off"~
|
- Default value :: ~"off"~
|
||||||
- Values ::
|
- Values ::
|
||||||
- ~"on"~
|
- ~"on"~
|
@ -149,7 +149,7 @@ 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
|
config file in order to modify which terminal or text editor I use, not that I
|
||||||
do it often though.
|
do it often though.
|
||||||
#+BEGIN_SRC lua
|
#+BEGIN_SRC lua
|
||||||
terminal = "kitty"
|
terminal = "st"
|
||||||
editor = os.getenv("EDITOR") or "emacsclient -c"
|
editor = os.getenv("EDITOR") or "emacsclient -c"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -343,6 +343,14 @@ We need some variables in order to correctly set our tablet. First, let’s get
|
|||||||
declare what the name of our tablet is, and what the name of its touchpad is.
|
declare what the name of our tablet is, and what the name of its touchpad is.
|
||||||
#+BEGIN_SRC fish
|
#+BEGIN_SRC fish
|
||||||
set -g DEVICE "Wacom Co.,Ltd. Bamboo Pad, USB stylus"
|
set -g DEVICE "Wacom Co.,Ltd. Bamboo Pad, USB stylus"
|
||||||
|
set -g DEVICETOUCH "Wacom USB Bamboo PAD Finger touch"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
We will also modify two settings: the speed of the cursor on the touchpad, and
|
||||||
|
the scroll speed. Let’s declare the name of these two settings.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
set -g WACOMPROPTOUCHSPEED "Device Accel Velocity Scaling"
|
||||||
|
set -g WACOMPROPSCROLLPSEED "ScrollDistance"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
To get the correct values for the area it can cover, we’ll need to reset our
|
To get the correct values for the area it can cover, we’ll need to reset our
|
||||||
@ -365,42 +373,47 @@ Now we can get the X and Y areas.
|
|||||||
This function will allow us to select the screen on which the tablet will be
|
This function will allow us to select the screen on which the tablet will be
|
||||||
active. We can also select the option “desktop” so that all screens are
|
active. We can also select the option “desktop” so that all screens are
|
||||||
selected. Let’s declare our function.
|
selected. Let’s declare our function.
|
||||||
#+BEGIN_SRC fish :noweb yes
|
#+BEGIN_SRC fish
|
||||||
function set_screen
|
function set_screen
|
||||||
<<wacom-connected-displays>>
|
|
||||||
<<wacom-get-screen>>
|
|
||||||
<<wacom-get-position>>
|
|
||||||
<<wacom-get-dimensions>>
|
|
||||||
end
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
First, let’s set what screens are available, including the desktop option.
|
First, let’s set what screens are available, including the desktop option.
|
||||||
#+NAME: wacom-connected-displays
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
|
||||||
set CONNECTED_DISPLAYS (xrandr -q --current | \
|
set CONNECTED_DISPLAYS (xrandr -q --current | \
|
||||||
sed -n 's/^\([^ ]\+\) connected .*/\1/p') desktop
|
sed -n 's/^\([^ ]\+\) connected .*/\1/p') desktop
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Now, let’s select the one we wish to use using rofi.
|
Now, let’s select the one we wish to use using rofi.
|
||||||
#+NAME: wacom-get-screen
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
|
||||||
set -g SCREEN (for d in $CONNECTED_DISPLAYS
|
set -g SCREEN (for d in $CONNECTED_DISPLAYS
|
||||||
echo $d
|
echo $d
|
||||||
end | rofi -dmenu -i -p "Select your dispaly" | tr -d '\n')
|
end | rofi -dmenu -i -p "Select your dispaly" | tr -d '\n')
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Now, let’s get the position of the screen:
|
Now, let’s get the resolution of our selected screen.
|
||||||
#+NAME: wacom-get-position
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
set -l LINE (xrandr -q --current | if [ "$SCREEN" = "desktop" ]
|
||||||
set -g POSITION (xrandr -q --current | sed -nr "s/^$SCREEN connected (primary )*([0-9x\+]+).*/\2/p")
|
sed -n 's/^Screen 0:.*, current \([0-9]\+\) x \([0-9]\+\),.*/\1 \2/p'
|
||||||
|
else
|
||||||
|
sed -n "s/^$SCREEN"' connected \(primary \)\{0,1\}\([0-9]\+\)x\([0-9]\+\)+.*/\2 \3/p'
|
||||||
|
end)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
We’ll also get the width and the height of the screen so we can set correctly
|
From that, let’s get the vertical and horizontal resolution of our screen.
|
||||||
the drawing area of the tablet.
|
#+BEGIN_SRC fish
|
||||||
#+NAME: wacom-get-dimensions
|
echo $LINE | read -g WIDTH HEIGHT
|
||||||
#+BEGIN_SRC fish :tangle no
|
#+END_SRC
|
||||||
set -g HEIGHT (echo $POSITION | sed -nr 's/[0-9]+x([0-9]+).*/\1/p')
|
|
||||||
set -g WIDTH (echo $POSITION | sed -nr 's/([0-9]+)x.*/\1/p')
|
If any of our ~WIDTH~ ou ~HEIGHT~ it empty, we’ll have to abort the script.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
if test -z $WIDTH || test -z $HEIGHT
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Let’s close our function now.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Adjust the tablet
|
*** Adjust the tablet
|
||||||
@ -409,30 +422,23 @@ the drawing area of the tablet.
|
|||||||
:END:
|
:END:
|
||||||
This function will take care of adjusting our tablet to our screen. Let’s
|
This function will take care of adjusting our tablet to our screen. Let’s
|
||||||
declare our function.
|
declare our function.
|
||||||
#+BEGIN_SRC fish :noweb yes
|
#+BEGIN_SRC fish
|
||||||
function adjust_device
|
function adjust_device
|
||||||
<<wacom-set-ratio-area>>
|
|
||||||
<<wacom-set-new-area>>
|
|
||||||
<<wacom-set-device-area-and-screen>>
|
|
||||||
end
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
If our screen is too high or too wide for our tablet, we will have to adjust the
|
If our screen is too high or too wide for our tablet, we will have to adjust the
|
||||||
height or width of the area used by the tablet. So let’s get the theoretical new
|
height or width of the area used by the tablet. So let’s get the theoretical new
|
||||||
height and width of the area.
|
height and width of the area.
|
||||||
#+NAME: wacom-set-ratio-area
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
set RATIOAREAY (math ceil \($AREAX \* $HEIGHT \/ $WIDTH\))
|
||||||
set RATIOAREAY (math ceil "($AREAX * $HEIGHT / $WIDTH)")
|
set RATIOAREAX (math ceil \($AREAY \* $WIDTH \/ $HEIGHT\))
|
||||||
set RATIOAREAX (math ceil "($AREAY * $WIDTH / $HEIGHT)")
|
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Now, if the current height of the tablet’s area is greater than the theoretical
|
Now, if the current height of the tablet’s area is greater than the theoretical
|
||||||
new area, it means the current area is too high. Otherwise, it should be the
|
new area, it means the current area is too high. Otherwise, it should be the
|
||||||
other way around. Let’s set =NEWAREAX= and =NEWAREAY= that will be used to set
|
other way around. Let’s set =NEWAREAX= and =NEWAREAY= that will be used to set
|
||||||
the new area for the tablet.
|
the new area for the tablet.
|
||||||
#+NAME: wacom-set-new-area
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
|
||||||
if test $AREAY -gt $RATIOAREAY
|
if test $AREAY -gt $RATIOAREAY
|
||||||
set -g NEWAREAX $AREAX
|
set -g NEWAREAX $AREAX
|
||||||
set -g NEWAREAY $RATIOAREAY
|
set -g NEWAREAY $RATIOAREAY
|
||||||
@ -443,10 +449,24 @@ the new area for the tablet.
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Alright, now let’s set the new area with these new variables.
|
Alright, now let’s set the new area with these new variables.
|
||||||
#+NAME: wacom-set-device-area-and-screen
|
#+BEGIN_SRC fish
|
||||||
#+BEGIN_SRC fish :tangle no
|
|
||||||
xsetwacom set "$DEVICE" Area 0 0 $NEWAREAX $NEWAREAY
|
xsetwacom set "$DEVICE" Area 0 0 $NEWAREAX $NEWAREAY
|
||||||
xsetwacom set "$DEVICE" MapToOutput "$POSITION"
|
xsetwacom set "$DEVICE" MapToOutput "$SCREEN"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Let’s slow down the cursor’s speed on the touchpad.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
xinput set-float-prop $DEVICETOUCH $WACOMPROPTOUCHSPEED 0.5
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Let’s also slow down the scroll speed of the touchpad.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
xsetwacom set $DEVICETOUCH $WACOMPROPSCROLLPSEED "90"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Now, let’s close the function.
|
||||||
|
#+BEGIN_SRC fish
|
||||||
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Lauch the functions
|
*** Lauch the functions
|
||||||
@ -460,6 +480,19 @@ sequencially.
|
|||||||
adjust_device
|
adjust_device
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** TODO Fix this script :noexport:
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: cli-utilities-Wacom-setup-Fix-this-script-76ddec7c
|
||||||
|
:END:
|
||||||
|
When running this script, I get the following error:
|
||||||
|
#+BEGIN_SRC text
|
||||||
|
Unable to find an output 'HDMI1'.
|
||||||
|
unable to find device Wacom USB Bamboo PAD Finger touch
|
||||||
|
Cannot find device 'Wacom USB Bamboo PAD Finger touch'.
|
||||||
|
#+END_SRC
|
||||||
|
The first one is caused by ~xsetwacom~. The second one, I do not know where I
|
||||||
|
should find ~Wacom USB Bamboo PAD Finger touch~.
|
||||||
|
|
||||||
* Emacs stuff
|
* Emacs stuff
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Emacs-stuff-8e76efd4
|
:CUSTOM_ID: Emacs-stuff-8e76efd4
|
||||||
|
@ -4968,9 +4968,9 @@ First here are some common properties that will be reused in faces below:
|
|||||||
| / | | < | <l> | |
|
| / | | < | <l> | |
|
||||||
| Name | inherit | font | height | weight |
|
| Name | inherit | font | height | weight |
|
||||||
|---------+---------+---------------+--------+--------|
|
|---------+---------+---------------+--------+--------|
|
||||||
| orgfont | | DejaVu Serif | 110 | |
|
| orgfont | | Charis SIL | 120 | |
|
||||||
| head | default | | | bold |
|
| head | default | | | bold |
|
||||||
| fixed | | Cascadia Code | | |
|
| fixed | | Cascadia Code | 0.8 | |
|
||||||
|
|
||||||
#+tblname: org-faces
|
#+tblname: org-faces
|
||||||
| / | < | | | | <l> | | | |
|
| / | < | | | | <l> | | | |
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB |
@ -252,8 +252,20 @@ configuration [[file:picom.org][here]].
|
|||||||
:HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code
|
:HEADER-ARGS: :mkdirp yes :tangle ~/.Xresources :exports code
|
||||||
:CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1
|
:CUSTOM_ID: Features-Graphical_tweaks-Xresources-8b622de1
|
||||||
:END:
|
:END:
|
||||||
The main body in my Xresources declaration is the declaration of my color theme.
|
My Xresources file is very short. Indeed, it only contains two lines which are
|
||||||
It is based on the [[https://www.nordtheme.com/][Nord]] theme, from their [[https://github.com/arcticicestudio/nord-xresources/][Git repository]].
|
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
|
||||||
|
|
||||||
|
I can also set the transparency of st (my terminal emulator) like so:
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
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]].
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
#define nord0 #2E3440
|
#define nord0 #2E3440
|
||||||
#define nord1 #3B4252
|
#define nord1 #3B4252
|
||||||
|
@ -253,20 +253,20 @@ Let’s set in a custom varible what packages we’ll be needing.
|
|||||||
fzf gcc-libs gdb gimp gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts \
|
fzf gcc-libs gdb gimp gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts \
|
||||||
gnuplot go go-tools golangci-lint-bin graphviz htop hugo i3lock-color \
|
gnuplot go go-tools golangci-lint-bin graphviz htop hugo i3lock-color \
|
||||||
inetutils isync inter-font javascript-typescript-langserver js-beautify \
|
inetutils isync inter-font javascript-typescript-langserver js-beautify \
|
||||||
jfsutils jmtpfs kitty lain-git libxft-bgra linux-headers lldb logrotate ly \
|
jfsutils jmtpfs lain-git libxft-bgra linux-headers lldb logrotate ly meson \
|
||||||
meson minted man-db man-pages mpc mpd mpd-rich-presence-discord-git mpv \
|
minted man-db man-pages mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools \
|
||||||
mupdf-tools nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \
|
nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \
|
||||||
network-manager-applet networkmanager networkmanager-openvpn \
|
network-manager-applet networkmanager networkmanager-openvpn \
|
||||||
nm-connection-editor nodejs-vmd nomacs nordic-theme-git nordvpn-bin \
|
nm-connection-editor nodejs-vmd nomacs nordic-theme-git nordvpn-bin \
|
||||||
noto-fonts-emoji npm ntfs-3g numlockx obs-studio openssh otf-fandol \
|
noto-fonts-emoji npm ntfs-3g numlockx obs-studio openssh otf-fandol \
|
||||||
otf-ipafont p7zip pacman-contrib pandoc-bin pass pavucontrol pdfpc picom-git \
|
otf-ipafont p7zip pacman-contrib pandoc-bin pass pavucontrol pdfpc \
|
||||||
powerline-fonts prettier pulseaudio-bluetooth python-autoflake python-epc \
|
picom-git powerline-fonts prettier pulseaudio-bluetooth python-autoflake \
|
||||||
python-importmagic python-language-server python-nose python-pip python-poetry \
|
python-epc python-importmagic python-language-server python-nose python-pip \
|
||||||
python-ptvsd python-pytest qt5-imageformats qemu r raw-thumbnailer reflector \
|
python-poetry python-ptvsd python-pytest qt5-imageformats qemu r \
|
||||||
ripgrep rofi rsync rtv ruby-rb-fsevent ruby-sass rustup samba scrot sent \
|
raw-thumbnailer reflector ripgrep rofi rsync rtv ruby-rb-fsevent ruby-sass \
|
||||||
shadow siji-git simplescreenrecorder sshfs sxiv texlive-bin \
|
rustup samba scrot sent shadow siji-git simplescreenrecorder sshfs \
|
||||||
texlive-langchinese texlive-langcyrillic texlive-langgreek \
|
st-luke-git sxiv texlive-bin texlive-langchinese texlive-langcyrillic \
|
||||||
texlive-langjapanese texlive-langkorean texlive-latexextra \
|
texlive-langgreek texlive-langjapanese texlive-langkorean texlive-latexextra \
|
||||||
texlive-localmanager-git texlive-most tldr tmux tree ttf-arphic-uming \
|
texlive-localmanager-git texlive-most tldr tmux tree ttf-arphic-uming \
|
||||||
ttf-baekmuk ttf-charis-sil ttf-dejavu ttf-google-fonts-opinionated-git \
|
ttf-baekmuk ttf-charis-sil ttf-dejavu ttf-google-fonts-opinionated-git \
|
||||||
ttf-hanazono ttf-joypixels ttf-koruri ttf-liberation ttf-monapo ttf-sazanami \
|
ttf-hanazono ttf-joypixels ttf-koruri ttf-liberation ttf-monapo ttf-sazanami \
|
||||||
|
Loading…
Reference in New Issue
Block a user