Moved org files to single directory, Polybar config now in org file

This commit is contained in:
Lucien Cartier-Tilet 2020-01-16 19:48:14 +01:00
parent 70c11cc00a
commit edc7d3b970
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
28 changed files with 5353 additions and 4671 deletions

View File

@ -31,6 +31,18 @@ set -gx ANDROID_HOME $HOME/Android/Sdk
set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH
set -g theme_nerd_fonts_support yes
set -g theme_title_display_process yes
set -g theme_display_hostname ssh
set -g theme_display_sudo_user yes
set -g theme_show_exit_status yes
set -g theme_git_worktree_support yes
abbr df 'df -H' abbr df 'df -H'
abbr diskspace 'sudo df -h | grep -E "sd|lv|Size"' abbr diskspace 'sudo df -h | grep -E "sd|lv|Size"'

View File

@ -1,541 +0,0 @@
; -*- mode: conf-windows -*-
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
background = ${xrdb:color1:#50000000}
background-alt = ${xrdb:color2:#444}
foreground = ${xrdb:color7:#dfdfdf}
foreground-alt = ${xrdb:color6:#555}
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[bar/bottom]
monitor= ${env:MONITOR}
bottom = true
width = 100%
height = 22
radius = 0.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 2
padding-right = 4
locale=ja_JP.UTF-8
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=8
font-1 = unifont:fontformat=truetype:size=6:antialias=false
font-2 = "Siji:pixelsize=8"
font-3 = "IPAMincho:style=regular:pixelsize=8"
modules-left = powermenu mpd
modules-center =
modules-right = filesystem wlan eth volume backlight-acpi cpu memory temperature custom-battery
tray-position = right
tray-padding = 0
tray-detached = false
tray-maxsize = 15
tray-background = ${colors.background}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[bar/top]
monitor= ${env:MONITOR}
bottom = false
width = 100%
height = 22
radius = 10.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 5
border-color = #00000000
padding-left = 2
padding-right = 4
locale=ja_JP.UTF-8
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=8
font-1 = unifont:fontformat=truetype:size=6:antialias=false
font-2 = "Siji:pixelsize=8"
font-3 = "IPAMincho:style=regular:pixelsize=8"
modules-left = i3
modules-center = xwindow
modules-right = date
tray-position = none
tray-padding = 0
tray-detached = false
tray-maxsize = 15
tray-background = ${colors.background}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/custom-battery]
type = custom/script
exec = polybar-ab -polybar -thr 10
tail = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/xwindow]
type = internal/xwindow
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
format-underline = ${colors.secondary}
format-padding = 1
label = %title%
label-maxlen = 70
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format = <label-layout> <label-indicator>
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-prefix-underline = ${colors.secondary}
format-underline = ${colors.secondary}
format-padding = 1
label-layout = %layout% %number%
label-layout-padding = 1
label-layout-underline = ${colors.secondary}
label-indicator = %name%
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/filesystem]
type = internal/fs
interval = 20
mount-0 = /
mount-1 = /home
format-mounted = <label-mounted>
label-mounted-underline = ${colors.secondary}
format-unmounted = <label-unmounted>
label-mounted =  %mountpoint%: %used%/%total% (%percentage_used%%)
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
label-mounted-foreground = ${colors.foreground}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/i3]
type = internal/i3
index-sort = true
enable-scroll = false
wrapping-scroll = false
strip-wsnumbers = false
pin-workspaces = true
fuzzy-match = true
label-focused = %icon%
label-focused-background = ${colors.background-alt}
label-focused-underline = ${xrdb:color8:#ffff00}
label-focused-padding = 2
label-unfocused = %icon%
label-unfocused-padding = 2
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
label-urgent = %icon%
label-urgent-background = ${xrdb:color0:#bd2c40}
label-urgent-padding = 2
ws-icon-0 = 1;一
ws-icon-1 = 2;二
ws-icon-2 = 3;三
ws-icon-3 = 4;四
ws-icon-4 = 5;五
ws-icon-5 = 6;六
ws-icon-6 = 7;七
ws-icon-7 = 8;八
ws-icon-8 = 9;九
ws-icon-9 = 0;十
ws-icon-default = %index%
format = <label-state> <label-mode>
label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.background-alt}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/mpd]
type = internal/mpd
label-song =  %title% - %artist%
label-song-maxlen = 50
label-song-ellipsis = true
label-offline =  mpd is offline
format-online = <icon-prev> <toggle> <icon-next> <label-song>
format-offline = <label-offline>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/cpu]
type = internal/cpu
interval = 2
format = <label> <ramp-coreload>
format-prefix = " "
format-underline = #f90000
label = %percentage%%
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/memory]
type = internal/memory
interval = 2
format = <label>
format-prefix = " "
format-underline = #4bffdc
label = %gb_used%
ramp-used-0 = ▁
ramp-used-1 = ▂
ramp-used-2 = ▃
ramp-used-3 = ▄
ramp-used-4 = ▅
ramp-used-5 = ▆
ramp-used-6 = ▇
ramp-used-7 = █
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/wlan]
type = internal/network
{% if YADM_HOSTNAME == 'Gampo' -%}
interface = wlp3s0
{% else -%}
interface = wlp8s0
{% endif -%}
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected = wifi-none
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/eth]
type = internal/network
{% if YADM_HOSTNAME == 'Gampo' -%}
interface = enp0s25
{% else -%}
interface = enp9s0
{% endif -%}
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
label-connected = %local_ip%
format-disconnected =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/date]
type = internal/date
interval = 1
date = %Y-%m-%d
date-alt = %A %d, %B
time = %H:%M:%S
time-alt = %H:%M:%S
format-prefix = 
format-underline = #0a6cf5
label = %date% %time%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/volume]
type = internal/alsa
format-volume = <label-volume>
format-volume-prefix = " "
format-volume-underline = #55aa55
label-volume = %percentage%%
format-muted-prefix = " "
label-muted = muted
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/xbacklight]
type = internal/xbacklight
format = <label>
label = %percentage%%
format-prefix = " "
format-underline = #9f78e1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/battery]
type = internal/battery
battery = BAT0
adapter = ACAD
full-at = 95
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-underline = ${self.format-charging-underline}
; 0-10
ramp-capacity-0 = 
ramp-capacity-0-foreground = #f44336
; 11-20
ramp-capacity-1 = 
ramp-capacity-1-foreground = #ff9800
; 21-30
ramp-capacity-2 = 
ramp-capacity-2-foreground = #ffc107
; 31-40
ramp-capacity-3 = 
; 41-50
ramp-capacity-4 = 
; 51-60
ramp-capacity-5 = 
; 61-70
ramp-capacity-6 = 
; 71-80
ramp-capacity-7 = 
; 81-90
ramp-capacity-8 = 
; 91-100
ramp-capacity-9 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-5 = 
animation-charging-6 = 
animation-charging-7 = 
animation-charging-8 = 
animation-charging-9 = 
animation-charging-framerate = 100
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = poweroff
menu-0-1-exec = menu-open-2
menu-0-2 = suspend
menu-0-2-exec = menu-open-3
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = reboot
menu-2-0 = poweroff
menu-2-0-exec = poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
menu-3-0 = suspend
menu-3-0-exec = "systemctl suspend"
menu-3-1 = cancel
menu-3-1-exec = menu-open-0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/pkg]
type = custom/script
interval = 1200
format = <label>
format-underline = #dc322f
label = "%output:0:30%"
exec = .config/polybar/pkg.sh
exec-if = "ping -q -w 3 -c 1 176.34.135.167 > /dev/null"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/mpv]
type = custom/script
exec = sh ~/.config/polybar/mpv.sh
exec-if = pgrep -x mpv
interval = 1
format = <label>
label = %output%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/bluetooth]
type = custom/script
interval = 5
exec = ~/.config/polybar/bluetooth.sh
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[settings]
screenchange-reload = true
; compositing-background = xor
; compositing-background = over
; compositing-foreground = xor
; compositing-foreground = source
; compositing-border = over
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View File

@ -70,8 +70,8 @@ bluez-utils bookworm boost bzip2 ccls chicken chromium clisp compton cppcheck \
cppreference cppreference-devhelp cpupower cronie cryptsetup device-mapper \ cppreference cppreference-devhelp cpupower cronie cryptsetup device-mapper \
diffutils discord-canary discount ditaa dmenu dmenu-lpass docker \ diffutils discord-canary discount ditaa dmenu dmenu-lpass docker \
docker-compose dockerfile-language-server-bin doxygen dunst dwarffortress \ docker-compose dockerfile-language-server-bin doxygen dunst dwarffortress \
emacs exfat-utils farbfeld feh ffmpegthumbnailer findutils firefox flake8 \ emacs exfat-utils farbfeld feh ffmpegthumbnailer findutils firefox \
font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \ flake8 font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \
gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \ gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \
golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \ golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \
inetutils j4-dmenu-desktop javascript-typescript-langserver js-beautify \ inetutils j4-dmenu-desktop javascript-typescript-langserver js-beautify \

View File

@ -1,2 +0,0 @@
#!/usr/bin/env fish
/usr/bin/yadm $argv; polybar-launch 2>/dev/null >/dev/null

32
.nanorc
View File

@ -1,30 +1,30 @@
set atblanks
set autoindent
set backup set backup
set backupdir /home/phundrak/.cache/nano/backups/ set backupdir /home/phundrak/.cache/nano/backups/
set boldtext set unix
unset casesensitive
set constantshow
set linenumbers
set regexp
set smarthome set smarthome
unset casesensitive
set regexp
set boldtext
set softwrap set softwrap
set tabsize 2 set atblanks
set linenumbers
set constantshow
set tabstospaces set tabstospaces
set tabsize 2
set autoindent
set trimblanks set trimblanks
set unix
include ~/.config/nanorc/*.nanorc include ~/.config/nanorc/*.nanorc

View File

@ -1,7 +1,4 @@
;; -*- mode: emacs-lisp; lexical-binding: t -*- ;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/init () (defun dotspacemacs/init ()
"Initialization: "Initialization:
This function is called at the very beginning of Spacemacs startup, This function is called at the very beginning of Spacemacs startup,
@ -25,7 +22,6 @@ It should only modify the values of Spacemacs settings."
nil nil t nil nil t
"-q" "--batch" "--eval" "(require 'ob-tangle)" "-q" "--batch" "--eval" "(require 'ob-tangle)"
"--eval" (format "(org-babel-tangle-file \"%s\")" phundrak/src))) "--eval" (format "(org-babel-tangle-file \"%s\")" phundrak/src)))
(load-file phundrak/si)) (load-file phundrak/si))
(defun dotspacemacs/layers () (defun dotspacemacs/layers ()
@ -47,7 +43,6 @@ This function is called immediately after `dotspacemacs/init', before layer
configuration. configuration.
It is mostly for variables that should be set before packages are loaded. It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first." If you are unsure, try setting them in `dotspacemacs/user-config' first."
(load-file phundrak/ui)) (load-file phundrak/ui))
(defun dotspacemacs/user-load () (defun dotspacemacs/user-load ()
@ -63,8 +58,6 @@ This function is called at the very end of Spacemacs startup, after layer
configuration. configuration.
Put your configuration code here, except for variables that should be set Put your configuration code here, except for variables that should be set
before packages are loaded." before packages are loaded."
;; load file exported from `~/spacemacs.org' in `dotspacemacs/user-load'
(load-file phundrak/uc)) (load-file phundrak/uc))

View File

@ -1,435 +0,0 @@
#+TITLE: Phundraks dotfiles
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the dotfiles of Phundrak" />
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#presentation][Presentation]]
- [[#screenshots][Screenshots]]
- [[#features][Features]]
- [[#custom-scripts-in-path][Custom scripts in =PATH=]]
- [[#emacs-configuration][Emacs configuration]]
- [[#email-signature][Email signature]]
- [[#fish-configuration-with-useful-abbreviations][Fish configuration with useful abbreviations]]
- [[#global-gitignore][Global gitignore]]
- [[#i3-configuration][i3 configuration]]
- [[#nano][Nano]]
- [[#configuration][Configuration]]
- [[#included-configuration-file][Included configuration file]]
- [[#rustfmt][Rustfmt]]
- [[#tmux-configuration][Tmux configuration]]
- [[#xresources][Xresources]]
- [[#dependencies][Dependencies]]
- [[#installation][Installation]]
- [[#licence][Licence]]
* Presentation
:PROPERTIES:
:CUSTOM_ID: h-536e69f5-c012-4b7d-8a45-3a340d3bc7ee
:END:
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
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.
As you can see, I personally use [[https://fishshell.com/][fish]] as my shell of choice, and [[https://www.gnu.org/software/emacs/][Emacs]] using
[[http://spacemacs.org][Spacemacs]] (still with Emacs keybinding) as my main text editor.
I also use [[https://github.com/resloved/i3][Resloved]]s [[https://github.com/resloved/i3][fork]] of [[https://github.com/Airblader/i3][i3-gaps]] with two [[https://github.com/jaagr/polybar][polybar]] bars and [[https://github.com/tryone144][Tryone144]]s
[[https://github.com/tryone144/compton][fork]] of [[https://github.com/chjj/compton][Compton]]. The colors scheme for [[https://github.com/davatorium/rofi][rofi]], Emacs and polybar are chosen from
the wallpapers using [[https://github.com/dylanaraps/pywal][pywal]].
* Screenshots
:PROPERTIES:
:CUSTOM_ID: h-ee37502b-09a4-4668-88e2-1d4406252bd2
:END:
#+ATTR_HTML: :width 100%
#+CAPTION: Desktop with Neofetch in the terminal
[[./img/neofetch.png]]
#+CAPTION: Desktop with Emacs opened
#+ATTR_HTML: :width 100%
[[./img/emacs.png]]
#+CAPTION: Desktop with Rofi
#+ATTR_HTML: :width 100%
[[./img/rofi.png]]
* Features
:PROPERTIES:
:CUSTOM_ID: h-8539dd6f-4fcb-4dc7-a3ef-b8ad198c91d4
: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.
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.
** Custom scripts in =PATH=
:PROPERTIES:
:CUSTOM_ID: h-d582e107-fa66-4f79-869e-2b49116ed1ec
: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
[[file:.local/bin/README.org][.local/bin]] 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.
** Emacs configuration
:PROPERTIES:
:CUSTOM_ID: h-f6d2561f-5c02-4540-8287-4acf3037b3d5
:END:
Emacs is my main text editor, which I use for almost everything. Because, you
know…
#+begin_quote
Emacs is a great operating system, it just lacks a good text editor.
#+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:spacemacs.org][spacemacs.org]] file.
** Email signature
:PROPERTIES:
:CUSTOM_ID: h-f6c48286-a320-493f-b330-ee0a697e6d79
:HEADER-ARGS: :tangle ~/.signature
:END:
This file gets inserted automatically at the end of my emails.
#+BEGIN_SRC text
Lucien “Phundrak” Cartier-Tilet
https://phundrak.com (Français)
https://en.phundrak.com (English)
Pensez à notre planète, avez-vous vraiment besoin dimprimer ce courriel ?
Please mind our planet, do you really need to print this email?
#+END_SRC
** Fish configuration with useful abbreviations
:PROPERTIES:
:CUSTOM_ID: h-f35ed9a3-c9fc-458c-8a62-693f679f6992
:END:
You can also find in [[file:.config/fish/README.org][.config/fish]] my Fish shell configuration, which contains
my usual abbreviations.
** Global gitignore
:PROPERTIES:
:CUSTOM_ID: h-4f92eb29-7cfa-48ec-b39d-39037ace3682
:HEADER-ARGS: :tangle ~/.gitignore_global
:END:
Sometimes, there are some lines that always reappear in gitignores. So,
instead of always adding them, let git now that some elements are to be
ignored by default, hence the [[file:.gitignore_global][~/.gitignore_global]] file. First, we dont want
nanos backup files.
#+BEGIN_SRC text
~*
#+END_SRC
And output binaries generated by =gcc= and the likes arent welcome either.
#+BEGIN_SRC text
,*.out
#+END_SRC
** i3 configuration
:PROPERTIES:
:CUSTOM_ID: h-c918e370-d867-412c-8b0e-078e4e3772e0
:END:
The i3 configuration is detailed in its corresponding README which you can
find at [[file:.config/i3/README.org][.config/i3/README.org]].
** Nano
:PROPERTIES:
:CUSTOM_ID: h-1724166b-55b7-4a64-9ff1-47c2a9e76f46
:HEADER-ARGS: :tangle ~/.nanorc
:END:
Although it is a very simple piece of software, nano does offer some
customization. Here is mine.
*** Configuration
:PROPERTIES:
:CUSTOM_ID: h-76aa0ff6-9e6a-4a35-974f-9132b08c8eb4
:END:
When soft line wrapping is enabled, make it wrap lines at blank characters
(tabs and spaces) instead of always at the edge of the screen.
#+BEGIN_SRC conf
set atblanks
#+END_SRC
Automatically indent a newly created line to the same number of tabs and/or
spaces as the previous line (or as the next line if the previous line is the
beginning of a paragraph).
#+BEGIN_SRC conf
set autoindent
#+END_SRC
When saving a file, create a backup file by adding a tilde (=~=) to the
file's name. And make and keep not just one backup file, but make and keep a
uniquely numbered one every time a file is saved — when backups are enabled
with =set backup= or =--backup= or =-B=. The uniquely numbered files are
stored in the directory =~/.cache/nano/backups/=.
#+BEGIN_SRC conf
set backup
set backupdir /home/phundrak/.cache/nano/backups/
#+END_SRC
Use bold instead of reverse video for the title bar, status bar, key combos,
function tags, line numbers, and selected text. This can be overridden by
setting the options =titlecolor=, =statuscolor=, =keycolor=,
=functioncolor=, =numbercolor=, and =selectedcolor=.
#+BEGIN_SRC conf
set boldtext
#+END_SRC
Do case-unsensitive searches by default.
#+BEGIN_SRC conf
unset casesensitive
#+END_SRC
Constantly display the cursor position in the status bar. This overrides the
option =quickblank=.
#+BEGIN_SRC conf
set constantshow
#+END_SRC
Display line numbers to the left of the text area.
#+BEGIN_SRC conf
set linenumbers
#+END_SRC
Do regular-expression searches by default. Regular expressions in =nano= are
of the extended type (ERE).
#+BEGIN_SRC conf
set regexp
#+END_SRC
Make the Home key smarter. When Home is pressed anywhere but at the very
beginning of non-whitespace characters on a line, the cursor will jump to
that beginning (either forwards or backwards). If the cursor is already at
that position, it will jump to the true beginning of the line.
#+BEGIN_SRC conf
set smarthome
#+END_SRC
Enable soft line wrapping for easier viewing of very long lines.
#+BEGIN_SRC conf
set softwrap
#+END_SRC
Use a tab size of a certain amount of columns. The value of number must be
greater than 0. The default value is 8.
#+BEGIN_SRC conf
set tabsize 2
#+END_SRC
Convert typed tabs to spaces. Sue me.
#+BEGIN_SRC conf
set tabstospaces
#+END_SRC
Remove trailing whitespace from wrapped lines when automatic hard-wrapping
occurs or when text is justified.
#+BEGIN_SRC conf
set trimblanks
#+END_SRC
Save a file by default in Unix format. This overrides nano's default
behavior of saving a file in the format that it had. (This option has no
effect when you also use =set noconvert=.)
#+BEGIN_SRC conf
set unix
#+END_SRC
*** Included configuration file
:PROPERTIES:
:CUSTOM_ID: h-491cba80-5fa9-4b75-a9cb-2865ec39440a
:END:
Nano gives the opportunity to include some files located elsewhere. This is
why I added [[https://github.com/scopatz/nanorc][this repo]] as a submodule of my dotfiles so I can access a lot of
them at the same time. Since the submodule is cloned in =~/.config/nanorc=,
we can add only one line to include all of the =.nanorc= files.
#+BEGIN_SRC conf
include ~/.config/nanorc/*.nanorc
#+END_SRC
** Rustfmt
:PROPERTIES:
:CUSTOM_ID: h-0ae9005c-76a6-49f6-947c-0c8464616e10
:HEADER-ARGS: :tangle ~/.rustfmt.toml
:END:
In my [[file:.rustfmt.toml][.rustfmt.toml]], you can find some custom rules on how my Rust code
should be formatted.
First, we are using the 2018 edition of Rust.
#+BEGIN_SRC toml
edition = "2018"
#+END_SRC
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.
#+BEGIN_SRC toml
enum_discrim_align_threshold = 20
#+END_SRC
Put single-expression functions on a single line.
#+BEGIN_SRC toml
fn_single_line = true
#+END_SRC
Format code snippet included in doc comments.
#+BEGIN_SRC toml
format_code_in_doc_comments = true
#+END_SRC
Format string literals where necessary.
#+BEGIN_SRC toml
format_strings = true
#+END_SRC
Use tab characters for indentation, spaces for alignment.
#+BEGIN_SRC toml
hard_tabs = true
#+END_SRC
Maximum width of each line
#+BEGIN_SRC toml
max_width = 80
#+END_SRC
Merge multiple imports into a single nested import.
#+BEGIN_SRC toml
merge_imports = true
#+END_SRC
My newline style will always be Unix.
#+BEGIN_SRC toml
newline_style = Unix
#+END_SRC
Convert =/* */= comments to =//= comments where possible.
#+BEGIN_SRC toml
normalize_comments = true
#+END_SRC
Convert =#![doc]= and =#[doc]= attributes to =//!= and =///= doc comments.
#+BEGIN_SRC toml
normalize_doc_attributes = true
#+END_SRC
Reorder impl items. =type= and =const= are put first, then macros and
methods.
#+BEGIN_SRC toml
reorder_impl_items = true
#+END_SRC
Report =FIXME= items in comments.
#+BEGIN_SRC toml
report_fixme = "Always"
#+END_SRC
Report =TODO= items in comments.
#+BEGIN_SRC toml
todo = "Always"
#+END_SRC
The maximum diff of width between struct fields to be aligned with each
other.
#+BEGIN_SRC toml
struct_field_align_threshold = 20
#+END_SRC
Number of spaces per tab.
#+BEGIN_SRC toml
tab_spaces = 2
#+END_SRC
Break comments to fit on the line.
#+BEGIN_SRC toml
wrap_comments = true
#+END_SRC
** Tmux configuration
:PROPERTIES:
:CUSTOM_ID: h-4f48b912-b67b-4549-a671-802e76221f46
: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]].
** Xresources
:PROPERTIES:
:CUSTOM_ID: h-e6f48975-3b86-4a75-a7e5-5cc9edbd9869
:HEADER-ARGS: :tangle ~/.Xresources :exports code
:END:
My Xresources file is very short. Indeed, it only contains two lines which
are dedicated to my =st= terminal to set its font and shell. The font is set
as follows.
#+BEGIN_SRC conf
st.font: Source Code Pro for Powerline:style=book
#+END_SRC
And I will set my shell like this:
#+BEGIN_SRC conf
st.shell: /usr/bin/fish
#+END_SRC
I used to have lines dedicated to UXTerm and URxvt, but I cast them out of my
system.
* Dependencies
:PROPERTIES:
:CUSTOM_ID: h-5849dbcf-a650-4323-9a90-bec549a7b982
: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://resloved.info/][Resloved]]s [[https://github.com/resloved/i3][i3-gaps-rounded]] fork of [[https://github.com/Airblader/i3][Airblader]]s [[https://github.com/Airblader/i3][i3-gaps]], itself a fork of [[https://i3wm.org/][i3]]
- [[https://github.com/yshui/compton][Compton]], more specificaly [[https://github.com/tryone144/compton][Tryone]]s [[https://github.com/tryone144/compton][fork]]
- [[https://github.com/dylanaraps/pywal/][pywal]]
- [[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: h-bfb2e09b-d5d7-4d6f-8b29-763c49b3fd09
:END:
For an installation walkthrough of my Arch Linux installation, check out my
[[file:installation.org][installation.org]] file where I walk you through the first manual steps and
through the bootstrap you can execute to automatically take care of a lot of
elements.
* Licence
:PROPERTIES:
:CUSTOM_ID: h-a3438126-ee60-4f11-a2f6-f52e49dade59
:END:
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3
Licence. Please consult [[file:LICENCE.md]] for more information. In short: you
are free to access, edit and redistribute all of my dotfiles under the same
licence and as allowed by the licence, and if you fuck up something, its your
own responsibility.

1
README.org Symbolic link
View File

@ -0,0 +1 @@
/home/phundrak/org/config-website/index.org

1
img Symbolic link
View File

@ -0,0 +1 @@
/home/phundrak/org/config-website/img

View File

@ -1,725 +0,0 @@
#+TITLE: Install a Phundrak-flavored Arch Linux
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak-flavored Arch Linux" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak-flavored Arch Linux" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="How to install a Phundrak-flavored Arch Linux" />
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#introduction][Introduction]]
- [[#install-arch-linux][Install Arch Linux]]
- [[#get-the-latest-live-system-with-fast-mirrors][Get the latest live system with fast mirrors]]
- [[#install-the-system][Install the system]]
- [[#install-basic-packages][Install basic packages]]
- [[#execute-bootstrap][Execute bootstrap]]
- [[#decrypt-private-yadm-files][Decrypt private yadm files]]
- [[#get-a-correct-keyboard-layout][Get a correct keyboard layout]]
- [[#set-our-locale][Set our locale]]
- [[#create-some-folders][Create some folders]]
- [[#set-users-shell-to-fish][Set users shell to fish]]
- [[#install-yay-if-it-isnt-already-installed][Install =yay= if it isnt already installed]]
- [[#install-basic-packages-1][Install basic packages]]
- [[#setting-up-emacs-installing-spacemacs][Setting up Emacs: Installing Spacemacs]]
- [[#set-up-dotfiles][Set up dotfiles]]
- [[#update-our-dotfiles-remotes][Update our dotfiles remotes]]
- [[#get-envtpl][Get =envtpl=]]
- [[#update-our-submodules][Update our submodules]]
- [[#generate-our-alt-files][Generate our alt files]]
- [[#installing-tryones-compton-fork][Installing Tryones Compton fork]]
- [[#enable-some-of-our-services][Enable some of our services]]
- [[#docker][Docker]]
- [[#emacs][Emacs]]
- [[#ssh-server][SSH server]]
- [[#ly][Ly]]
- [[#acpilight][Acpilight]]
- [[#nordvpn][NordVPN]]
- [[#symlink-some-system-config-files][Symlink some system config files]]
- [[#set-up-our-fish-shell][Set up our fish shell]]
- [[#install-fisher][Install =fisher=]]
- [[#install-our-extensions][Install our extensions]]
- [[#install-packages-from-git][Install packages from git]]
- [[#i3-gaps-rounded][i3-gaps rounded]]
- [[#polybar-battery][Polybar Battery]]
- [[#revealjs][Reveal.JS]]
- [[#install-rust][Install Rust]]
- [[#install-the-toolchains][Install the toolchains]]
- [[#install-some-utilities][Install some utilities]]
- [[#install-some-python-packages][Install some python packages]]
- [[#install-go-packages][Install go packages]]
- [[#set-up-chicken-scheme-interpretercompiler][Set up Chicken (Scheme interpreter/compiler)]]
- [[#clean-the-pacman-and-yay-cache][Clean the =pacman= and =yay= cache]]
* Introduction
:PROPERTIES:
:CUSTOM_ID: h-12a4ef6d-13b6-4d1f-9e0f-a060b63b12d4
:END:
Here will be presented what I do to get my system up and running on a fresh
Arch Linux install. These installation instructions were written in order to
get an Arch Linux distribution up and running with the same configuration as
my main computers and my travelling laptops configuration.
* Install Arch Linux
:PROPERTIES:
:CUSTOM_ID: h-cfe21de6-15fa-477a-a5ff-6cd81dfead19
:END:
I usually install Arch from the [[https://www.archlinux.org/download/][vanilla ISO]], however I began using [[https://github.com/MatMoul/archfi][archfi]] to
install easily the distro (Ive done it so many times, I know how it works
now). Usually, my distros will be installed on at least two partitions, one
dedicated to =/home=, the other to the root partition =/=.
If the computer supports EFI bootloaders, the EFI partition will be mounted on
=/boot=. I generally use rEFInd 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.
The swap partition is always at least 4GB large, and I should have a total of
12GB of combined RAM and swap. This means on my main computer I have 16GB of
RAM and 4GB of swap, but on my thinkpad I have 4GB of RAM and 8GB of swap.
** Get the latest live system with fast mirrors
:PROPERTIES:
:CUSTOM_ID: h-da7951ee-e39a-4a59-a05d-7b7fffdc7825
:END:
When you boot into the live ISO, execute the following command:
#+BEGIN_SRC sh :exports code
pacman -Sy reflector
reflector -c France -c Germany -l 200 -p http -p https --sort rate \
--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.
** Install the system
:PROPERTIES:
:CUSTOM_ID: h-9f9e1fe5-4726-486b-9875-5fcfd91d0bb0
:END:
Then you can use a custom script to ease your installation of Arch if you do
not wish to do it manually. Personally, Ive done it several times already, I
know how the distro works, I just want to be able to install my distro
quickly now.
#+BEGIN_SRC sh :exports code
wget archfi.sf.net/archfi
# Or from matmoul.github.io/archfi if SourceForge is down
sh archfi
#+END_SRC
Then, follow the instructions and install Arch Linux. Take the opportunity to
install as many packages as you need, mainly =yay= 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.
* Install basic packages
:PROPERTIES:
:CUSTOM_ID: h-d2485595-3014-4151-a76c-63bc353359a8
:END:
We will need some basic packages in order to run the bootstrap file. So, lets
install =fish= (our shell running the script) and =git=.
#+BEGIN_SRC sh :exports code
sudo pacman -Sy fish git yadm
#+END_SRC
* Execute bootstrap
:PROPERTIES:
:CUSTOM_ID: h-c13d132f-9e69-4bb0-838b-29c7c5611f11
:HEADER-ARGS: :tangle ~/.config/yadm/bootstrap :exports code
:END:
=yadm= comes with a very handy feature: its bootstrap script. We can execute
it by running the following command:
#+BEGIN_SRC fish :tangle no
yadm bootstrap
#+END_SRC
Notice these two header files, we can see this is a fish script, hence why we
need fish (which is my daily shell anyway).
#+BEGIN_SRC fish
#!/usr/bin/fish
# -*- mode: fish -*-
#+END_SRC
Lets take a look at what it does.
** Decrypt private yadm files
:PROPERTIES:
:CUSTOM_ID: h-2ce7e756-3dab-4c12-a3b3-d1b6f8d4805d
:END:
Some private files are stored encrypted in the repository of my yadm
dotfiles. I will need them later on during the bootstrap execution.
#+BEGIN_SRC fish
yadm decrypt
#+END_SRC
** Get a correct keyboard layout
:PROPERTIES:
:CUSTOM_ID: h-89fb8f3a-6ec4-4701-a5d9-3e593c47ece9
:END:
I use mainly the [[https://bepo.fr/wiki/Accueil][bépo]] layout, a French keyboard layout inspired by Dvorak
layouts, however I sometimes need to switch back to the standard French
AZERTY or the American QWERTY layout, so I make it so the Menu key switches
for me my layout between these three. This makes it so my xorg configuration
of my keyboard looks like this:
#+BEGIN_SRC fish
set keyboardconf \
'Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr,fr,us"
Option "XkbModel" "pc104"
Option "XkbVariant" "bepo,,"
Option "XkbOptions" "grp:menu_toggle"
EndSection'
#+END_SRC
So, lets set it as our keyboard configuration.
#+BEGIN_SRC fish
printf "\n# Set keyboard layout #########################################################\n\n"
echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
#+END_SRC
** Set our locale
:PROPERTIES:
:CUSTOM_ID: h-48678405-93ae-41b6-b44b-285ab0da4e92
:END:
I use two main locales, the French and US UTF-8 locales, and I like to keep
the Japanese locale activated just in case.
#+BEGIN_SRC fish
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
#+END_SRC
Lets enable these.
#+BEGIN_SRC fish
printf "\n# Set our locale ##############################################################\n\n"
for item in $mylocales
if test (grep -e "#$item" /etc/locale.gen)
sudo sed -i "/$item/s/^#//g" /etc/locale.gen
end
end
#+END_SRC
This is my configuration I usually use when it comes to my locale.
#+BEGIN_SRC fish
set localeconf "LANG=en_US.UTF-8
LC_COLLATE=C
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8"
#+END_SRC
Lets set it as our systems locale.
#+BEGIN_SRC fish
echo $localeconf | sudo tee /etc/locale.conf
#+END_SRC
Now we can generate our locale!
#+BEGIN_SRC fish
printf "\n# Generate locale #############################################################\n\n"
sudo locale-gen
#+END_SRC
** Create some folders
:PROPERTIES:
:CUSTOM_ID: h-85ce90ff-56dc-469b-bf08-480ecf27acc4
:END:
Lets 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}
sudo chown $USER:(id -g $USER) /mnt/{USB,CD,Android}
#+END_SRC
We also need the following folder for our nano backups.
#+BEGIN_SRC fish
mkdir -p $HOME/.cache/nano/backups
#+END_SRC
** Set users shell to fish
:PROPERTIES:
:CUSTOM_ID: h-c1a78394-c156-4a03-ae82-e5e9d4090dab
:END:
First of all, the bootstrap shell will set the users shell to fish.
#+BEGIN_SRC fish
printf "\n# Set fish as the default shell ###############################################\n\n"
chsh -s /usr/bin/fish
#+END_SRC
** Install =yay= if it isnt already installed
:PROPERTIES:
:CUSTOM_ID: h-fef57cea-cf1d-4900-9d90-ec6353ea9661
:END:
Now well need to be sure =yay=, our AUR helper, is installed on our system.
If it is, we dont need to to anything. However, if it isnt, well install
it manually.
#+BEGIN_SRC fish
if ! test (which yay)
printf "\n# Installing yay ##############################################################\n\n"
cd
mkdir -p fromGIT
cd fromGIT
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
else
printf "\n# yay already installed #######################################################\n\n"
end
#+END_SRC
** Install basic packages
:PROPERTIES:
:CUSTOM_ID: h-887ec6d4-535d-4363-a0a7-884717b87a47
:END:
Lets set in a custom varible what packages well be needing.
#+BEGIN_SRC fish
set PACKAGES \
acpilight adobe-source-han-sans-jp-fonts asar ascii aspell-en aspell-fr assimp \
awesome-terminal-fonts base-devel bat biber bleachbit bluez-firmware \
bluez-utils bookworm boost bzip2 ccls chicken chromium clisp compton cppcheck \
cppreference cppreference-devhelp cpupower cronie cryptsetup device-mapper \
diffutils discord-canary discount ditaa dmenu dmenu-lpass docker \
docker-compose dockerfile-language-server-bin doxygen dunst dwarffortress \
emacs exfat-utils farbfeld feh ffmpegthumbnailer findutils firefox flake8 \
font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \
gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \
golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \
inetutils j4-dmenu-desktop javascript-typescript-langserver js-beautify \
jfsutils jmtpfs lastpass-cli less linux-headers lldb logrotate lvm2 ly-git \
meson minted mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu \
ncmpcpp nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \
networkmanager-openvpn nm-connection-editor nnn nodejs-vmd nomacs nordvpn-bin \
noto-fonts-emoji npm ntfs-3g numlockx openssh otf-fandol otf-ipafont p7zip \
pacman-contrib pandoc-bin pavucontrol pciutils pcurses pdfpc polybar prettier \
pulseaudio-bluetooth python-autoflake python-envtpl-git python-epc \
python-importmagic python-language-server python-nose python-pip python-ptvsd \
python-pytest python-pywal qt5-imageformats qemu r raw-thumbnailer reflector \
rofi rofi-wifi-menu-git rsync rtv rustup s-nail samba scrot sent shadow \
siji-git simplescreenrecorder speedcrunch sshfs st-luke-git swi-prolog \
texlive-bin texlive-langchinese texlive-langcyrillic texlive-langgreek \
texlive-langjapanese texlive-langkorean texlive-latexextra \
texlive-localmanager-git texlive-most tmux tree ttf-arphic-uming ttf-baekmuk \
ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-hanazono \
ttf-joypixels ttf-koruri ttf-liberation ttf-material-design-icons-git \
ttf-monapo ttf-mplus ttf-ms-fonts ttf-sazanami ttf-symbola ttf-tibetan-machine \
ttf-twemoji-color ttf-unifont ttf-vlgothic typescript \
typescript-language-server-bin unicode unicode-emoji unrar usbutils valgrind \
vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \
x11-ssh-askpass xclip xdg-user-dirs-gtk xfsprogs xorg-apps xorg-drivers \
xorg-server xorg-xinit xss-lock xvkbd yaml-language-server-bin yapf
#+END_SRC
These are the minimum I would have in my own installation. You can edit it
however you want. Lets install those.
#+BEGIN_SRC fish
printf "\n# Installing needed packages ##################################################\n\n"
sudo pacman -Syu
yay -S --needed $PACKAGES
#+END_SRC
** Setting up Emacs: Installing Spacemacs
:PROPERTIES:
:CUSTOM_ID: h-bd5a92c4-1a4f-49ea-a447-050a4ff0301c
:END:
Now, the first thing we want to do with Emacs is install its Spacemacs
distribution. Well clone its =develop= branch into =~/.emacs.d=. We need to
do this prior to our dotfiles cloning because of some submodules that are
cloned within our =~/.emacs.d= directory, and git wont let us clone
Spacemacs in an already existing and non-empty directory. To make sure it
isnt one, lets delete any potentially existing =~/.emacs.d= directory:
#+BEGIN_SRC fish
printf "\n# Installing Spacemacs ########################################################\n\n"
rm -rf ~/.emacs.d
#+END_SRC
Now we can clone Spacemacs:
#+BEGIN_SRC fish
git clone --single-branch --branch develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
#+END_SRC
And we can restore what might have been deleted in our =~/.emacs.d/private=
directory:
#+BEGIN_SRC fish
yadm checkout -- ~/.emacs.d/private/
#+END_SRC
** Set up dotfiles
:PROPERTIES:
:CUSTOM_ID: h-cf2c3a24-b08e-4b07-9d51-31f6df781e62
:END:
*** Update our dotfiles remotes
:PROPERTIES:
:CUSTOM_ID: h-18967335-2637-44d6-b407-bb1d2d2718b9
:END:
This line in the bootstrap script will test if the current user is using my
username. If yes, its probably me.
#+BEGIN_SRC fish
if ! test (echo "phundrak" | sed -e "s/^.*$USER//I")
#+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.
#+BEGIN_SRC fish
printf "\n# Update yadms remotes #######################################################\n\n"
yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
yadm remote add github git@github.com:phundrak/dotfiles.git
#+END_SRC
I will also want to decrypt my encrypted files, such as said ssh keys.
#+BEGIN_SRC fish
printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
yadm decrypt
#+END_SRC
Finally, lets close this =if= statement.
#+BEGIN_SRC fish
end
#+END_SRC
*** Get =envtpl=
:PROPERTIES:
:CUSTOM_ID: h-39034878-7864-4a1c-855d-d9882795aac0
:END:
Before we set our dotfiles up, lets make sure =envtpl= is correctly
installed. This package will be needed for generating our alt dotfiles.
#+BEGIN_SRC fish
printf '\n# Install envtpl ##############################################################\n\n'
yay -Syu python-envtpl-git
#+END_SRC
*** Update our submodules
:PROPERTIES:
:CUSTOM_ID: h-ae2f8ccb-a8f3-4699-832c-52cbc8b6d081
:END:
Now we can download the various dependencies of our dotfiles. To do so,
lets run the following command:
#+BEGIN_SRC fish
printf "\n# Getting yadm susbmodules ####################################################\n\n"
yadm submodule update --init --recursive
#+END_SRC
*** Generate our alt files
:PROPERTIES:
:CUSTOM_ID: h-f924c003-a15c-4132-891f-36cd3948a7c1
:END:
Now this should be the last manipulation on our dotfiles: lets create our
alternate files:
#+BEGIN_SRC fish
printf "\n# Generating alt files ########################################################\n\n"
yadm alt
#+END_SRC
** Installing Tryones Compton fork
:PROPERTIES:
:CUSTOM_ID: h-aecf9f01-268c-40cd-8fc3-622c6ce822e4
:END:
For some reason, I found installing directly this fork does not work, and I
need to install it after I installed the regular compton packages.
=compton-tryone-git= will replace =compton= which will be removed.
#+BEGIN_SRC fish
printf "\n# Installing tryones compton fork ############################################\n\n"
yay -S compton-tryone-git
#+END_SRC
** Enable some of our services
:PROPERTIES:
:CUSTOM_ID: h-1044da09-e992-4dcb-90ff-513725e1d450
:END:
We have installed some packages which require some services to run. Lets
enable them.
*** Docker
:PROPERTIES:
:CUSTOM_ID: h-429cb31a-fccb-420f-a5aa-21054c45fb38
:END:
First, lets activate Docker.
#+BEGIN_SRC fish
printf "\n# Enabling and starting Docker ################################################\n\n"
sudo systemctl enable --now docker
#+END_SRC
Now, if we wish it, we can be added to the =docker= group so we wont 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 = ''
sudo usermod -aG docker $USER
end
#+END_SRC
*** Emacs
:PROPERTIES:
:CUSTOM_ID: h-7131fa13-3c6e-4cfc-b8e8-c880de9d380f
:END:
Emacs will run as a user service, which means it wont be launched until we
log in.
#+BEGIN_SRC fish
printf "\n# Enabling Emacs as user service ##############################################\n\n"
systemctl --user enable --now emacs
#+END_SRC
*** SSH server
:PROPERTIES:
:CUSTOM_ID: h-1f355779-f1dc-4c0f-9cf1-14724ce05f4d
:END:
Maybe we want to activate an SSH server on our machine. If so, we can enable
it. Lets ask the question.
#+BEGIN_SRC fish
read --prompt "echo 'Do you want to activate the ssh server? (Y/n): ' " -l sshdserver
if test $sshdserver = 'y' || test $sshdserver = "Y" || test $sshdserver = ''
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
#+END_SRC
*** Ly
:PROPERTIES:
:CUSTOM_ID: h-2785fc5b-cd35-4c99-9f47-3dcbf1a7a870
:END:
Ly is a display manager based on ncurses which I find nice enough for me to
use (I generally dont like using display managers). Lets enable it, and
lets disable tty2 while were at it (Ly uses it to run X).
#+BEGIN_SRC fish
sudo systemctl enable --now ly
sudo systemctl disable getty@tty2
#+END_SRC
*** Acpilight
:PROPERTIES:
:CUSTOM_ID: h-5423e2a7-d2ce-4bc3-9d5d-85677c18181e
:END:
=acpilight= is our utility managing the brightness of our screen. There is
actually no service to enable here, but we must ensure the user is part of
the =video= group so we can modify the brightness of our screen without
using =sudo=.
#+BEGIN_SRC fish
sudo usermod -aG video $USER
#+END_SRC
*** NordVPN
:PROPERTIES:
:CUSTOM_ID: h-49c24a3e-a496-4200-bf64-96e945c203a0
:END:
Thanks to the AUR package ~nordvpn-bin~, I no longer have to manually
maintain my VPN connections manually with OpenVPN. However, it requires a
service that we should activate:
#+BEGIN_SRC fish
sudo systemctl enable --now nordvpnd
#+END_SRC
** Symlink some system config files
:PROPERTIES:
:CUSTOM_ID: h-b14d7d03-da49-4a7b-ba05-1c0848bd8e44
:END:
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
#+BEGIN_SRC fish
for f in (find ~/.etc -type f)
set dest (echo $f | sed -n 's/^.*etc\(.*\)$/\/etc\1/p')
sudo ln -s $f $dest
end
#+END_SRC
We may also want to symlink our [[file:.nanorc][nanorc]] to the =/root= directory for when we
use =nano= as =sudo=.
#+BEGIN_SRC fish
read --prompt "echo 'Symlink .nanorc to roots .nanorc? (Y/n): ' " -l nanoroot
if test $nanoroot = 'y' || test $nanoroot = "Y" || test $nanoroot = ''
printf "\n# Symlinking .nanorc to roots .nanorc ########################################\n\n"
sudo ln -s $HOME/.nanorc /root/.nanorc
end
#+END_SRC
** Set up our fish shell
:PROPERTIES:
:CUSTOM_ID: h-f6f4df67-b0de-40bf-95fb-888d42169088
:END:
*** Install =fisher=
:PROPERTIES:
:CUSTOM_ID: h-d6490ddc-c909-4713-b36a-19c25a79c7ac
:END:
We will be using =fisher= as our extensions manager for Fish. Lets install
it.
#+BEGIN_SRC fish
printf "\n# Installing fisher ###########################################################\n\n"
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
#+END_SRC
*** Install our extensions
:PROPERTIES:
:CUSTOM_ID: h-3d540273-bdfb-4c63-a05f-2374a010dc29
:END:
I generally use the following extensions in my Fish shell.
#+BEGIN_SRC fish
set FISHEXTENSIONS \
edc/bass franciscolourenco/done jethrokuan/fzf jethrokuan/z \
jorgebucaran/fish-getopts laughedelic/pisces matchai/spacefish \
tuvistavie/fish-ssh-agent
#+END_SRC
Lets install these:
#+BEGIN_SRC fish
fisher add $FISHEXTENSIONS
#+END_SRC
** Install packages from git
:PROPERTIES:
:CUSTOM_ID: h-e79da7b2-9286-4b66-812e-453e3b2505c7
:END:
Now, lets install some packages from git directly.
*** i3-gaps rounded
:PROPERTIES:
:CUSTOM_ID: h-10e229f7-9a45-4401-a9c0-3f974482bb9f
:END:
I know we already installed =i3-gaps= from the AUR, why reinstall it? Well,
that is certainly bad practices, but this allowed me to already have the
needed dependencies for building =i3= installed. Now, lets clone it, build
it, and install it. Doing this is probably very bad practices though, be
warned.
#+BEGIN_SRC fish
printf "\n# Install i3-gaps-rounded #####################################################\n\n"
cd ~/fromGIT
git clone https://github.com/resloved/i3.git i3-gaps-rounded
cd i3-gaps-rounded
rm -rf build
autoreconf --force --install
mkdir build && cd build
../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
make -j
sudo make install
#+END_SRC
*** Polybar Battery
:PROPERTIES:
:CUSTOM_ID: h-f228ec52-a7d0-4c16-adfa-75c544fcfa93
:END:
Now lets install =polybar-battery=. This is a binary that Ill use in my [[file:.config/i3/config][i3
config]] to indicate my battery level. It also sends a notification on low
battery and on charging completed.
#+BEGIN_SRC fish
printf "\n# Install polybar-battery #####################################################\n\n"
cd ~/fromGIT
git clone https://github.com/drdeimos/polybar_another_battery.git
cd polybar_another_battery
go get -u github.com/distatus/battery/cmd/battery
make build
#+END_SRC
Now, we have our binary, lets symlink it in our local binary directory,
=~/.local/bin=.
#+BEGIN_SRC fish
ln -s polybar-ab ~/.local/bin/polybar-ab
#+END_SRC
*** Reveal.JS
:PROPERTIES:
:CUSTOM_ID: h-68d1cdb4-1447-420f-ab0c-53ef905e757b
:END:
I sometimes use Reveal.JS to make presentations, and I set its location in
my [[file:.spacemacs][dotspacemacs]] file to be in =~/fromGIT=, so lets clone it there.
#+BEGIN_SRC fish
printf "\n# Install Reveal.JS ###########################################################\n\n"
cd ~/fromGIT
git clone https://github.com/hakimel/reveal.js.git
#+END_SRC
** Install Rust
:PROPERTIES:
:CUSTOM_ID: h-57e8af4c-93f2-4145-9c39-a5f8d1c9f012
:END:
*** Install the toolchains
:PROPERTIES:
:CUSTOM_ID: h-05ee25dc-3885-46ca-afaf-35bfb2e385d4
:END:
When using rust, I bounce between two toolchains, the =stable= toolchain and
the =nightly= toolchain. To install them, I will use =rustup= which has
already been installed.
#+BEGIN_SRC fish
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
rustup default nightly
#+END_SRC
This will both download the nightly toolchain and set it as the default one.
Yup, I like to live dangerously. Now to install the stable toolchain, lets
run this:
#+BEGIN_SRC fish
rustup toolchain install stable
#+END_SRC
*** Install some utilities
:PROPERTIES:
:CUSTOM_ID: h-f94f2e18-623f-4aa5-be99-6a7df6a9cbcd
:END:
Well need some utilities when developing Rust from Emacs, namely =rustfmt=
and =racer=. Lets install them with =cargo=.
#+BEGIN_SRC fish
printf "\n# Add rust utilities ##########################################################\n\n"
cargo install rustfmt racer
#+END_SRC
We will also need some components for development purposes:
#+BEGIN_SRC fish
rustup component add src
rustup component add rls
#+END_SRC
** Install some python packages
:PROPERTIES:
:CUSTOM_ID: h-8155ae1a-0be1-489f-be13-9222f7686fb2
:END:
Some packages will be needed from pip in order to get our Emacs setup
correctly working. Lets install them locally for our user:
#+BEGIN_SRC fish
pip install --user pyls-isort pyls-mypy
#+END_SRC
** Install go packages
:PROPERTIES:
:CUSTOM_ID: h-8c6e2311-eb84-4bf4-8e0b-948f89bc9664
:END:
For go development from Emacs, the Spacemacs go and lsp layers requires some
packages to be installed.
#+BEGIN_SRC fish
go get -v golang.org/x/tools/gopls@latest
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/godoctor/godoctor
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u -v github.com/haya14busa/gopkgs/cmd/gopkgs
go get -u -v github.com/josharian/impl
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
go get -u -v golang.org/x/tools/gopls
#+END_SRC
** Set up Chicken (Scheme interpreter/compiler)
:PROPERTIES:
:CUSTOM_ID: h-10ffb0c0-8028-4e9c-842e-9e7d2c165c5b
:END:
Chicken needs to be set up before being used. First, we need to install its
documentation.
#+BEGIN_SRC fish
chicken-install -s apropos chicken-doc
#+END_SRC
Then, well complete the documentation like so:
#+BEGIN_SRC fish
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
#+END_SRC
** Clean the =pacman= and =yay= cache
:PROPERTIES:
:CUSTOM_ID: h-fa5307ec-065b-4d06-9d47-05ccde0da8ac
:END:
Finally, we are almost done! Lets clean the cache of =pacman= and =yay=.
#+BEGIN_SRC fish
printf "\n# Clean the pacman and yay cache ##############################################\n\n"
yay -Sc --noconfirm
#+END_SRC
You should now run a system pretty close to the one I have on my main
computer and my thinkpad.

View File

@ -1 +0,0 @@
/home/phundrak/.config/fish/README.org

View File

@ -1 +0,0 @@
/home/phundrak/.config/i3/README.org

View File

@ -1 +0,0 @@
/home/phundrak/.local/bin/README.org

View File

@ -1 +0,0 @@
/home/phundrak/README.org

View File

@ -4,6 +4,7 @@
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's i3 config" /> #+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's i3 config" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's i3 config" /> #+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's i3 config" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the i3 config file of Phundrak" /> #+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the i3 config file of Phundrak" />
#+PROPERTY: header-args :exports code
* Table of Contents :TOC_4_gh:noexport: * Table of Contents :TOC_4_gh:noexport:
:PROPERTIES: :PROPERTIES:
@ -14,6 +15,7 @@
- [[#askpass][Askpass]] - [[#askpass][Askpass]]
- [[#backup][Backup]] - [[#backup][Backup]]
- [[#connectwifi][ConnectWifi]] - [[#connectwifi][ConnectWifi]]
- [[#fix-it][fix it]]
- [[#cppnew][Cppnew]] - [[#cppnew][Cppnew]]
- [[#cnew][Cnew]] - [[#cnew][Cnew]]
- [[#dart-language-server][Dart Language Server]] - [[#dart-language-server][Dart Language Server]]
@ -44,7 +46,6 @@
- [[#select-our-screen][Select our screen]] - [[#select-our-screen][Select our screen]]
- [[#adjust-the-tablet][Adjust the tablet]] - [[#adjust-the-tablet][Adjust the tablet]]
- [[#lauch-the-functions][Lauch the functions]] - [[#lauch-the-functions][Lauch the functions]]
- [[#yadm][Yadm]]
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
@ -56,7 +57,7 @@
Please do not forget to run the following before tangling files from this file Please do not forget to run the following before tangling files from this file
to make sure the tangled files will be executables. to make sure the tangled files will be executables.
#+begin_src emacs-lisp :exports code :results silent #+begin_src emacs-lisp :results silent
(defun phundrak/make-tangled-files-executable () (defun phundrak/make-tangled-files-executable ()
(set-file-modes (buffer-file-name) #o755)) (set-file-modes (buffer-file-name) #o755))
(add-hook 'org-babel-post-tangle-hook 'phundrak/make-tangled-files-executable) (add-hook 'org-babel-post-tangle-hook 'phundrak/make-tangled-files-executable)
@ -65,7 +66,7 @@
* 4chandl * 4chandl
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-39e14885-9da7-4cba-b24e-c3b181ef5f6b :CUSTOM_ID: h-39e14885-9da7-4cba-b24e-c3b181ef5f6b
:HEADER-ARGS: :tangle 4chandl :exports code :HEADER-ARGS: :tangle ~/.local/bin/4chandl
:END: :END:
Usage: =4chandl [ URL TO THREAD ]= Usage: =4chandl [ URL TO THREAD ]=
@ -136,13 +137,13 @@
* Askpass * Askpass
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-b2bef089-69e3-4efb-ac2f-a5eb6a3a80e8 :CUSTOM_ID: h-b2bef089-69e3-4efb-ac2f-a5eb6a3a80e8
:HEADER-ARGS: :tangle askpass :exports code :HEADER-ARGS: :tangle ~/.local/bin/askpass
:END: :END:
Askpass is a simple script that invokes =rofi= as a way to get from a GUI the Askpass is a simple script that invokes =rofi= as a way to get from a GUI the
users sudo password. It is inspired by [[https://github.com/ODEX-TOS/tools/blob/master/rofi/askpass][this original tool]], rewritten in fish users sudo password. It is inspired by [[https://github.com/ODEX-TOS/tools/blob/master/rofi/askpass][this original tool]], rewritten in fish
and with [[https://wiki.archlinux.org/index.php/Rofi][rofi]] support instead of [[https://wiki.archlinux.org/index.php/Dmenu][dmenu]]. As you can see, this is a oneliner if and with [[https://wiki.archlinux.org/index.php/Rofi][rofi]] support instead of [[https://wiki.archlinux.org/index.php/Dmenu][dmenu]]. As you can see, this is a oneliner if
we ignore the initial shebang. This executable is pointed at by the we ignore the initial shebang. This executable is pointed at by the
#+BEGIN_SRC fish :exports code #+BEGIN_SRC fish
#!/usr/bin/env fish #!/usr/bin/env fish
rofi -dmenu -font 'DejaVu Sans 10' -password -no-fixed-num-lines \ rofi -dmenu -font 'DejaVu Sans 10' -password -no-fixed-num-lines \
-p (printf $argv[1] | sed s/://) -p (printf $argv[1] | sed s/://)
@ -151,7 +152,7 @@
* Backup * Backup
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-30cb6655-382f-492a-a005-df15512ab7a5 :CUSTOM_ID: h-30cb6655-382f-492a-a005-df15512ab7a5
:HEADER-ARGS: :tangle backup :exports code :HEADER-ARGS: :tangle ~/.local/bin/backup
:END: :END:
=backup= is a very simple, oneliner script that will create a local copy of a =backup= is a very simple, oneliner script that will create a local copy of a
file and add the date at which it was copied in the filename. You can see its file and add the date at which it was copied in the filename. You can see its
@ -163,7 +164,7 @@
* ConnectWifi * ConnectWifi
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :tangle connect-wifi :exports code :HEADER-ARGS: :tangle ~/.local/bin/connect-wifi
:CUSTOM_ID: h-7a958906-1f79-448f-95b3-7226bc80e88c :CUSTOM_ID: h-7a958906-1f79-448f-95b3-7226bc80e88c
:END: :END:
=connect-wifi= is a small utility tool that allows the user to connect to =connect-wifi= is a small utility tool that allows the user to connect to
@ -183,10 +184,15 @@
nmcli c u $SELECTEDWIFI nmcli c u $SELECTEDWIFI
#+END_SRC #+END_SRC
** TODO fix it
:PROPERTIES:
:CUSTOM_ID: h-15c1dbea-fb23-405e-9a73-1039412ebd97
:END:
* Cppnew * Cppnew
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-264945df-fe7a-4f9d-845a-9cc26c196f4b :CUSTOM_ID: h-264945df-fe7a-4f9d-845a-9cc26c196f4b
:HEADER-ARGS: :tangle cppnew :exports code :HEADER-ARGS: :tangle ~/.local/bin/cppnew
:END: :END:
=cppnew= is a small utility that helps you create a new C++ project. Several =cppnew= is a small utility that helps you create a new C++ project. Several
templates are available, the default one using CMake, and three others that templates are available, the default one using CMake, and three others that
@ -218,7 +224,7 @@
* Cnew * Cnew
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-a4ccdc0f-6813-4207-9479-4d68296f5fdb :CUSTOM_ID: h-a4ccdc0f-6813-4207-9479-4d68296f5fdb
:HEADER-ARGS: :tangle cnew :exports code :HEADER-ARGS: :tangle ~/.local/bin/cnew
:END: :END:
=cnew= is a small utility script similar to but simpler than cppnew that =cnew= is a small utility script similar to but simpler than cppnew that
creates a CMake template C project from the template that already exists in creates a CMake template C project from the template that already exists in
@ -285,7 +291,7 @@
* Dart Language Server * Dart Language Server
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-771896e9-ab96-4158-af0b-1fcbef9ab969 :CUSTOM_ID: h-771896e9-ab96-4158-af0b-1fcbef9ab969
:HEADER-ARGS: :tangle dart_language_server :exports code :HEADER-ARGS: :tangle ~/.local/bin/dart_language_server
:END: :END:
Spacemacs' recommendations on how to use Dart with LSP is outdated, since Spacemacs' recommendations on how to use Dart with LSP is outdated, since
[[https://github.com/natebosch/dart_language_server][=dart_language_server=]] is obsolete. As recommended by the repo owner, we [[https://github.com/natebosch/dart_language_server][=dart_language_server=]] is obsolete. As recommended by the repo owner, we
@ -300,7 +306,7 @@
* Dmenu * Dmenu
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-50623ecd-b633-4af7-9cc4-5a032f01d1ee :CUSTOM_ID: h-50623ecd-b633-4af7-9cc4-5a032f01d1ee
:HEADER-ARGS: :tangle dmenu :exports code :HEADER-ARGS: :tangle ~/.local/bin/dmenu
:END: :END:
I wrote this very simple script in order to replace =dmenu= with rofis I wrote this very simple script in order to replace =dmenu= with rofis
emulation of dmenu, since I prefer rofis appearance. It basically calls emulation of dmenu, since I prefer rofis appearance. It basically calls
@ -313,7 +319,7 @@
* Emoji picker * Emoji picker
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-477cd486-c9a6-4d59-bd9d-62d8f08ee62d :CUSTOM_ID: h-477cd486-c9a6-4d59-bd9d-62d8f08ee62d
:HEADER-ARGS: :tangle rofi-emoji :exports code :HEADER-ARGS: :tangle ~/.local/bin/rofi-emoji
:END: :END:
The emoji picker is a simple fish script that uses rofi and The emoji picker is a simple fish script that uses rofi and
[[file:~/.config/emoji.txt][~/.config/emoji.txt]] to provide a small, local search for emojis. Once the [[file:~/.config/emoji.txt][~/.config/emoji.txt]] to provide a small, local search for emojis. Once the
@ -335,7 +341,7 @@
* lsl * lsl
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :tangle lsl :exports code :HEADER-ARGS: :tangle ~/.local/bin/lsl
:CUSTOM_ID: h-6bcdad54-20ce-40cc-8a4b-8d9c20fc5c95 :CUSTOM_ID: h-6bcdad54-20ce-40cc-8a4b-8d9c20fc5c95
:END: :END:
~lsl~ is a former abbreviation I used to use in fish. However, a recent update ~lsl~ is a former abbreviation I used to use in fish. However, a recent update
@ -350,7 +356,7 @@
* Polybar-launch * Polybar-launch
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-68587918-879b-42db-b304-901d01233f95 :CUSTOM_ID: h-68587918-879b-42db-b304-901d01233f95
:HEADER-ARGS: :tangle polybar-launch :exports code :HEADER-ARGS: :tangle ~/.local/bin/polybar-launch
:END: :END:
This scripts allows the user to kill polybar and relaunch it, or to simply This scripts allows the user to kill polybar and relaunch it, or to simply
launch it if polybar isnt launched yet. This script is a bash script, so launch it if polybar isnt launched yet. This script is a bash script, so
@ -391,7 +397,7 @@
* Rofi-mount * Rofi-mount
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :tangle rofi-mount :exports code :HEADER-ARGS: :tangle ~/.local/bin/rofi-mount
:CUSTOM_ID: h-32ee4a66-e7fb-4abf-a168-fa259efdb1f4 :CUSTOM_ID: h-32ee4a66-e7fb-4abf-a168-fa259efdb1f4
:END: :END:
=rofimount= is a script inspired by [[https://github.com/ihebchagra/dotfiles/blob/master/.local/bin/dmount][this one]], based on dmenu, which =rofimount= is a script inspired by [[https://github.com/ihebchagra/dotfiles/blob/master/.local/bin/dmount][this one]], based on dmenu, which
@ -783,7 +789,7 @@
* Rofi-pass * Rofi-pass
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS: :tangle rofi-pass :exports code :HEADER-ARGS: :tangle ~/.local/bin/rofi-pass
:CUSTOM_ID: h-a52876ed-351b-400a-b250-d93aab27e0c8 :CUSTOM_ID: h-a52876ed-351b-400a-b250-d93aab27e0c8
:END: :END:
=rofi-pass= is a simple utility that gets a password stored in the [[https://www.passwordstore.org/][=pass=]] =rofi-pass= is a simple utility that gets a password stored in the [[https://www.passwordstore.org/][=pass=]]
@ -871,7 +877,7 @@
* Rofi-umount * Rofi-umount
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-68a1f671-5dc6-4120-81c8-c94fffa7d7a3 :CUSTOM_ID: h-68a1f671-5dc6-4120-81c8-c94fffa7d7a3
:HEADER-ARGS: :tangle rofi-umount :exports code :HEADER-ARGS: :tangle ~/.local/bin/rofi-umount
:END: :END:
=rofiumount= is the counterpart of =rofimount= for unmounting our mounted =rofiumount= is the counterpart of =rofimount= for unmounting our mounted
partitions. It is a fish script, so lets declare it as that with its shebang. partitions. It is a fish script, so lets declare it as that with its shebang.
@ -1106,7 +1112,7 @@
* Starwars * Starwars
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-127de2b2-d84b-4508-89d2-b4577e8dbece :CUSTOM_ID: h-127de2b2-d84b-4508-89d2-b4577e8dbece
:HEADER-ARGS: :tangle starwars :exports code :HEADER-ARGS: :tangle ~/.local/bin/starwars
:END: :END:
This is a one-liner that allows you to watch Star Wars episode 4 in ASCII art This is a one-liner that allows you to watch Star Wars episode 4 in ASCII art
in your terminal. Here is the code: in your terminal. Here is the code:
@ -1117,10 +1123,9 @@
* UpdateFlutter * UpdateFlutter
:PROPERTIES: :PROPERTIES:
:header-args: :tangle UpdateFlutter :exports code :header-args: :tangle ~/.local/bin/UpdateFlutter
:CUSTOM_ID: h-1005db1f-aecc-4fca-be2d-98fd33c1461a :CUSTOM_ID: h-1005db1f-aecc-4fca-be2d-98fd33c1461a
:END: :END:
This is a simple utility to be ran when the ~flutter~ package is updated. This is a simple utility to be ran when the ~flutter~ package is updated.
#+BEGIN_SRC fish #+BEGIN_SRC fish
#!/usr/bin/fish #!/usr/bin/fish
@ -1133,7 +1138,7 @@
* Wacom setup * Wacom setup
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-e407ceef-2f14-4474-916b-6b687cf9f2e9 :CUSTOM_ID: h-e407ceef-2f14-4474-916b-6b687cf9f2e9
:HEADER-ARGS: :tangle wacom-setup :exports code :HEADER-ARGS: :tangle ~/.local/bin/wacom-setup
:END: :END:
I made a small and quick utility to set up my Wacom tablet so it is only bound I made a small and quick utility to set up my Wacom tablet so it is only bound
to one screen. This is a fish script, so lets insert the sheband. to one screen. This is a fish script, so lets insert the sheband.
@ -1297,17 +1302,3 @@
set_screen set_screen
adjust_device adjust_device
#+END_SRC #+END_SRC
* Yadm
:PROPERTIES:
:CUSTOM_ID: h-9535957b-7559-4244-a5e0-d056c4770fea
:HEADER-ARGS: :tangle yadm :exports code
:END:
For some reason, =yadm= wont stop making polybar crash. So, I created this
script that will wrap yadm with a call to yadm, and then a call to
=polybar-launch= declared in [[#h-68587918-879b-42db-b304-901d01233f95][Polybar-launch]]. This is a oneliner, as you can
see below:
#+BEGIN_SRC fish
#!/usr/bin/env fish
/usr/bin/yadm $argv; polybar-launch 2>/dev/null >/dev/null
#+END_SRC

View File

@ -4,6 +4,8 @@
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's fish config" /> #+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's fish config" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's fish config" /> #+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's fish config" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the fish config file of Phundrak" /> #+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the fish config file of Phundrak" />
#+PROPERTY: header-args:fish :tangle ~/.config/fish/config.fish :exports code
#+PROPERTY: header-args :exports code
* Table of Contents :TOC_4_gh:noexport: * Table of Contents :TOC_4_gh:noexport:
:PROPERTIES: :PROPERTIES:
@ -46,7 +48,6 @@
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-c2560b46-7f97-472f-b898-5ab483832228 :CUSTOM_ID: h-c2560b46-7f97-472f-b898-5ab483832228
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
The file present in =~/.config/fish/config.fish= is the configuration file for 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 the [[https://fishshell.com/][fish shell]]. It contains custom functions, environment variables and
@ -63,7 +64,6 @@
* Fish from within Emacs * Fish from within Emacs
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-97d738f4-1ea0-4f64-a31d-19643486a951 :CUSTOM_ID: h-97d738f4-1ea0-4f64-a31d-19643486a951
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
I sometimes call fish from within emacs, with =M-x ansi-term=. In this case, 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=. the variable =TERM= needs to have the value =eterm-color=.
@ -76,7 +76,6 @@
* Tramp remote access * Tramp remote access
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-6cad2cc9-aef6-4df4-90f9-97053e82072a :CUSTOM_ID: h-6cad2cc9-aef6-4df4-90f9-97053e82072a
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
When accessing from a remote machine our computer from Emacs, tramp needs a 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 precise shell appearance: a simple =$= followed by a space after which to put
@ -97,7 +96,6 @@
* Regular fish shell appearance * Regular fish shell appearance
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-a8434b29-c146-4141-b8f8-1b446c791907 :CUSTOM_ID: h-a8434b29-c146-4141-b8f8-1b446c791907
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
Now, there is only one function I modify when it comes to the appearance of Now, there is only one function I modify when it comes to the appearance of
fish when Im the one using it: I simply “delete” the =fish_greeting= fish when Im the one using it: I simply “delete” the =fish_greeting=
@ -109,7 +107,6 @@
* Global variables * Global variables
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-0eff37da-af9f-4546-8ad3-201961a2200f :CUSTOM_ID: h-0eff37da-af9f-4546-8ad3-201961a2200f
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
Some global variables might sometimes be needed and need to be modified. This Some global variables might sometimes be needed and need to be modified. This
is for example the case with my =PATH= variable in which I add Rusts Cargos is for example the case with my =PATH= variable in which I add Rusts Cargos
@ -154,7 +151,6 @@
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-e9dccb31-8350-459d-b688-b5b7cbeab272 :CUSTOM_ID: h-e9dccb31-8350-459d-b688-b5b7cbeab272
:END: :END:
The theme I use is =bobthefish=. Although its default configuration is quite The theme I use is =bobthefish=. Although its default configuration is quite
alright, it allows some customization. The first thing I want to enable is the alright, it allows some customization. The first thing I want to enable is the
support for =nerd-fonts=: support for =nerd-fonts=:
@ -193,7 +189,6 @@
* Abbreviations * Abbreviations
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-740bd904-3e32-4c09-b0a4-bde16ae2e116 :CUSTOM_ID: h-740bd904-3e32-4c09-b0a4-bde16ae2e116
:HEADER-ARGS: :tangle config.fish :exports code
:END: :END:
** System monitoring ** System monitoring
:PROPERTIES: :PROPERTIES:

View File

@ -5,6 +5,8 @@
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's i3 config" /> #+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's i3 config" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's i3 config" /> #+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's i3 config" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the i3 config file of Phundrak" /> #+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the i3 config file of Phundrak" />
#+PROPERTY: header-args :noweb yes :exports code :tangle ~/.config/i3/config##yadm.j2
#+PROPERTY: header-args:python :exports none :tangle no
* Table of Contents :TOC_4_gh:noexport: * Table of Contents :TOC_4_gh:noexport:
:PROPERTIES: :PROPERTIES:
@ -50,7 +52,6 @@
* Presentation * Presentation
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-2b02cfba-4ada-4f75-b522-bfcb8512119c :CUSTOM_ID: h-2b02cfba-4ada-4f75-b522-bfcb8512119c
:HEADER-ARGS: :tangle config##yadm.j2
:END: :END:
=i3= is a window manager for GNU/Linux which automatically tiles windows in =i3= is a window manager for GNU/Linux which automatically tiles windows in
workspaces. This configuration was ade to automatically handle some tasks such workspaces. This configuration was ade to automatically handle some tasks such
@ -68,8 +69,6 @@
* Variables declaration * Variables declaration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-27f4474a-e037-4e40-b33a-7fe34ca012e3 :CUSTOM_ID: h-27f4474a-e037-4e40-b33a-7fe34ca012e3
:HEADER-ARGS: :exports code :tangle config##yadm.j2
:HEADER-ARGS:python: :exports none :tangle no
:END: :END:
** Global ** Global
:PROPERTIES: :PROPERTIES:
@ -187,7 +186,6 @@
* i3 global settings * i3 global settings
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-d9bc7729-d325-4071-8ad9-043ea5b80430 :CUSTOM_ID: h-d9bc7729-d325-4071-8ad9-043ea5b80430
:HEADER-ARGS: :exports code :tangle config##yadm.j2
:END: :END:
Some settings affect i3 globally, such as its aspect or how it handles the Some settings affect i3 globally, such as its aspect or how it handles the
mouse. Hence, here are some settings I set in my configuration. mouse. Hence, here are some settings I set in my configuration.
@ -291,8 +289,6 @@
* Assigning windows to workspaces * Assigning windows to workspaces
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-21870449-7730-4164-8add-167cb4e75218 :CUSTOM_ID: h-21870449-7730-4164-8add-167cb4e75218
:HEADER-ARGS: :exports code :tangle config##yadm.j2
:HEADER-ARGS:python: :exports none :tangle no
:END: :END:
I decided to bind some windows to some workspaces in order to have a better I decided to bind some windows to some workspaces in order to have a better
organization of my desktop. organization of my desktop.
@ -343,7 +339,6 @@
* Shortcuts * Shortcuts
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-b364743d-2ff0-4548-805e-9a9e6efdaddd :CUSTOM_ID: h-b364743d-2ff0-4548-805e-9a9e6efdaddd
:HEADER-ARGS: :exports code :noweb yes :tangle config##yadm.j2
:END: :END:
I use *A LOT* of shortcuts when it comes to my workflow. Like, all the time. I use *A LOT* of shortcuts when it comes to my workflow. Like, all the time.
So, expect this chapter to be a bit long, and Ill try to make it readable So, expect this chapter to be a bit long, and Ill try to make it readable
@ -893,7 +888,6 @@
* Software autolaunch * Software autolaunch
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-18769c14-2ec0-41a2-9450-dae71714d0f4 :CUSTOM_ID: h-18769c14-2ec0-41a2-9450-dae71714d0f4
:HEADER-ARGS: :exports code :noweb yes :tangle config##yadm.j2
:END: :END:
When i3 is launched, I want it to also launch some software automatically. When i3 is launched, I want it to also launch some software automatically.
Here is what we will launch: Here is what we will launch:

View File

@ -1 +0,0 @@
/home/phundrak/img

View File

Before

Width:  |  Height:  |  Size: 484 KiB

After

Width:  |  Height:  |  Size: 484 KiB

View File

Before

Width:  |  Height:  |  Size: 1011 KiB

After

Width:  |  Height:  |  Size: 1011 KiB

View File

Before

Width:  |  Height:  |  Size: 936 KiB

After

Width:  |  Height:  |  Size: 936 KiB

View File

@ -0,0 +1,326 @@
#+TITLE: Phundraks dotfiles
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the dotfiles of Phundrak" />
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#presentation][Presentation]]
- [[#screenshots][Screenshots]]
- [[#features][Features]]
- [[#custom-scripts-in-path][Custom scripts in =PATH=]]
- [[#emacs-configuration][Emacs configuration]]
- [[#email-signature][Email signature]]
- [[#fish-configuration-with-useful-abbreviations][Fish configuration with useful abbreviations]]
- [[#global-gitignore][Global gitignore]]
- [[#i3-configuration][i3 configuration]]
- [[#nano][Nano]]
- [[#rustfmt][Rustfmt]]
- [[#tmux-configuration][Tmux configuration]]
- [[#xresources][Xresources]]
- [[#dependencies][Dependencies]]
- [[#installation][Installation]]
- [[#licence][Licence]]
* Presentation
:PROPERTIES:
:CUSTOM_ID: h-536e69f5-c012-4b7d-8a45-3a340d3bc7ee
:END:
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
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.
As you can see, I personally use [[https://fishshell.com/][fish]] as my shell of choice, and [[https://www.gnu.org/software/emacs/][Emacs]] using
[[http://spacemacs.org][Spacemacs]] (still with Emacs keybinding) as my main text editor.
I also use [[https://github.com/resloved/i3][Resloved]]s [[https://github.com/resloved/i3][fork]] of [[https://github.com/Airblader/i3][i3-gaps]] with two [[https://github.com/jaagr/polybar][polybar]] bars and [[https://github.com/tryone144][Tryone144]]s
[[https://github.com/tryone144/compton][fork]] of [[https://github.com/chjj/compton][Compton]]. The colors scheme for [[https://github.com/davatorium/rofi][rofi]], Emacs and polybar are chosen from
the wallpapers using [[https://github.com/dylanaraps/pywal][pywal]].
* Screenshots
:PROPERTIES:
:CUSTOM_ID: h-ee37502b-09a4-4668-88e2-1d4406252bd2
:END:
#+ATTR_HTML: :width 100%
#+CAPTION: Desktop with Neofetch in the terminal
[[./img/neofetch.png]]
#+CAPTION: Desktop with Emacs opened
#+ATTR_HTML: :width 100%
[[./img/emacs.png]]
#+CAPTION: Desktop with Rofi
#+ATTR_HTML: :width 100%
[[./img/rofi.png]]
* Features
:PROPERTIES:
:CUSTOM_ID: h-8539dd6f-4fcb-4dc7-a3ef-b8ad198c91d4
: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.
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.
** Custom scripts in =PATH=
:PROPERTIES:
:CUSTOM_ID: h-d582e107-fa66-4f79-869e-2b49116ed1ec
: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
[[file:.local/bin/README.org][.local/bin]] 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.
** Emacs configuration
:PROPERTIES:
:CUSTOM_ID: h-f6d2561f-5c02-4540-8287-4acf3037b3d5
:END:
Emacs is my main text editor, which I use for almost everything. Because, you
know…
#+begin_quote
Emacs is a great operating system, it just lacks a good text editor.
#+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:~/org/config-website/spacemacs.org][spacemacs.org]] file.
** Email signature
:PROPERTIES:
:CUSTOM_ID: h-f6c48286-a320-493f-b330-ee0a697e6d79
:HEADER-ARGS: :tangle ~/.signature
:END:
This file gets inserted automatically at the end of my emails.
#+BEGIN_SRC text
Lucien “Phundrak” Cartier-Tilet
https://phundrak.com (Français)
https://en.phundrak.com (English)
Pensez à notre planète, avez-vous vraiment besoin dimprimer ce courriel ?
Please mind our planet, do you really need to print this email?
#+END_SRC
** Fish configuration with useful abbreviations
:PROPERTIES:
:CUSTOM_ID: h-f35ed9a3-c9fc-458c-8a62-693f679f6992
: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.
** Global gitignore
:PROPERTIES:
:CUSTOM_ID: h-4f92eb29-7cfa-48ec-b39d-39037ace3682
:HEADER-ARGS: :tangle ~/.gitignore_global
:END:
Sometimes, there are some lines that always reappear in gitignores. So,
instead of always adding them, let git now that some elements are to be
ignored by default, hence the [[file:.gitignore_global][~/.gitignore_global]] file. First, we dont want
nanos backup files.
#+BEGIN_SRC text
~*
#+END_SRC
And output binaries generated by =gcc= and the likes arent welcome either.
#+BEGIN_SRC text
,*.out
#+END_SRC
** i3 configuration
:PROPERTIES:
:CUSTOM_ID: h-c918e370-d867-412c-8b0e-078e4e3772e0
:END:
The i3 configuration is detailed in its corresponding README which you can
find at [[file:.config/i3/README.org][.config/i3/README.org]].
** Nano
:PROPERTIES:
:CUSTOM_ID: h-1724166b-55b7-4a64-9ff1-47c2a9e76f46
: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.
** Rustfmt
:PROPERTIES:
:CUSTOM_ID: h-0ae9005c-76a6-49f6-947c-0c8464616e10
:HEADER-ARGS: :tangle ~/.rustfmt.toml
:END:
In my [[file:.rustfmt.toml][.rustfmt.toml]], you can find some custom rules on how my Rust code
should be formatted.
First, we are using the 2018 edition of Rust.
#+BEGIN_SRC toml
edition = "2018"
#+END_SRC
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.
#+BEGIN_SRC toml
enum_discrim_align_threshold = 20
#+END_SRC
Put single-expression functions on a single line.
#+BEGIN_SRC toml
fn_single_line = true
#+END_SRC
Format code snippet included in doc comments.
#+BEGIN_SRC toml
format_code_in_doc_comments = true
#+END_SRC
Format string literals where necessary.
#+BEGIN_SRC toml
format_strings = true
#+END_SRC
Use tab characters for indentation, spaces for alignment.
#+BEGIN_SRC toml
hard_tabs = true
#+END_SRC
Maximum width of each line
#+BEGIN_SRC toml
max_width = 80
#+END_SRC
Merge multiple imports into a single nested import.
#+BEGIN_SRC toml
merge_imports = true
#+END_SRC
My newline style will always be Unix.
#+BEGIN_SRC toml
newline_style = Unix
#+END_SRC
Convert =/* */= comments to =//= comments where possible.
#+BEGIN_SRC toml
normalize_comments = true
#+END_SRC
Convert =#![doc]= and =#[doc]= attributes to =//!= and =///= doc comments.
#+BEGIN_SRC toml
normalize_doc_attributes = true
#+END_SRC
Reorder impl items. =type= and =const= are put first, then macros and
methods.
#+BEGIN_SRC toml
reorder_impl_items = true
#+END_SRC
Report =FIXME= items in comments.
#+BEGIN_SRC toml
report_fixme = "Always"
#+END_SRC
Report =TODO= items in comments.
#+BEGIN_SRC toml
todo = "Always"
#+END_SRC
The maximum diff of width between struct fields to be aligned with each
other.
#+BEGIN_SRC toml
struct_field_align_threshold = 20
#+END_SRC
Number of spaces per tab.
#+BEGIN_SRC toml
tab_spaces = 2
#+END_SRC
Break comments to fit on the line.
#+BEGIN_SRC toml
wrap_comments = true
#+END_SRC
** Tmux configuration
:PROPERTIES:
:CUSTOM_ID: h-4f48b912-b67b-4549-a671-802e76221f46
: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]].
** Xresources
:PROPERTIES:
:CUSTOM_ID: h-e6f48975-3b86-4a75-a7e5-5cc9edbd9869
:HEADER-ARGS: :tangle ~/.Xresources :exports code
:END:
My Xresources file is very short. Indeed, it only contains two lines which
are dedicated to my =st= terminal to set its font and shell. The font is set
as follows.
#+BEGIN_SRC conf
st.font: Source Code Pro for Powerline:style=book
#+END_SRC
And I will set my shell like this:
#+BEGIN_SRC conf
st.shell: /usr/bin/fish
#+END_SRC
I used to have lines dedicated to UXTerm and URxvt, but I cast them out of my
system.
* Dependencies
:PROPERTIES:
:CUSTOM_ID: h-5849dbcf-a650-4323-9a90-bec549a7b982
: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://resloved.info/][Resloved]]s [[https://github.com/resloved/i3][i3-gaps-rounded]] fork of [[https://github.com/Airblader/i3][Airblader]]s [[https://github.com/Airblader/i3][i3-gaps]], itself a fork of [[https://i3wm.org/][i3]]
- [[https://github.com/yshui/compton][Compton]], more specificaly [[https://github.com/tryone144/compton][Tryone]]s [[https://github.com/tryone144/compton][fork]]
- [[https://github.com/dylanaraps/pywal/][pywal]]
- [[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: h-bfb2e09b-d5d7-4d6f-8b29-763c49b3fd09
:END:
For an installation walkthrough of my Arch Linux installation, check out my
[[file:installation.org][installation.org]] file where I walk you through the first manual steps and
through the bootstrap you can execute to automatically take care of a lot of
elements.
* Licence
:PROPERTIES:
:CUSTOM_ID: h-a3438126-ee60-4f11-a2f6-f52e49dade59
:END:
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3
Licence. Please consult [[file:LICENCE.md]] for more information. In short: you
are free to access, edit and redistribute all of my dotfiles under the same
licence and as allowed by the licence, and if you fuck up something, its your
own responsibility.

View File

@ -1 +0,0 @@
/home/phundrak/installation.org

View File

@ -0,0 +1,726 @@
#+TITLE: Install a Phundrak-flavored Arch Linux
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak-flavored Arch Linux" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak-flavored Arch Linux" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="How to install a Phundrak-flavored Arch Linux" />
#+PROPERTY: header-args :exports code
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#introduction][Introduction]]
- [[#install-arch-linux][Install Arch Linux]]
- [[#get-the-latest-live-system-with-fast-mirrors][Get the latest live system with fast mirrors]]
- [[#install-the-system][Install the system]]
- [[#install-basic-packages][Install basic packages]]
- [[#execute-bootstrap][Execute bootstrap]]
- [[#decrypt-private-yadm-files][Decrypt private yadm files]]
- [[#get-a-correct-keyboard-layout][Get a correct keyboard layout]]
- [[#set-our-locale][Set our locale]]
- [[#create-some-folders][Create some folders]]
- [[#set-users-shell-to-fish][Set users shell to fish]]
- [[#install-yay-if-it-isnt-already-installed][Install =yay= if it isnt already installed]]
- [[#install-basic-packages-1][Install basic packages]]
- [[#setting-up-emacs-installing-spacemacs][Setting up Emacs: Installing Spacemacs]]
- [[#set-up-dotfiles][Set up dotfiles]]
- [[#update-our-dotfiles-remotes][Update our dotfiles remotes]]
- [[#get-envtpl][Get =envtpl=]]
- [[#update-our-submodules][Update our submodules]]
- [[#generate-our-alt-files][Generate our alt files]]
- [[#installing-tryones-compton-fork][Installing Tryones Compton fork]]
- [[#enable-some-of-our-services][Enable some of our services]]
- [[#docker][Docker]]
- [[#emacs][Emacs]]
- [[#ssh-server][SSH server]]
- [[#ly][Ly]]
- [[#acpilight][Acpilight]]
- [[#nordvpn][NordVPN]]
- [[#symlink-some-system-config-files][Symlink some system config files]]
- [[#set-up-our-fish-shell][Set up our fish shell]]
- [[#install-fisher][Install =fisher=]]
- [[#install-our-extensions][Install our extensions]]
- [[#install-packages-from-git][Install packages from git]]
- [[#i3-gaps-rounded][i3-gaps rounded]]
- [[#polybar-battery][Polybar Battery]]
- [[#revealjs][Reveal.JS]]
- [[#install-rust][Install Rust]]
- [[#install-the-toolchains][Install the toolchains]]
- [[#install-some-utilities][Install some utilities]]
- [[#install-some-python-packages][Install some python packages]]
- [[#install-go-packages][Install go packages]]
- [[#set-up-chicken-scheme-interpretercompiler][Set up Chicken (Scheme interpreter/compiler)]]
- [[#clean-the-pacman-and-yay-cache][Clean the =pacman= and =yay= cache]]
* Introduction
:PROPERTIES:
:CUSTOM_ID: h-12a4ef6d-13b6-4d1f-9e0f-a060b63b12d4
:END:
Here will be presented what I do to get my system up and running on a fresh
Arch Linux install. These installation instructions were written in order to
get an Arch Linux distribution up and running with the same configuration as
my main computers and my travelling laptops configuration.
* Install Arch Linux
:PROPERTIES:
:CUSTOM_ID: h-cfe21de6-15fa-477a-a5ff-6cd81dfead19
:END:
I usually install Arch from the [[https://www.archlinux.org/download/][vanilla ISO]], however I began using [[https://github.com/MatMoul/archfi][archfi]] to
install easily the distro (Ive done it so many times, I know how it works
now). Usually, my distros will be installed on at least two partitions, one
dedicated to =/home=, the other to the root partition =/=.
If the computer supports EFI bootloaders, the EFI partition will be mounted on
=/boot=. I generally use rEFInd 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.
The swap partition is always at least 4GB large, and I should have a total of
12GB of combined RAM and swap. This means on my main computer I have 16GB of
RAM and 4GB of swap, but on my thinkpad I have 4GB of RAM and 8GB of swap.
** Get the latest live system with fast mirrors
:PROPERTIES:
:CUSTOM_ID: h-da7951ee-e39a-4a59-a05d-7b7fffdc7825
:END:
When you boot into the live ISO, execute the following command:
#+BEGIN_SRC sh
pacman -Sy reflector
reflector -c France -c Germany -l 200 -p http -p https --sort rate \
--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.
** Install the system
:PROPERTIES:
:CUSTOM_ID: h-9f9e1fe5-4726-486b-9875-5fcfd91d0bb0
:END:
Then you can use a custom script to ease your installation of Arch if you do
not wish to do it manually. Personally, Ive done it several times already, I
know how the distro works, I just want to be able to install my distro
quickly now.
#+BEGIN_SRC sh
wget archfi.sf.net/archfi
# Or from matmoul.github.io/archfi if SourceForge is down
sh archfi
#+END_SRC
Then, follow the instructions and install Arch Linux. Take the opportunity to
install as many packages as you need, mainly =yay= 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.
* Install basic packages
:PROPERTIES:
:CUSTOM_ID: h-d2485595-3014-4151-a76c-63bc353359a8
:END:
We will need some basic packages in order to run the bootstrap file. So, lets
install =fish= (our shell running the script) and =git=.
#+BEGIN_SRC sh
sudo pacman -Sy fish git yadm
#+END_SRC
* Execute bootstrap
:PROPERTIES:
:CUSTOM_ID: h-c13d132f-9e69-4bb0-838b-29c7c5611f11
:HEADER-ARGS: :tangle ~/.config/yadm/bootstrap
:END:
=yadm= comes with a very handy feature: its bootstrap script. We can execute
it by running the following command:
#+BEGIN_SRC fish :tangle no
yadm bootstrap
#+END_SRC
Notice these two header files, we can see this is a fish script, hence why we
need fish (which is my daily shell anyway).
#+BEGIN_SRC fish
#!/usr/bin/fish
# -*- mode: fish -*-
#+END_SRC
Lets take a look at what it does.
** Decrypt private yadm files
:PROPERTIES:
:CUSTOM_ID: h-2ce7e756-3dab-4c12-a3b3-d1b6f8d4805d
:END:
Some private files are stored encrypted in the repository of my yadm
dotfiles. I will need them later on during the bootstrap execution.
#+BEGIN_SRC fish
yadm decrypt
#+END_SRC
** Get a correct keyboard layout
:PROPERTIES:
:CUSTOM_ID: h-89fb8f3a-6ec4-4701-a5d9-3e593c47ece9
:END:
I use mainly the [[https://bepo.fr/wiki/Accueil][bépo]] layout, a French keyboard layout inspired by Dvorak
layouts, however I sometimes need to switch back to the standard French
AZERTY or the American QWERTY layout, so I make it so the Menu key switches
for me my layout between these three. This makes it so my xorg configuration
of my keyboard looks like this:
#+BEGIN_SRC fish
set keyboardconf \
'Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr,fr,us"
Option "XkbModel" "pc104"
Option "XkbVariant" "bepo,,"
Option "XkbOptions" "grp:menu_toggle"
EndSection'
#+END_SRC
So, lets set it as our keyboard configuration.
#+BEGIN_SRC fish
printf "\n# Set keyboard layout #########################################################\n\n"
echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
#+END_SRC
** Set our locale
:PROPERTIES:
:CUSTOM_ID: h-48678405-93ae-41b6-b44b-285ab0da4e92
:END:
I use two main locales, the French and US UTF-8 locales, and I like to keep
the Japanese locale activated just in case.
#+BEGIN_SRC fish
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
#+END_SRC
Lets enable these.
#+BEGIN_SRC fish
printf "\n# Set our locale ##############################################################\n\n"
for item in $mylocales
if test (grep -e "#$item" /etc/locale.gen)
sudo sed -i "/$item/s/^#//g" /etc/locale.gen
end
end
#+END_SRC
This is my configuration I usually use when it comes to my locale.
#+BEGIN_SRC fish
set localeconf "LANG=en_US.UTF-8
LC_COLLATE=C
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8"
#+END_SRC
Lets set it as our systems locale.
#+BEGIN_SRC fish
echo $localeconf | sudo tee /etc/locale.conf
#+END_SRC
Now we can generate our locale!
#+BEGIN_SRC fish
printf "\n# Generate locale #############################################################\n\n"
sudo locale-gen
#+END_SRC
** Create some folders
:PROPERTIES:
:CUSTOM_ID: h-85ce90ff-56dc-469b-bf08-480ecf27acc4
:END:
Lets 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}
sudo chown $USER:(id -g $USER) /mnt/{USB,CD,Android}
#+END_SRC
We also need the following folder for our nano backups.
#+BEGIN_SRC fish
mkdir -p $HOME/.cache/nano/backups
#+END_SRC
** Set users shell to fish
:PROPERTIES:
:CUSTOM_ID: h-c1a78394-c156-4a03-ae82-e5e9d4090dab
:END:
First of all, the bootstrap shell will set the users shell to fish.
#+BEGIN_SRC fish
printf "\n# Set fish as the default shell ###############################################\n\n"
chsh -s /usr/bin/fish
#+END_SRC
** Install =yay= if it isnt already installed
:PROPERTIES:
:CUSTOM_ID: h-fef57cea-cf1d-4900-9d90-ec6353ea9661
:END:
Now well need to be sure =yay=, our AUR helper, is installed on our system.
If it is, we dont need to to anything. However, if it isnt, well install
it manually.
#+BEGIN_SRC fish
if ! test (which yay)
printf "\n# Installing yay ##############################################################\n\n"
cd
mkdir -p fromGIT
cd fromGIT
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
else
printf "\n# yay already installed #######################################################\n\n"
end
#+END_SRC
** Install basic packages
:PROPERTIES:
:CUSTOM_ID: h-887ec6d4-535d-4363-a0a7-884717b87a47
:END:
Lets set in a custom varible what packages well be needing.
#+BEGIN_SRC fish
set PACKAGES \
acpilight adobe-source-han-sans-jp-fonts asar ascii aspell-en aspell-fr assimp \
awesome-terminal-fonts base-devel bat biber bleachbit bluez-firmware \
bluez-utils bookworm boost bzip2 ccls chicken chromium clisp compton cppcheck \
cppreference cppreference-devhelp cpupower cronie cryptsetup device-mapper \
diffutils discord-canary discount ditaa dmenu dmenu-lpass docker \
docker-compose dockerfile-language-server-bin doxygen dunst dwarffortress \
emacs exfat-utils farbfeld feh ffmpegthumbnailer findutils firefox \
flake8 font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \
gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \
golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \
inetutils j4-dmenu-desktop javascript-typescript-langserver js-beautify \
jfsutils jmtpfs lastpass-cli less linux-headers lldb logrotate lvm2 ly-git \
meson minted mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu \
ncmpcpp nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \
networkmanager-openvpn nm-connection-editor nnn nodejs-vmd nomacs nordvpn-bin \
noto-fonts-emoji npm ntfs-3g numlockx openssh otf-fandol otf-ipafont p7zip \
pacman-contrib pandoc-bin pavucontrol pciutils pcurses pdfpc polybar prettier \
pulseaudio-bluetooth python-autoflake python-envtpl-git python-epc \
python-importmagic python-language-server python-nose python-pip python-ptvsd \
python-pytest python-pywal qt5-imageformats qemu r raw-thumbnailer reflector \
rofi rofi-wifi-menu-git rsync rtv rustup s-nail samba scrot sent shadow \
siji-git simplescreenrecorder speedcrunch sshfs st-luke-git swi-prolog \
texlive-bin texlive-langchinese texlive-langcyrillic texlive-langgreek \
texlive-langjapanese texlive-langkorean texlive-latexextra \
texlive-localmanager-git texlive-most tmux tree ttf-arphic-uming ttf-baekmuk \
ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-hanazono \
ttf-joypixels ttf-koruri ttf-liberation ttf-material-design-icons-git \
ttf-monapo ttf-mplus ttf-ms-fonts ttf-sazanami ttf-symbola ttf-tibetan-machine \
ttf-twemoji-color ttf-unifont ttf-vlgothic typescript \
typescript-language-server-bin unicode unicode-emoji unrar usbutils valgrind \
vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \
x11-ssh-askpass xclip xdg-user-dirs-gtk xfsprogs xorg-apps xorg-drivers \
xorg-server xorg-xinit xss-lock xvkbd yaml-language-server-bin yapf
#+END_SRC
These are the minimum I would have in my own installation. You can edit it
however you want. Lets install those.
#+BEGIN_SRC fish
printf "\n# Installing needed packages ##################################################\n\n"
sudo pacman -Syu
yay -S --needed $PACKAGES
#+END_SRC
** Setting up Emacs: Installing Spacemacs
:PROPERTIES:
:CUSTOM_ID: h-bd5a92c4-1a4f-49ea-a447-050a4ff0301c
:END:
Now, the first thing we want to do with Emacs is install its Spacemacs
distribution. Well clone its =develop= branch into =~/.emacs.d=. We need to
do this prior to our dotfiles cloning because of some submodules that are
cloned within our =~/.emacs.d= directory, and git wont let us clone
Spacemacs in an already existing and non-empty directory. To make sure it
isnt one, lets delete any potentially existing =~/.emacs.d= directory:
#+BEGIN_SRC fish
printf "\n# Installing Spacemacs ########################################################\n\n"
rm -rf ~/.emacs.d
#+END_SRC
Now we can clone Spacemacs:
#+BEGIN_SRC fish
git clone --single-branch --branch develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
#+END_SRC
And we can restore what might have been deleted in our =~/.emacs.d/private=
directory:
#+BEGIN_SRC fish
yadm checkout -- ~/.emacs.d/private/
#+END_SRC
** Set up dotfiles
:PROPERTIES:
:CUSTOM_ID: h-cf2c3a24-b08e-4b07-9d51-31f6df781e62
:END:
*** Update our dotfiles remotes
:PROPERTIES:
:CUSTOM_ID: h-18967335-2637-44d6-b407-bb1d2d2718b9
:END:
This line in the bootstrap script will test if the current user is using my
username. If yes, its probably me.
#+BEGIN_SRC fish
if ! test (echo "phundrak" | sed -e "s/^.*$USER//I")
#+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.
#+BEGIN_SRC fish
printf "\n# Update yadms remotes #######################################################\n\n"
yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
yadm remote add github git@github.com:phundrak/dotfiles.git
#+END_SRC
I will also want to decrypt my encrypted files, such as said ssh keys.
#+BEGIN_SRC fish
printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
yadm decrypt
#+END_SRC
Finally, lets close this =if= statement.
#+BEGIN_SRC fish
end
#+END_SRC
*** Get =envtpl=
:PROPERTIES:
:CUSTOM_ID: h-39034878-7864-4a1c-855d-d9882795aac0
:END:
Before we set our dotfiles up, lets make sure =envtpl= is correctly
installed. This package will be needed for generating our alt dotfiles.
#+BEGIN_SRC fish
printf '\n# Install envtpl ##############################################################\n\n'
yay -Syu python-envtpl-git
#+END_SRC
*** Update our submodules
:PROPERTIES:
:CUSTOM_ID: h-ae2f8ccb-a8f3-4699-832c-52cbc8b6d081
:END:
Now we can download the various dependencies of our dotfiles. To do so,
lets run the following command:
#+BEGIN_SRC fish
printf "\n# Getting yadm susbmodules ####################################################\n\n"
yadm submodule update --init --recursive
#+END_SRC
*** Generate our alt files
:PROPERTIES:
:CUSTOM_ID: h-f924c003-a15c-4132-891f-36cd3948a7c1
:END:
Now this should be the last manipulation on our dotfiles: lets create our
alternate files:
#+BEGIN_SRC fish
printf "\n# Generating alt files ########################################################\n\n"
yadm alt
#+END_SRC
** Installing Tryones Compton fork
:PROPERTIES:
:CUSTOM_ID: h-aecf9f01-268c-40cd-8fc3-622c6ce822e4
:END:
For some reason, I found installing directly this fork does not work, and I
need to install it after I installed the regular compton packages.
=compton-tryone-git= will replace =compton= which will be removed.
#+BEGIN_SRC fish
printf "\n# Installing tryones compton fork ############################################\n\n"
yay -S compton-tryone-git
#+END_SRC
** Enable some of our services
:PROPERTIES:
:CUSTOM_ID: h-1044da09-e992-4dcb-90ff-513725e1d450
:END:
We have installed some packages which require some services to run. Lets
enable them.
*** Docker
:PROPERTIES:
:CUSTOM_ID: h-429cb31a-fccb-420f-a5aa-21054c45fb38
:END:
First, lets activate Docker.
#+BEGIN_SRC fish
printf "\n# Enabling and starting Docker ################################################\n\n"
sudo systemctl enable --now docker
#+END_SRC
Now, if we wish it, we can be added to the =docker= group so we wont 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 = ''
sudo usermod -aG docker $USER
end
#+END_SRC
*** Emacs
:PROPERTIES:
:CUSTOM_ID: h-7131fa13-3c6e-4cfc-b8e8-c880de9d380f
:END:
Emacs will run as a user service, which means it wont be launched until we
log in.
#+BEGIN_SRC fish
printf "\n# Enabling Emacs as user service ##############################################\n\n"
systemctl --user enable --now emacs
#+END_SRC
*** SSH server
:PROPERTIES:
:CUSTOM_ID: h-1f355779-f1dc-4c0f-9cf1-14724ce05f4d
:END:
Maybe we want to activate an SSH server on our machine. If so, we can enable
it. Lets ask the question.
#+BEGIN_SRC fish
read --prompt "echo 'Do you want to activate the ssh server? (Y/n): ' " -l sshdserver
if test $sshdserver = 'y' || test $sshdserver = "Y" || test $sshdserver = ''
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
#+END_SRC
*** Ly
:PROPERTIES:
:CUSTOM_ID: h-2785fc5b-cd35-4c99-9f47-3dcbf1a7a870
:END:
Ly is a display manager based on ncurses which I find nice enough for me to
use (I generally dont like using display managers). Lets enable it, and
lets disable tty2 while were at it (Ly uses it to run X).
#+BEGIN_SRC fish
sudo systemctl enable --now ly
sudo systemctl disable getty@tty2
#+END_SRC
*** Acpilight
:PROPERTIES:
:CUSTOM_ID: h-5423e2a7-d2ce-4bc3-9d5d-85677c18181e
:END:
=acpilight= is our utility managing the brightness of our screen. There is
actually no service to enable here, but we must ensure the user is part of
the =video= group so we can modify the brightness of our screen without
using =sudo=.
#+BEGIN_SRC fish
sudo usermod -aG video $USER
#+END_SRC
*** NordVPN
:PROPERTIES:
:CUSTOM_ID: h-49c24a3e-a496-4200-bf64-96e945c203a0
:END:
Thanks to the AUR package ~nordvpn-bin~, I no longer have to manually
maintain my VPN connections manually with OpenVPN. However, it requires a
service that we should activate:
#+BEGIN_SRC fish
sudo systemctl enable --now nordvpnd
#+END_SRC
** Symlink some system config files
:PROPERTIES:
:CUSTOM_ID: h-b14d7d03-da49-4a7b-ba05-1c0848bd8e44
:END:
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
#+BEGIN_SRC fish
for f in (find ~/.etc -type f)
set dest (echo $f | sed -n 's/^.*etc\(.*\)$/\/etc\1/p')
sudo ln -s $f $dest
end
#+END_SRC
We may also want to symlink our [[file:.nanorc][nanorc]] to the =/root= directory for when we
use =nano= as =sudo=.
#+BEGIN_SRC fish
read --prompt "echo 'Symlink .nanorc to roots .nanorc? (Y/n): ' " -l nanoroot
if test $nanoroot = 'y' || test $nanoroot = "Y" || test $nanoroot = ''
printf "\n# Symlinking .nanorc to roots .nanorc ########################################\n\n"
sudo ln -s $HOME/.nanorc /root/.nanorc
end
#+END_SRC
** Set up our fish shell
:PROPERTIES:
:CUSTOM_ID: h-f6f4df67-b0de-40bf-95fb-888d42169088
:END:
*** Install =fisher=
:PROPERTIES:
:CUSTOM_ID: h-d6490ddc-c909-4713-b36a-19c25a79c7ac
:END:
We will be using =fisher= as our extensions manager for Fish. Lets install
it.
#+BEGIN_SRC fish
printf "\n# Installing fisher ###########################################################\n\n"
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
#+END_SRC
*** Install our extensions
:PROPERTIES:
:CUSTOM_ID: h-3d540273-bdfb-4c63-a05f-2374a010dc29
:END:
I generally use the following extensions in my Fish shell.
#+BEGIN_SRC fish
set FISHEXTENSIONS \
edc/bass franciscolourenco/done jethrokuan/fzf jethrokuan/z \
jorgebucaran/fish-getopts laughedelic/pisces matchai/spacefish \
tuvistavie/fish-ssh-agent
#+END_SRC
Lets install these:
#+BEGIN_SRC fish
fisher add $FISHEXTENSIONS
#+END_SRC
** Install packages from git
:PROPERTIES:
:CUSTOM_ID: h-e79da7b2-9286-4b66-812e-453e3b2505c7
:END:
Now, lets install some packages from git directly.
*** i3-gaps rounded
:PROPERTIES:
:CUSTOM_ID: h-10e229f7-9a45-4401-a9c0-3f974482bb9f
:END:
I know we already installed =i3-gaps= from the AUR, why reinstall it? Well,
that is certainly bad practices, but this allowed me to already have the
needed dependencies for building =i3= installed. Now, lets clone it, build
it, and install it. Doing this is probably very bad practices though, be
warned.
#+BEGIN_SRC fish
printf "\n# Install i3-gaps-rounded #####################################################\n\n"
cd ~/fromGIT
git clone https://github.com/resloved/i3.git i3-gaps-rounded
cd i3-gaps-rounded
rm -rf build
autoreconf --force --install
mkdir build && cd build
../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
make -j
sudo make install
#+END_SRC
*** Polybar Battery
:PROPERTIES:
:CUSTOM_ID: h-f228ec52-a7d0-4c16-adfa-75c544fcfa93
:END:
Now lets install =polybar-battery=. This is a binary that Ill use in my [[file:.config/i3/config][i3
config]] to indicate my battery level. It also sends a notification on low
battery and on charging completed.
#+BEGIN_SRC fish
printf "\n# Install polybar-battery #####################################################\n\n"
cd ~/fromGIT
git clone https://github.com/drdeimos/polybar_another_battery.git
cd polybar_another_battery
go get -u github.com/distatus/battery/cmd/battery
make build
#+END_SRC
Now, we have our binary, lets symlink it in our local binary directory,
=~/.local/bin=.
#+BEGIN_SRC fish
ln -s polybar-ab ~/.local/bin/polybar-ab
#+END_SRC
*** Reveal.JS
:PROPERTIES:
:CUSTOM_ID: h-68d1cdb4-1447-420f-ab0c-53ef905e757b
:END:
I sometimes use Reveal.JS to make presentations, and I set its location in
my [[file:.spacemacs][dotspacemacs]] file to be in =~/fromGIT=, so lets clone it there.
#+BEGIN_SRC fish
printf "\n# Install Reveal.JS ###########################################################\n\n"
cd ~/fromGIT
git clone https://github.com/hakimel/reveal.js.git
#+END_SRC
** Install Rust
:PROPERTIES:
:CUSTOM_ID: h-57e8af4c-93f2-4145-9c39-a5f8d1c9f012
:END:
*** Install the toolchains
:PROPERTIES:
:CUSTOM_ID: h-05ee25dc-3885-46ca-afaf-35bfb2e385d4
:END:
When using rust, I bounce between two toolchains, the =stable= toolchain and
the =nightly= toolchain. To install them, I will use =rustup= which has
already been installed.
#+BEGIN_SRC fish
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
rustup default nightly
#+END_SRC
This will both download the nightly toolchain and set it as the default one.
Yup, I like to live dangerously. Now to install the stable toolchain, lets
run this:
#+BEGIN_SRC fish
rustup toolchain install stable
#+END_SRC
*** Install some utilities
:PROPERTIES:
:CUSTOM_ID: h-f94f2e18-623f-4aa5-be99-6a7df6a9cbcd
:END:
Well need some utilities when developing Rust from Emacs, namely =rustfmt=
and =racer=. Lets install them with =cargo=.
#+BEGIN_SRC fish
printf "\n# Add rust utilities ##########################################################\n\n"
cargo install rustfmt racer
#+END_SRC
We will also need some components for development purposes:
#+BEGIN_SRC fish
rustup component add src
rustup component add rls
#+END_SRC
** Install some python packages
:PROPERTIES:
:CUSTOM_ID: h-8155ae1a-0be1-489f-be13-9222f7686fb2
:END:
Some packages will be needed from pip in order to get our Emacs setup
correctly working. Lets install them locally for our user:
#+BEGIN_SRC fish
pip install --user pyls-isort pyls-mypy
#+END_SRC
** Install go packages
:PROPERTIES:
:CUSTOM_ID: h-8c6e2311-eb84-4bf4-8e0b-948f89bc9664
:END:
For go development from Emacs, the Spacemacs go and lsp layers requires some
packages to be installed.
#+BEGIN_SRC fish
go get -v golang.org/x/tools/gopls@latest
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/godoctor/godoctor
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u -v github.com/haya14busa/gopkgs/cmd/gopkgs
go get -u -v github.com/josharian/impl
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
go get -u -v golang.org/x/tools/gopls
#+END_SRC
** Set up Chicken (Scheme interpreter/compiler)
:PROPERTIES:
:CUSTOM_ID: h-10ffb0c0-8028-4e9c-842e-9e7d2c165c5b
:END:
Chicken needs to be set up before being used. First, we need to install its
documentation.
#+BEGIN_SRC fish
chicken-install -s apropos chicken-doc
#+END_SRC
Then, well complete the documentation like so:
#+BEGIN_SRC fish
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
#+END_SRC
** Clean the =pacman= and =yay= cache
:PROPERTIES:
:CUSTOM_ID: h-fa5307ec-065b-4d06-9d47-05ccde0da8ac
:END:
Finally, we are almost done! Lets clean the cache of =pacman= and =yay=.
#+BEGIN_SRC fish
printf "\n# Clean the pacman and yay cache ##############################################\n\n"
yay -Sc --noconfirm
#+END_SRC
You should now run a system pretty close to the one I have on my main
computer and my thinkpad.

151
org/config-website/nano.org Normal file
View File

@ -0,0 +1,151 @@
#+TITLE: Phundraks nano configuration
#+INCLUDE: headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's nano configuration" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's nano configuration" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the nano configuration of Phundrak" />
#+PROPERTY: header-args :tangle ~/.nanorc
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-fe544a28-d8d9-49d3-b5ea-0b828148dbb5
:END:
- [[#introduction][Introduction]]
- [[#configuration][Configuration]]
- [[#keys-behavior][Keys behavior]]
- [[#search][Search]]
- [[#visual-settings][Visual settings]]
- [[#whitespace-settings][Whitespace settings]]
- [[#included-configuration-file][Included configuration file]]
* Introduction
:PROPERTIES:
:CUSTOM_ID: h-ed3ad74a-f67a-4fc2-bb1f-b2cfb38f3ed0
:END:
I nowadays rarely use Nano as a text editor, since I mainly rely on Emacs for
all sorts of tasks, including quick file editing. However, at times, Emacs
wont work or wont be available, and I therefore need a lightweight, fast and
reliable text editor: Nano. And despite Nano being a simple piece of software,
it does offer some customization I cannot refuse. Here is how I configured it:
* Configuration
:PROPERTIES:
:CUSTOM_ID: h-76aa0ff6-9e6a-4a35-974f-9132b08c8eb4
:END:
When saving a file, create a backup file by adding a tilde (=~=) to the file's
name. And make and keep not just one backup file, but make and keep a uniquely
numbered one every time a file is saved — when backups are enabled with =set
backup= or =--backup= or =-B=. The uniquely numbered files are stored in the
directory =~/.cache/nano/backups/=.
#+BEGIN_SRC conf
set backup
set backupdir /home/phundrak/.cache/nano/backups/
#+END_SRC
Save a file by default in Unix format. This overrides nano's default behavior
of saving a file in the format that it had. (This option has no effect when
you also use =set noconvert=.)
#+BEGIN_SRC conf
set unix
#+END_SRC
** Keys behavior
:PROPERTIES:
:CUSTOM_ID: h-0f092122-dd91-40e0-8e02-b732a8d5485f
:END:
Make the Home key smarter. When Home is pressed anywhere but at the very
beginning of non-whitespace characters on a line, the cursor will jump to
that beginning (either forwards or backwards). If the cursor is already at
that position, it will jump to the true beginning of the line.
#+BEGIN_SRC conf
set smarthome
#+END_SRC
** Search
:PROPERTIES:
:CUSTOM_ID: h-edff993e-54f5-42c6-8a45-e5a7194adf57
:END:
Do case-unsensitive searches by default.
#+BEGIN_SRC conf
unset casesensitive
#+END_SRC
Do regular-expression searches by default. Regular expressions in =nano= are
of the extended type (ERE).
#+BEGIN_SRC conf
set regexp
#+END_SRC
** Visual settings
:PROPERTIES:
:CUSTOM_ID: h-f4d533e9-a86d-4b6e-b601-28536267f7ab
:END:
Use bold instead of reverse video for the title bar, status bar, key combos,
function tags, line numbers, and selected text. This can be overridden by
setting the options =titlecolor=, =statuscolor=, =keycolor=, =functioncolor=,
=numbercolor=, and =selectedcolor=.
#+BEGIN_SRC conf
set boldtext
#+END_SRC
Enable soft line wrapping for easier viewing of very long lines.
#+BEGIN_SRC conf
set softwrap
#+END_SRC
When soft line wrapping is enabled, make it wrap lines at blank characters
(tabs and spaces) instead of always at the edge of the screen.
#+BEGIN_SRC conf
set atblanks
#+END_SRC
Display line numbers to the left of the text area.
#+BEGIN_SRC conf
set linenumbers
#+END_SRC
Constantly display the cursor position in the status bar. This overrides the
option =quickblank=.
#+BEGIN_SRC conf
set constantshow
#+END_SRC
** Whitespace settings
:PROPERTIES:
:CUSTOM_ID: h-24190b41-8efe-4dfd-ac4b-0f5614b8c9e0
:END:
Convert typed tabs to spaces. Sue me.
#+BEGIN_SRC conf
set tabstospaces
#+END_SRC
Use a tab size of a certain amount of columns. The value of number must be
greater than 0. The default value is 8.
#+BEGIN_SRC conf
set tabsize 2
#+END_SRC
Automatically indent a newly created line to the same number of tabs and/or
spaces as the previous line (or as the next line if the previous line is the
beginning of a paragraph).
#+BEGIN_SRC conf
set autoindent
#+END_SRC
Remove trailing whitespace from wrapped lines when automatic hard-wrapping
occurs or when text is justified.
#+BEGIN_SRC conf
set trimblanks
#+END_SRC
** Included configuration file
:PROPERTIES:
:CUSTOM_ID: h-491cba80-5fa9-4b75-a9cb-2865ec39440a
:END:
Nano gives the opportunity to include some files located elsewhere. This is
why I added [[https://github.com/scopatz/nanorc][this repo]] as a submodule of my dotfiles so I can access a lot of
them at the same time. Since the submodule is cloned in =~/.config/nanorc=,
we can add only one line to include all of the =.nanorc= files.
#+BEGIN_SRC conf
include ~/.config/nanorc/*.nanorc
#+END_SRC

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
/home/phundrak/spacemacs.org

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
/home/phundrak/tmux.org

418
org/config-website/tmux.org Normal file
View File

@ -0,0 +1,418 @@
#+TITLE: Phundraks tmux config
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's tmux config" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's tmux config" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the tmux config file of Phundrak" />
#+PROPERTY: header-args :tangle ~/.tmux.conf.local
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#presentation][Presentation]]
- [[#windows-and-pane-creation][Windows and pane creation]]
- [[#display][Display]]
- [[#colors-and-style][Colors and style]]
- [[#window-status-bar][Window status bar]]
- [[#clipboard][Clipboard]]
- [[#user-customizations][User customizations]]
* Presentation
:PROPERTIES:
:CUSTOM_ID: h-d6e5eaf3-150c-4f3e-bc8e-fbbbb604640e
:END:
I dont really use tmux often, but I certainly do like a nice presentation and
useful features, hence this configuration. This config file is inspired by
gpakoszs tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]].
* Windows and pane creation
:PROPERTIES:
:CUSTOM_ID: h-b7e4f3a6-ab16-47e8-aa72-b74b3a66893d
:END:
Whether if a new *window* will retain the current path. Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_new_window_retain_current_path=true
#+END_SRC
Whether if a new *pane* should retain the current path. Possible values are:
- true (default)
- false
#+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:
- 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:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_new_session_prompt=false
#+END_SRC
* Display
:PROPERTIES:
:CUSTOM_ID: h-a1b48bb1-40d8-4ffb-9ec0-b77e63f7ef84
:END:
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2).
Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_24b_colour=false
#+END_SRC
These variables are for chosing the window style. I use the default one.
#+BEGIN_SRC conf-unix
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:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_highlight_focused_pane=false
#+END_SRC
Set the terminal title. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+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 dont 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'
tmux_conf_theme_right_separator_main='\uE0B2'
tmux_conf_theme_right_separator_sub='\uE0B3'
#+END_SRC
** Colors and style
:PROPERTIES:
:CUSTOM_ID: h-3142ab15-458c-434b-99d6-1f89462a6f26
:END:
Colors displayed in tmux can be chosen thanks to the following variables. Any
color should be formatted as a hexadecimal RGB value preceded by a pound sign
=#= (e.g. =#00afff= for light blue) or =default= to let our terminal set it
for us.
Choose the style of the pane borders. Possible values are:
- thin (default)
- fat
#+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.
#+BEGIN_SRC conf-unix
tmux_conf_theme_focused_pane_fg='default'
tmux_conf_theme_focused_pane_bg='#0087d7'
#+END_SRC
Here you can set the colors of the pane borders.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_border='#444444'
tmux_conf_theme_pane_active_border='#00afff'
#+END_SRC
With these variables, you can set the colors for the pane indicators.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_indicator='#00afff'
tmux_conf_theme_pane_active_indicator='#00afff'
#+END_SRC
These variables set the colors and the style of the status line.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_fg='#000000'
tmux_conf_theme_message_bg='#ffff00'
tmux_conf_theme_message_attr='bold'
#+END_SRC
Same as above for the status line command style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_command_fg='#ffff00'
tmux_conf_theme_message_command_bg='#000000'
tmux_conf_theme_message_command_attr='bold'
#+END_SRC
These variables set the style of the window modes.
#+BEGIN_SRC conf-unix
tmux_conf_theme_mode_fg='#000000'
tmux_conf_theme_mode_bg='#ffff00'
tmux_conf_theme_mode_attr='bold'
#+END_SRC
Set the style of the status line.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_fg='#8a8a8a'
tmux_conf_theme_status_bg='#080808'
tmux_conf_theme_status_attr='none'
#+END_SRC
** Window status bar
:PROPERTIES:
:CUSTOM_ID: h-f6a802f9-3b1e-4c83-8ffc-a72a35a691e9
:END:
The following variables are to set the windows status style and format.
Sets the colors and style of the window status.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_fg='#8a8a8a'
tmux_conf_theme_window_status_bg='#080808'
tmux_conf_theme_window_status_attr='none'
#+END_SRC
Sets the format of the window status. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_format='#I #W'
#+END_SRC
Sets the colors and style of the current window status.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_current_fg='#000000'
tmux_conf_theme_window_status_current_bg='#00afff'
tmux_conf_theme_window_status_current_attr='bold'
#+END_SRC
Sets the format of the currentwindow status. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_current_format='#I #W'
#+END_SRC
Sets the window activity status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_activity_fg='default'
tmux_conf_theme_window_status_activity_bg='default'
tmux_conf_theme_window_status_activity_attr='underscore'
#+END_SRC
Sets the window bell status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_bell_fg='#ffff00'
tmux_conf_theme_window_status_bell_bg='default'
tmux_conf_theme_window_status_bell_attr='blink,bold'
#+END_SRC
Sets the window last status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_last_fg='#00afff'
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:
- =#{battery_bar}=
- =#{battery_hbar}=
- =#{battery_percentage}=
- =#{battery_status}=
- =#{battery_vbar}=
- =#{circled_session_name}=
- =#{hostname_ssh}=
- =#{hostname}=
- =#{loadavg}=
- =#{pairing}=
- =#{prefix}=
- =#{root}=
- =#{synchronized}=
- =#{uptime_y}=
- =#{uptime_d}= (modulo 365 when =#{uptime_y}= is used)
- =#{uptime_h}=
- =#{uptime_m}=
- =#{uptime_s}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
#+END_SRC
Sets the left status style and colors.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4'
tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff'
tmux_conf_theme_status_left_attr='bold,none,none'
#+END_SRC
Sets the right status style and colors.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000'
tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4'
tmux_conf_theme_status_right_attr='none,none,bold'
#+END_SRC
Set the pairing indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pairing='👓 ' # U+1F453
tmux_conf_theme_pairing_fg='none'
tmux_conf_theme_pairing_bg='none'
tmux_conf_theme_pairing_attr='none'
#+END_SRC
Set the pairing indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
# prefix indicator
tmux_conf_theme_prefix='⌨ ' # U+2328
tmux_conf_theme_prefix_fg='none'
tmux_conf_theme_prefix_bg='none'
tmux_conf_theme_prefix_attr='none'
#+END_SRC
Set the root indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_root='!'
tmux_conf_theme_root_fg='none'
tmux_conf_theme_root_bg='none'
tmux_conf_theme_root_attr='bold,blink'
#+END_SRC
Set the synchronized indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_synchronized='🔒' # U+1F512
tmux_conf_theme_synchronized_fg='none'
tmux_conf_theme_synchronized_bg='none'
tmux_conf_theme_synchronized_attr='none'
#+END_SRC
Set the battery bar symbols.
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_symbol_full='◼'
tmux_conf_battery_bar_symbol_empty='◻'
#+END_SRC
Set the battery bar length in terms of amount of symbols. Possible values
are:
- =auto=
- an integer number, e.g. 5
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_length='auto'
#+END_SRC
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 =#=.
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_palette='gradient'
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'
#+END_SRC
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 =#=.
#+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 =#=.
#+BEGIN_SRC conf-unix
tmux_conf_battery_vbar_palette='gradient'
#+END_SRC
Set symbols used to indicate whether the battery is charging or discharging.
#+BEGIN_SRC conf-unix
tmux_conf_battery_status_charging='⚡ ' # U+26A1
tmux_conf_battery_status_discharging='🔋 ' # U+1F50B
# tmux_conf_battery_status_charging='↑' # U+2191
# 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=.
#+BEGIN_SRC conf-unix
tmux_conf_theme_clock_colour='#00afff'
tmux_conf_theme_clock_style='24'
#+END_SRC
* Clipboard
:PROPERTIES:
:CUSTOM_ID: h-47a20d72-6406-4467-b833-a4bd33731487
:END:
Whether if in copy mode, copying the selection also copies to the OS
clipboard. Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_copy_to_os_clipboard=false
#+END_SRC
* User customizations
:PROPERTIES:
:CUSTOM_ID: h-68bc0e1c-48d9-4b14-953d-875601d0edb7
:END:
Here we can override or undo some setting from settings from tmux. First, we
can increase the history size.
#+BEGIN_SRC conf-unix
set -g history-limit 10000
#+END_SRC
We can also start with mouse mode enabled. But I dont.
#+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 dont, 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.
#+BEGIN_SRC conf-unix
# set -gu prefix2
# unbind C-a
# unbind C-b
# set -g prefix C-a
# bind C-a send-prefix
#+END_SRC
Move the status line to the top.
#+BEGIN_SRC conf-unix
#set -g status-position top
#+END_SRC

File diff suppressed because it is too large Load Diff

420
tmux.org
View File

@ -1,420 +0,0 @@
#+TITLE: Phundraks tmux config
#+INCLUDE: ~/org/config-website/headers.org
#+OPTIONS: auto-id:t
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's tmux config" />
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's tmux config" />
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the tmux config file of Phundrak" />
* Table of Contents :TOC_4_gh:noexport:
:PROPERTIES:
:CUSTOM_ID: h-400070eb-725f-4416-a4c6-da3053df750b
:END:
- [[#presentation][Presentation]]
- [[#windows-and-pane-creation][Windows and pane creation]]
- [[#display][Display]]
- [[#colors-and-style][Colors and style]]
- [[#window-status-bar][Window status bar]]
- [[#clipboard][Clipboard]]
- [[#user-customizations][User customizations]]
* Presentation
:PROPERTIES:
:CUSTOM_ID: h-d6e5eaf3-150c-4f3e-bc8e-fbbbb604640e
:HEADER-ARGS: :tangle ~/.tmux.conf.local
:END:
I dont really use tmux often, but I certainly do like a nice presentation and
useful features, hence this configuration. This config file is inspired by
gpakoszs tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]].
** Windows and pane creation
:PROPERTIES:
:CUSTOM_ID: h-b7e4f3a6-ab16-47e8-aa72-b74b3a66893d
:END:
Whether if a new *window* will retain the current path. Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_new_window_retain_current_path=true
#+END_SRC
Whether if a new *pane* should retain the current path. Possible values are:
- true (default)
- false
#+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:
- 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:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_new_session_prompt=false
#+END_SRC
** Display
:PROPERTIES:
:CUSTOM_ID: h-a1b48bb1-40d8-4ffb-9ec0-b77e63f7ef84
:END:
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2).
Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_24b_colour=false
#+END_SRC
These variables are for chosing the window style. I use the default one.
#+BEGIN_SRC conf-unix
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:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_highlight_focused_pane=false
#+END_SRC
Set the terminal title. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+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 dont 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'
tmux_conf_theme_right_separator_main='\uE0B2'
tmux_conf_theme_right_separator_sub='\uE0B3'
#+END_SRC
*** Colors and style
:PROPERTIES:
:CUSTOM_ID: h-3142ab15-458c-434b-99d6-1f89462a6f26
:END:
Colors displayed in tmux can be chosen thanks to the following variables.
Any color should be formatted as a hexadecimal RGB value preceded by a pound
sign =#= (e.g. =#00afff= for light blue) or =default= to let our terminal
set it for us.
Choose the style of the pane borders. Possible values are:
- thin (default)
- fat
#+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.
#+BEGIN_SRC conf-unix
tmux_conf_theme_focused_pane_fg='default'
tmux_conf_theme_focused_pane_bg='#0087d7'
#+END_SRC
Here you can set the colors of the pane borders.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_border='#444444'
tmux_conf_theme_pane_active_border='#00afff'
#+END_SRC
With these variables, you can set the colors for the pane indicators.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_indicator='#00afff'
tmux_conf_theme_pane_active_indicator='#00afff'
#+END_SRC
These variables set the colors and the style of the status line.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_fg='#000000'
tmux_conf_theme_message_bg='#ffff00'
tmux_conf_theme_message_attr='bold'
#+END_SRC
Same as above for the status line command style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_command_fg='#ffff00'
tmux_conf_theme_message_command_bg='#000000'
tmux_conf_theme_message_command_attr='bold'
#+END_SRC
These variables set the style of the window modes.
#+BEGIN_SRC conf-unix
tmux_conf_theme_mode_fg='#000000'
tmux_conf_theme_mode_bg='#ffff00'
tmux_conf_theme_mode_attr='bold'
#+END_SRC
Set the style of the status line.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_fg='#8a8a8a'
tmux_conf_theme_status_bg='#080808'
tmux_conf_theme_status_attr='none'
#+END_SRC
*** Window status bar
:PROPERTIES:
:CUSTOM_ID: h-f6a802f9-3b1e-4c83-8ffc-a72a35a691e9
:END:
The following variables are to set the windows status style and format.
Sets the colors and style of the window status.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_fg='#8a8a8a'
tmux_conf_theme_window_status_bg='#080808'
tmux_conf_theme_window_status_attr='none'
#+END_SRC
Sets the format of the window status. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_format='#I #W'
#+END_SRC
Sets the colors and style of the current window status.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_current_fg='#000000'
tmux_conf_theme_window_status_current_bg='#00afff'
tmux_conf_theme_window_status_current_attr='bold'
#+END_SRC
Sets the format of the currentwindow status. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_current_format='#I #W'
#+END_SRC
Sets the window activity status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_activity_fg='default'
tmux_conf_theme_window_status_activity_bg='default'
tmux_conf_theme_window_status_activity_attr='underscore'
#+END_SRC
Sets the window bell status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_bell_fg='#ffff00'
tmux_conf_theme_window_status_bell_bg='default'
tmux_conf_theme_window_status_bell_attr='blink,bold'
#+END_SRC
Sets the window last status style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_status_last_fg='#00afff'
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:
- =#{battery_bar}=
- =#{battery_hbar}=
- =#{battery_percentage}=
- =#{battery_status}=
- =#{battery_vbar}=
- =#{circled_session_name}=
- =#{hostname_ssh}=
- =#{hostname}=
- =#{loadavg}=
- =#{pairing}=
- =#{prefix}=
- =#{root}=
- =#{synchronized}=
- =#{uptime_y}=
- =#{uptime_d}= (modulo 365 when =#{uptime_y}= is used)
- =#{uptime_h}=
- =#{uptime_m}=
- =#{uptime_s}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
#+END_SRC
Sets the left status style and colors.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4'
tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff'
tmux_conf_theme_status_left_attr='bold,none,none'
#+END_SRC
Sets the right status style and colors.
#+BEGIN_SRC conf-unix
tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000'
tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4'
tmux_conf_theme_status_right_attr='none,none,bold'
#+END_SRC
Set the pairing indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pairing='👓 ' # U+1F453
tmux_conf_theme_pairing_fg='none'
tmux_conf_theme_pairing_bg='none'
tmux_conf_theme_pairing_attr='none'
#+END_SRC
Set the pairing indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
# prefix indicator
tmux_conf_theme_prefix='⌨ ' # U+2328
tmux_conf_theme_prefix_fg='none'
tmux_conf_theme_prefix_bg='none'
tmux_conf_theme_prefix_attr='none'
#+END_SRC
Set the root indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_root='!'
tmux_conf_theme_root_fg='none'
tmux_conf_theme_root_bg='none'
tmux_conf_theme_root_attr='bold,blink'
#+END_SRC
Set the synchronized indicator, its style and its attribute.
#+BEGIN_SRC conf-unix
tmux_conf_theme_synchronized='🔒' # U+1F512
tmux_conf_theme_synchronized_fg='none'
tmux_conf_theme_synchronized_bg='none'
tmux_conf_theme_synchronized_attr='none'
#+END_SRC
Set the battery bar symbols.
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_symbol_full='◼'
tmux_conf_battery_bar_symbol_empty='◻'
#+END_SRC
Set the battery bar length in terms of amount of symbols. Possible values
are:
- =auto=
- an integer number, e.g. 5
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_length='auto'
#+END_SRC
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 =#=.
#+BEGIN_SRC conf-unix
tmux_conf_battery_bar_palette='gradient'
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'
#+END_SRC
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 =#=.
#+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 =#=.
#+BEGIN_SRC conf-unix
tmux_conf_battery_vbar_palette='gradient'
#+END_SRC
Set symbols used to indicate whether the battery is charging or discharging.
#+BEGIN_SRC conf-unix
tmux_conf_battery_status_charging='⚡ ' # U+26A1
tmux_conf_battery_status_discharging='🔋 ' # U+1F50B
# tmux_conf_battery_status_charging='↑' # U+2191
# 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=.
#+BEGIN_SRC conf-unix
tmux_conf_theme_clock_colour='#00afff'
tmux_conf_theme_clock_style='24'
#+END_SRC
** Clipboard
:PROPERTIES:
:CUSTOM_ID: h-47a20d72-6406-4467-b833-a4bd33731487
:END:
Whether if in copy mode, copying the selection also copies to the OS
clipboard. Possible values are:
- true
- false (default)
#+BEGIN_SRC conf-unix
tmux_conf_copy_to_os_clipboard=false
#+END_SRC
** User customizations
:PROPERTIES:
:CUSTOM_ID: h-68bc0e1c-48d9-4b14-953d-875601d0edb7
:END:
Here we can override or undo some setting from settings from tmux.
First, we can increase the history size.
#+BEGIN_SRC conf-unix
set -g history-limit 10000
#+END_SRC
We can also start with mouse mode enabled. But I dont.
#+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 dont, 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.
#+BEGIN_SRC conf-unix
# set -gu prefix2
# unbind C-a
# unbind C-b
# set -g prefix C-a
# bind C-a send-prefix
#+END_SRC
Move the status line to the top.
#+BEGIN_SRC conf-unix
#set -g status-position top
#+END_SRC