Compare commits
6 Commits
2cbf555a9d
...
45160c4f37
Author | SHA1 | Date |
---|---|---|
Geoffrey Frogeye | 45160c4f37 | |
Geoffrey Frogeye | a96b3e80e8 | |
Geoffrey Frogeye | 1a8502002a | |
Geoffrey Frogeye | a883596cf0 | |
Geoffrey Frogeye | 779ba859eb | |
Geoffrey Frogeye | 942089d6c5 |
|
@ -1,6 +1,17 @@
|
|||
# vi:syntax=yaml
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Import additional configuration files
|
||||
#
|
||||
# Imports are loaded in order, skipping all missing files, with the importing
|
||||
# file being loaded last. If a field is already present in a previous import, it
|
||||
# will be replaced.
|
||||
#
|
||||
# All imports must either be absolute paths starting with `/`, or paths relative
|
||||
# to the user's home directory starting with `~/`.
|
||||
#import:
|
||||
# - /path/to/alacritty.yml
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
|
@ -16,8 +27,9 @@ env:
|
|||
window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Specified in number of columns/lines, not pixels.
|
||||
# If both are `0`, this setting is ignored.
|
||||
# Number of lines/columns (not pixels) in the terminal. The number of columns
|
||||
# must be at least `2`, while using a value of `0` for columns and lines will
|
||||
# fall back to the window manager's recommended size.
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
|
@ -49,7 +61,7 @@ window:
|
|||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||
#decorations: full
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
|
@ -78,8 +90,8 @@ window:
|
|||
|
||||
# GTK theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
|
||||
# Set this to `None` to use the default theme variant.
|
||||
# Override the variant of the GTK theme. Commonly supported values are `dark`
|
||||
# and `light`. Set this to `None` to use the default theme variant.
|
||||
#gtk_theme_variant: None
|
||||
|
||||
#scrolling:
|
||||
|
@ -141,15 +153,16 @@ font:
|
|||
# Point size
|
||||
size: 12.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
# spacing.
|
||||
#offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||
# increasing `y` moves the glyph upward.
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the
|
||||
# right, increasing `y` moves the glyph upward.
|
||||
#glyph_offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
@ -183,8 +196,8 @@ bell:
|
|||
# - Linear
|
||||
animation: EaseOutExpo
|
||||
|
||||
# Duration of the visual bell flash. A `duration` of `0` will disable the
|
||||
# visual bell animation.
|
||||
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
|
||||
# disable the visual bell animation.
|
||||
duration: 100
|
||||
|
||||
# Visual bell animation color.
|
||||
|
@ -214,6 +227,8 @@ bell:
|
|||
#background_opacity: 1.0
|
||||
|
||||
#selection:
|
||||
# This string contains all characters that are used as separators for
|
||||
# "semantic words" in Alacritty.
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
|
||||
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||
|
@ -228,6 +243,15 @@ cursor:
|
|||
# - | Beam
|
||||
#style: Block
|
||||
|
||||
# Cursor blinking state
|
||||
#
|
||||
# Values for `blinking`:
|
||||
# - Never: Prevent the cursor from ever blinking
|
||||
# - Off: Disable blinking by default
|
||||
# - On: Enable blinking by default
|
||||
# - Always: Force the cursor to always blink
|
||||
#blinking: Off
|
||||
|
||||
# Vi mode cursor style
|
||||
#
|
||||
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||
|
@ -236,6 +260,9 @@ cursor:
|
|||
# See `cursor.style` for available options.
|
||||
vi_mode_style: Underline
|
||||
|
||||
# Cursor blinking interval in milliseconds.
|
||||
#blink_interval: 750
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
#unfocused_hollow: true
|
||||
|
@ -249,8 +276,9 @@ cursor:
|
|||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||
# shell.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) /bin/bash --login
|
||||
|
@ -280,7 +308,7 @@ cursor:
|
|||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
mouse:
|
||||
#mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
|
@ -292,35 +320,58 @@ mouse:
|
|||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
#hide_when_typing: false
|
||||
|
||||
#url:
|
||||
# URL launcher
|
||||
#
|
||||
# This program is executed when clicking on a text which is recognized as a URL.
|
||||
# The URL is always added to the command as the last parameter.
|
||||
#
|
||||
# When set to `launcher: None`, URL launching will be disabled completely.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) open
|
||||
# - (Linux/BSD) xdg-open
|
||||
# - (Windows) explorer
|
||||
#launcher:
|
||||
# program: xdg-open
|
||||
# args: []
|
||||
# Regex hints
|
||||
#
|
||||
# Terminal hints can be used to find text in the visible part of the terminal
|
||||
# and pipe it to other applications.
|
||||
hints:
|
||||
# Keys used for the hint labels.
|
||||
#alphabet: "jfkdls;ahgurieowpq"
|
||||
|
||||
# URL modifiers
|
||||
#
|
||||
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||
# on them. The available modifiers are documented in the key binding section.
|
||||
modifiers: Control
|
||||
# List with all available hints
|
||||
#
|
||||
# Each hint must have a `regex` and either an `action` or a `command` field.
|
||||
# The fields `mouse`, `binding` and `post_processing` are optional.
|
||||
#
|
||||
# The fields `command`, `binding.key`, `binding.mods` and `mouse.mods` accept
|
||||
# the same values as they do in the `key_bindings` section.
|
||||
#
|
||||
# The `mouse.enabled` field controls if the hint should be underlined while
|
||||
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
|
||||
#
|
||||
# If the `post_processing` field is set to `true`, heuristics will be used to
|
||||
# shorten the match if there are characters likely not to be part of the hint
|
||||
# (e.g. a trailing `.`). This is most useful for URIs.
|
||||
#
|
||||
# Values for `action`:
|
||||
# - Copy
|
||||
# Copy the hint's text to the clipboard.
|
||||
# - Paste
|
||||
# Paste the hint's text to the terminal or search.
|
||||
# - Select
|
||||
# Select the hint's text.
|
||||
# - MoveViModeCursor
|
||||
# Move the vi mode cursor to the beginning of the hint.
|
||||
enabled:
|
||||
- regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
|
||||
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
|
||||
command: xdg-open
|
||||
post_processing: true
|
||||
mouse:
|
||||
enabled: true
|
||||
mods: Control
|
||||
binding:
|
||||
key: F
|
||||
mods: Control|Alt
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
|
||||
# `Shift` modifier is automatically added as a requirement.
|
||||
# To trigger mouse bindings when an application running within Alacritty
|
||||
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||
# requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
|
@ -379,10 +430,11 @@ mouse:
|
|||
#
|
||||
# - ToggleViMode
|
||||
# - SearchForward
|
||||
# Start searching toward the right of the search origin.
|
||||
# - SearchBackward
|
||||
# Start searching toward the left of the search origin.
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
|
@ -395,51 +447,110 @@ mouse:
|
|||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# Remove the terminal's scrollback history.
|
||||
# - Hide
|
||||
# Hide the Alacritty window.
|
||||
# - Minimize
|
||||
# Minimize the Alacritty window.
|
||||
# - Quit
|
||||
# Quit Alacritty.
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# Spawn a new instance of Alacritty.
|
||||
# - ClearLogNotice
|
||||
# Clear Alacritty's UI warning and error notice.
|
||||
# - ClearSelection
|
||||
# Remove the active selection.
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# (`mode: Vi` only):
|
||||
# - Vi mode exclusive actions:
|
||||
#
|
||||
# - Open
|
||||
# - Up
|
||||
# - Down
|
||||
# - Left
|
||||
# - Right
|
||||
# - First
|
||||
# - Last
|
||||
# - FirstOccupied
|
||||
# - High
|
||||
# - Middle
|
||||
# - Low
|
||||
# - SemanticLeft
|
||||
# - SemanticRight
|
||||
# - SemanticLeftEnd
|
||||
# - SemanticRightEnd
|
||||
# - WordRight
|
||||
# - WordLeft
|
||||
# - WordRightEnd
|
||||
# - WordLeftEnd
|
||||
# - Bracket
|
||||
# Perform the action of the first matching hint under the vi mode cursor
|
||||
# with `mouse.enabled` set to `true`.
|
||||
# - ToggleNormalSelection
|
||||
# - ToggleLineSelection
|
||||
# - ToggleBlockSelection
|
||||
# - ToggleSemanticSelection
|
||||
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||
#
|
||||
# - Vi mode exclusive cursor motion actions:
|
||||
#
|
||||
# - Up
|
||||
# One line up.
|
||||
# - Down
|
||||
# One line down.
|
||||
# - Left
|
||||
# One character left.
|
||||
# - Right
|
||||
# One character right.
|
||||
# - First
|
||||
# First column, or beginning of the line when already at the first column.
|
||||
# - Last
|
||||
# Last column, or beginning of the line when already at the last column.
|
||||
# - FirstOccupied
|
||||
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||
# the line when already at the first cell of the row.
|
||||
# - High
|
||||
# Top of the screen.
|
||||
# - Middle
|
||||
# Center of the screen.
|
||||
# - Low
|
||||
# Bottom of the screen.
|
||||
# - SemanticLeft
|
||||
# Start of the previous semantically separated word.
|
||||
# - SemanticRight
|
||||
# Start of the next semantically separated word.
|
||||
# - SemanticLeftEnd
|
||||
# End of the previous semantically separated word.
|
||||
# - SemanticRightEnd
|
||||
# End of the next semantically separated word.
|
||||
# - WordLeft
|
||||
# Start of the previous whitespace separated word.
|
||||
# - WordRight
|
||||
# Start of the next whitespace separated word.
|
||||
# - WordLeftEnd
|
||||
# End of the previous whitespace separated word.
|
||||
# - WordRightEnd
|
||||
# End of the next whitespace separated word.
|
||||
# - Bracket
|
||||
# Character matching the bracket at the cursor's location.
|
||||
# - SearchNext
|
||||
# Beginning of the next match.
|
||||
# - SearchPrevious
|
||||
# Beginning of the previous match.
|
||||
# - SearchStart
|
||||
# Start of the match to the left of the vi mode cursor.
|
||||
# - SearchEnd
|
||||
# End of the match to the right of the vi mode cursor.
|
||||
#
|
||||
# (macOS only):
|
||||
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||
# - Search mode exclusive actions:
|
||||
# - SearchFocusNext
|
||||
# Move the focus to the next search match.
|
||||
# - SearchFocusPrevious
|
||||
# Move the focus to the previous search match.
|
||||
# - SearchConfirm
|
||||
# - SearchCancel
|
||||
# - SearchClear
|
||||
# Reset the search regex.
|
||||
# - SearchDeleteWord
|
||||
# Delete the last word in the search regex.
|
||||
# - SearchHistoryPrevious
|
||||
# Go to the previous regex in the search history.
|
||||
# - SearchHistoryNext
|
||||
# Go to the next regex in the search history.
|
||||
#
|
||||
# (Linux/BSD only):
|
||||
# - CopySelection: Copies into selection buffer
|
||||
# - macOS exclusive actions:
|
||||
# - ToggleSimpleFullscreen
|
||||
# Enter fullscreen without occupying another space.
|
||||
#
|
||||
# - Linux/BSD exclusive actions:
|
||||
#
|
||||
# - CopySelection
|
||||
# Copy from the selection buffer.
|
||||
# - PasteSelection
|
||||
# Paste from the selection buffer.
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
|
@ -469,7 +580,9 @@ mouse:
|
|||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Search
|
||||
# - Alt
|
||||
# - Vi
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
|
@ -482,100 +595,115 @@ mouse:
|
|||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# in the order they were defined in.
|
||||
key_bindings:
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
|
||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||
|
||||
# Vi Mode
|
||||
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
|
||||
- { key: Space, mods: Alt|Control, action: ToggleViMode }
|
||||
#- { key: Escape, mode: Vi, action: ClearSelection }
|
||||
#- { key: I, mode: Vi, action: ScrollToBottom }
|
||||
#- { key: I, mode: Vi, action: ToggleViMode }
|
||||
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
|
||||
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
|
||||
#- { key: G, mode: Vi, action: ScrollToTop }
|
||||
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
|
||||
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
|
||||
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
|
||||
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
|
||||
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
|
||||
- { key: K, mods: Control, mode: Vi, action: ScrollHalfPageUp }
|
||||
- { key: J, mods: Control, mode: Vi, action: ScrollHalfPageDown }
|
||||
#- { key: Y, mode: Vi, action: Copy }
|
||||
#- { key: Y, mode: Vi, action: ClearSelection }
|
||||
#- { key: Copy, mode: Vi, action: ClearSelection }
|
||||
#- { key: V, mode: Vi, action: ToggleNormalSelection }
|
||||
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
|
||||
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
|
||||
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
|
||||
#- { key: Return, mode: Vi, action: Open }
|
||||
#- { key: K, mode: Vi, action: Up }
|
||||
#- { key: J, mode: Vi, action: Down }
|
||||
#- { key: H, mode: Vi, action: Left }
|
||||
#- { key: L, mode: Vi, action: Right }
|
||||
#- { key: Up, mode: Vi, action: Up }
|
||||
#- { key: Down, mode: Vi, action: Down }
|
||||
#- { key: Left, mode: Vi, action: Left }
|
||||
#- { key: Right, mode: Vi, action: Right }
|
||||
#- { key: Key0, mode: Vi, action: First }
|
||||
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
|
||||
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
|
||||
#- { key: H, mods: Shift, mode: Vi, action: High }
|
||||
#- { key: M, mods: Shift, mode: Vi, action: Middle }
|
||||
#- { key: L, mods: Shift, mode: Vi, action: Low }
|
||||
#- { key: B, mode: Vi, action: SemanticLeft }
|
||||
#- { key: W, mode: Vi, action: SemanticRight }
|
||||
#- { key: E, mode: Vi, action: SemanticRightEnd }
|
||||
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
|
||||
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
|
||||
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
|
||||
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
|
||||
#- { key: Slash, mode: Vi, action: SearchForward }
|
||||
#- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward }
|
||||
#- { key: N, mode: Vi, action: SearchNext }
|
||||
#- { key: N, mods: Shift, mode: Vi, action: SearchPrevious }
|
||||
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
||||
- { key: Space, mods: Alt|Control, mode: ~Search, action: ToggleViMode }
|
||||
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
||||
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
||||
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
||||
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
||||
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
||||
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
||||
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
||||
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
||||
- { key: K, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
||||
- { key: J, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
||||
#- { key: Y, mode: Vi|~Search, action: Copy }
|
||||
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
||||
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
||||
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
||||
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
||||
#- { key: Return, mode: Vi|~Search, action: Open }
|
||||
#- { key: K, mode: Vi|~Search, action: Up }
|
||||
#- { key: J, mode: Vi|~Search, action: Down }
|
||||
#- { key: H, mode: Vi|~Search, action: Left }
|
||||
#- { key: L, mode: Vi|~Search, action: Right }
|
||||
#- { key: Up, mode: Vi|~Search, action: Up }
|
||||
#- { key: Down, mode: Vi|~Search, action: Down }
|
||||
#- { key: Left, mode: Vi|~Search, action: Left }
|
||||
#- { key: Right, mode: Vi|~Search, action: Right }
|
||||
#- { key: Key0, mode: Vi|~Search, action: First }
|
||||
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
||||
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
||||
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
||||
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
||||
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
||||
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
||||
#- { key: W, mode: Vi|~Search, action: SemanticRight }
|
||||
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
||||
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
||||
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
||||
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
||||
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
||||
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
||||
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
||||
#- { key: N, mode: Vi|~Search, action: SearchNext }
|
||||
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
||||
|
||||
# Search Mode
|
||||
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
||||
#- { key: Escape, mode: Search, action: SearchCancel }
|
||||
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
|
||||
#- { key: U, mods: Control, mode: Search, action: SearchClear }
|
||||
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
|
||||
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
|
||||
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
|
||||
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
|
||||
#- { key: Down, mode: Search, action: SearchHistoryNext }
|
||||
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
|
||||
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
||||
|
||||
# (Windows, Linux, and BSD only)
|
||||
- { key: V, mods: Control|Alt, action: Paste }
|
||||
- { key: C, mods: Control|Alt, action: Copy }
|
||||
- { key: F, mods: Control|Alt, action: SearchForward }
|
||||
- { key: B, mods: Control|Alt, action: SearchBackward }
|
||||
- { key: C, mods: Control|Alt, mode: Vi, action: ClearSelection }
|
||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
- { key: V, mods: Control|Alt, mode: ~Vi, action: Paste }
|
||||
- { key: C, mods: Control|Alt, action: Copy }
|
||||
- { key: F, mods: Control|Alt, mode: ~Search, action: SearchForward }
|
||||
- { key: B, mods: Control|Alt, mode: ~Search, action: SearchBackward }
|
||||
- { key: C, mods: Control|Alt, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Plus, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
|
||||
|
||||
# (Windows only)
|
||||
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
|
||||
# (macOS only)
|
||||
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
|
||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: K, mods: Command, action: ClearHistory }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { key: C, mods: Command, mode: Vi, action: ClearSelection }
|
||||
#- { key: H, mods: Command, action: Hide }
|
||||
#- { key: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Command, action: SearchForward }
|
||||
#- { key: B, mods: Command, action: SearchBackward }
|
||||
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
|
||||
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
|
||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Plus, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: H, mods: Command, action: Hide }
|
||||
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
|
||||
#- { key: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
|
||||
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
|
||||
|
||||
#debug:
|
||||
# Display the time it takes to redraw each frame.
|
||||
|
@ -587,7 +715,7 @@ key_bindings:
|
|||
# Log level
|
||||
#
|
||||
# Values for `log_level`:
|
||||
# - None
|
||||
# - Off
|
||||
# - Error
|
||||
# - Warn
|
||||
# - Info
|
||||
|
|
|
@ -15,3 +15,9 @@ software_full: no
|
|||
# Which additional software to install
|
||||
software_snippets: []
|
||||
|
||||
# If the computer has a battery and we want to use it
|
||||
has_battery: no
|
||||
|
||||
# Activate numlock by default
|
||||
auto_numlock: no
|
||||
|
||||
|
|
|
@ -7,3 +7,5 @@ dev_stuffs:
|
|||
- ansible
|
||||
- docker
|
||||
software_full: yes
|
||||
has_battery: yes
|
||||
auto_numlock: yes
|
||||
|
|
|
@ -4,3 +4,4 @@ dev_stuffs:
|
|||
- shell
|
||||
- network
|
||||
- ansible
|
||||
has_battery: yes
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
roles:
|
||||
- role: access
|
||||
tags: access
|
||||
when: root_access
|
||||
- role: software
|
||||
tags: software
|
||||
- role: system
|
||||
tags: system
|
||||
when: root_access
|
||||
- role: dotfiles
|
||||
tags: dotfiles
|
||||
- role: mnussbaum.base16-builder-ansible # Required for color
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
dest: "{{ ansible_user_dir }}/.dotfiles"
|
||||
notify: install dotfiles
|
||||
|
||||
# - name: Install python dependencies for scripts
|
||||
# pip:
|
||||
# requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt"
|
||||
- name: Install python dependencies for scripts
|
||||
pip:
|
||||
requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt"
|
||||
|
|
|
@ -115,5 +115,6 @@
|
|||
# be removed by dependency check.
|
||||
# Current packages will be kept by the meta package
|
||||
use: yay
|
||||
notify: "software changed"
|
||||
tags: softwarelist
|
||||
when: arch_based and root_access
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{# Essential #}
|
||||
firefox
|
||||
qutebrowser
|
||||
{# Sound #}
|
||||
pulseaudio
|
||||
pacmixer
|
||||
zbar
|
||||
{% if arch_based %}
|
||||
ttf-dejavu
|
||||
ttf-twemoji
|
||||
|
@ -13,6 +15,7 @@ thunar
|
|||
gedit
|
||||
feh
|
||||
zathura
|
||||
zbar
|
||||
{% if arch_based %}
|
||||
zathura-pdf-mupdf
|
||||
{% elif debian_based %}
|
||||
|
|
|
@ -19,4 +19,5 @@ ansible
|
|||
unzip
|
||||
unrar
|
||||
p7zip
|
||||
{{ python_prefix }}-pystache
|
||||
{# EOF #}
|
||||
|
|
|
@ -19,3 +19,6 @@ speedtest-cli
|
|||
{% if arch_based %}
|
||||
pacman-contrib
|
||||
{% endif %}
|
||||
{% if has_battery %}
|
||||
powertop
|
||||
{% endif %}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
server 0.europe.pool.ntp.org offline
|
||||
server 1.europe.pool.ntp.org offline
|
||||
server 2.europe.pool.ntp.org offline
|
||||
server 3.europe.pool.ntp.org offline
|
||||
driftfile /etc/chrony.drift
|
||||
rtconutc
|
||||
rtcsync
|
|
@ -0,0 +1,5 @@
|
|||
if $if_up; then
|
||||
chronyc online
|
||||
elif $if_down; then
|
||||
chronyc offline
|
||||
fi
|
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
ExecStartPre=/bin/sh -c 'setleds +num < /dev/%I'
|
|
@ -0,0 +1,3 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i%I
|
|
@ -0,0 +1,5 @@
|
|||
Section "Device"
|
||||
Identifier "Intel Graphics"
|
||||
Driver "intel"
|
||||
Option "Backlight" "intel_backlight"
|
||||
EndSection
|
|
@ -0,0 +1,8 @@
|
|||
Section "InputClass"
|
||||
Identifier "joystick catchall"
|
||||
MatchIsJoystick "on"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
Driver "joystick"
|
||||
Option "StartKeysEnabled" "False" #Disable mouse
|
||||
Option "StartMouseEnabled" "False" #support
|
||||
EndSection
|
|
@ -0,0 +1,7 @@
|
|||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "us_qwerty-fr"
|
||||
#Option "XkbModel" "pc105+inet"
|
||||
Option "XkbOptions" "terminate:ctrl_alt_bksp"
|
||||
EndSection
|
|
@ -0,0 +1,6 @@
|
|||
Section "InputClass"
|
||||
Identifier "touchpad"
|
||||
Driver "libinput"
|
||||
MatchIsTouchpad "on"
|
||||
Option "Tapping" "on"
|
||||
EndSection
|
|
@ -0,0 +1,28 @@
|
|||
- name: Create a etckeeper commit
|
||||
command: "etckeeper commit 'automatrop {{ ansible_date_time.iso8601 }}'"
|
||||
listen: "etc changed"
|
||||
become: yes
|
||||
|
||||
- name: Restart chrony
|
||||
systemd:
|
||||
name: chronyd
|
||||
state: restarted
|
||||
listen: chrony reconfigured
|
||||
become: yes
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
listen: systemd changed
|
||||
become: yes
|
||||
|
||||
- name: Restart wpa_supplicant
|
||||
systemd:
|
||||
name: "wpa_supplicant@{{ item }}"
|
||||
state: restarted
|
||||
become: yes
|
||||
loop: "{{ ansible_interfaces }}"
|
||||
when: "item.startswith('wl')"
|
||||
listen: wpa_supplicant changed
|
||||
# Could probably use something better like
|
||||
# listing /sys/class/ieee80211/*/device/net/
|
|
@ -0,0 +1,336 @@
|
|||
# TODO For other distributions
|
||||
|
||||
- name: Set variables
|
||||
set_fact:
|
||||
arch_based: "{{ ansible_distribution == 'Archlinux' }}"
|
||||
# arch: "{{ ansible_lsb.id == 'Arch' }}"
|
||||
# manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
|
||||
# termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}"
|
||||
# debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}"
|
||||
# debian: "{{ ansible_distribution == 'Debian' }}"
|
||||
# ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
|
||||
|
||||
# Etckeeper
|
||||
|
||||
- name: Install etckeeper (Arch based)
|
||||
pacman:
|
||||
name: etckeeper
|
||||
state: present
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
- name: Check if etckeeper is initialized
|
||||
stat:
|
||||
path: /etc/.git
|
||||
register: etckeeper
|
||||
become: yes
|
||||
|
||||
- name: Initialize etckeeper
|
||||
command: "etckeeper init"
|
||||
become: yes
|
||||
when: not etckeeper.stat.exists
|
||||
changed_when: yes
|
||||
|
||||
- name: Configure git user.name for etckeeper
|
||||
git_config:
|
||||
scope: local
|
||||
repo: /etc
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
loop:
|
||||
- name: "user.name"
|
||||
value: "etckeeper on {{ inventory_hostname_short }}"
|
||||
- name: "user.email"
|
||||
value: "etckeeper@{{ inventory_hostname }}"
|
||||
become: yes
|
||||
|
||||
# Arch configuration
|
||||
|
||||
- name: Install ccache
|
||||
pacman:
|
||||
name: ccache
|
||||
state: present
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
- name: Enable makepkg ccache
|
||||
replace:
|
||||
path: /etc/makepkg.conf
|
||||
regexp: '^BUILDENV=(.+)!ccache(.+)$'
|
||||
replace: 'BUILDENV=\1ccache\2'
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
- name: Set makepkg MAKEFLAGS
|
||||
replace:
|
||||
path: /etc/makepkg.conf
|
||||
regexp: '^#? *MAKEFLAGS=(.+)-j[0-9]+(.+)$'
|
||||
replace: "MAKEFLAGS=\\1-j{{ j }}\\2"
|
||||
become: yes
|
||||
vars:
|
||||
j: "{{ [ansible_processor_nproc - 1, 1] | max | int }}"
|
||||
when: arch_based
|
||||
|
||||
- name: Enable makepkg color
|
||||
replace:
|
||||
path: /etc/makepkg.conf
|
||||
regexp: '^BUILDENV=(.+)!color(.+)$'
|
||||
replace: 'BUILDENV=\1color\2'
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
- name: Enable pacman colors
|
||||
lineinfile:
|
||||
path: /etc/pacman.conf
|
||||
regexp: "^#?Color"
|
||||
line: "Color"
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
- name: Enable pacman pacman
|
||||
lineinfile:
|
||||
path: /etc/pacman.conf
|
||||
regexp: "^#?ILoveCandy"
|
||||
line: "ILoveCandy"
|
||||
insertafter: "^#?Color"
|
||||
become: yes
|
||||
when: arch_based
|
||||
|
||||
# Manjaro configuration
|
||||
|
||||
- name: Remove Manjaro's pamac
|
||||
pacman:
|
||||
name: pamac
|
||||
state: absent
|
||||
become: yes
|
||||
when: arch_based and False # I'm trying to remember why I usually delete this thing
|
||||
|
||||
# Xorg configuration
|
||||
|
||||
- name: Check if there is nvidia-xrun is installed
|
||||
stat:
|
||||
path: /etc/X11/nvidia-xorg.conf
|
||||
register: nvidia_xrun
|
||||
when: display_manager == 'x11'
|
||||
|
||||
- name: Add nvidia-xrun xorg config directory
|
||||
set_fact:
|
||||
xorg_common_config_dirs: "{{ xorg_default_config_dirs + xorg_nvidia_config_dirs }}"
|
||||
vars:
|
||||
xorg_default_config_dirs:
|
||||
- /etc/X11/xorg.conf.d
|
||||
xorg_nvidia_config_dirs: "{{ ['/etc/X11/nvidia-xorg.conf.d'] if nvidia_xrun.stat.exists else [] }}"
|
||||
when: display_manager == 'x11'
|
||||
|
||||
- name: Configure Xorg keyboard layout
|
||||
copy:
|
||||
src: xorg/keyboard.conf
|
||||
dest: "{{ item }}/00-keyboard.conf"
|
||||
become: yes
|
||||
when: display_manager == 'x11'
|
||||
notify: etc changed
|
||||
loop: "{{ xorg_common_config_dirs }}"
|
||||
|
||||
- name: Check if there is Intel backlight
|
||||
stat:
|
||||
path: /sys/class/backlight/intel_backlight
|
||||
register: intel_backlight
|
||||
when: display_manager == 'x11'
|
||||
|
||||
- name: Install Intel video drivers (Arch based)
|
||||
pacman:
|
||||
name: xf86-video-intel
|
||||
# state: "{{ intel_backlight.stat.exists }}"
|
||||
state: present
|
||||
become: yes
|
||||
when: display_manager == 'x11' and intel_backlight.stat.exists and arch_based
|
||||
|
||||
- name: Configure Xorg Intel backlight
|
||||
copy:
|
||||
src: xorg/intel_backlight.conf
|
||||
dest: "{{ item }}/20-intel_backlight.conf"
|
||||
become: yes
|
||||
when: display_manager == 'x11' and intel_backlight.stat.exists
|
||||
notify: etc changed
|
||||
loop: "{{ xorg_common_config_dirs }}"
|
||||
|
||||
- name: Configure Xorg touchpad behaviour
|
||||
copy:
|
||||
src: xorg/touchpad.conf
|
||||
dest: "{{ item }}/30-touchpad.conf"
|
||||
become: yes
|
||||
when: display_manager == 'x11'
|
||||
notify: etc changed
|
||||
loop: "{{ xorg_common_config_dirs }}"
|
||||
|
||||
- name: Configure Xorg joystick behaviour
|
||||
copy:
|
||||
src: xorg/joystick.conf
|
||||
dest: "{{ item }}/50-joystick.conf"
|
||||
become: yes
|
||||
when: display_manager == 'x11'
|
||||
notify: etc changed
|
||||
loop: "{{ xorg_common_config_dirs }}"
|
||||
|
||||
# Numlock on boot
|
||||
|
||||
- name: set numlock on boot
|
||||
copy:
|
||||
src: getty.service
|
||||
dest: /etc/systemd/system/getty@.service.d/override.conf
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- systemd changed
|
||||
when: auto_numlock
|
||||
|
||||
- name: Unset numlock on boot
|
||||
file:
|
||||
path: /etc/systemd/system/getty@.service.d/override.conf
|
||||
state: absent
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- systemd changed
|
||||
when: not auto_numlock
|
||||
|
||||
# TLP configuration
|
||||
|
||||
- name: Install TLP (Arch based)
|
||||
pacman:
|
||||
name: tlp
|
||||
state: present
|
||||
when: arch_based
|
||||
become: yes
|
||||
|
||||
- name: Start/enable TLP
|
||||
systemd:
|
||||
name: tlp
|
||||
state: started
|
||||
enabled: yes
|
||||
become: yes
|
||||
notify: etc changed
|
||||
|
||||
# Network configuration
|
||||
|
||||
- name: Uninstall networkmanager
|
||||
pacman:
|
||||
name: networkmanager
|
||||
state: absent
|
||||
when: arch_based
|
||||
become: yes
|
||||
|
||||
- name: Install dhcpcd (Arch based)
|
||||
pacman:
|
||||
name: dhcpcd
|
||||
state: present
|
||||
when: arch_based
|
||||
become: yes
|
||||
|
||||
- name: Start/enable dhcpcd
|
||||
systemd:
|
||||
name: dhcpcd
|
||||
state: started
|
||||
enabled: yes
|
||||
become: yes
|
||||
notify: etc changed
|
||||
|
||||
- name: Install wpa_supplicant (Arch based)
|
||||
pacman:
|
||||
name: wpa_supplicant
|
||||
state: present
|
||||
when: arch_based
|
||||
become: yes
|
||||
|
||||
- name: Configure wpa_supplicant
|
||||
template:
|
||||
src: wpa_supplicant.conf.j2
|
||||
dest: /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
notify:
|
||||
- etc changed
|
||||
- wpa_supplicant changed
|
||||
become: yes
|
||||
tags:
|
||||
- wificonf
|
||||
|
||||
- name: Prepare directory for wpa_supplicant service override
|
||||
file:
|
||||
path: /etc/systemd/system/wpa_supplicant@.service.d
|
||||
state: directory
|
||||
mode: "u=rwx,g=rx,o=rx"
|
||||
become: yes
|
||||
|
||||
- name: Make wpa_supplicant use a common configuration file
|
||||
copy:
|
||||
src: wpa_supplicant.service
|
||||
dest: /etc/systemd/system/wpa_supplicant@.service.d/override.conf
|
||||
register: wpa_supplicant_systemd
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
|
||||
- name: Start/enable wpa_supplicant
|
||||
systemd:
|
||||
name: "wpa_supplicant@{{ item }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
# Can't wait for handlers reload systemd daemon,
|
||||
# but flushing is a bit much, so:
|
||||
daemon_reload: "{{ wpa_supplicant_systemd.changed }}"
|
||||
become: yes
|
||||
notify: etc changed
|
||||
loop: "{{ ansible_interfaces }}"
|
||||
when: "item.startswith('wl')"
|
||||
# Could probably use something better like
|
||||
# listing /sys/class/ieee80211/*/device/net/
|
||||
|
||||
|
||||
# Time synchronisation
|
||||
|
||||
- name: Mask systemd-timesyncd
|
||||
systemd:
|
||||
name: systemd-timesyncd
|
||||
state: stopped
|
||||
enabled: no
|
||||
masked: yes
|
||||
become: yes
|
||||
notify: etc changed
|
||||
when: arch_based
|
||||
|
||||
- name: Install chrony
|
||||
pacman:
|
||||
name: chrony
|
||||
state: present
|
||||
when: arch_based
|
||||
become: yes
|
||||
|
||||
- name: Configure chrony
|
||||
copy:
|
||||
src: chrony.conf
|
||||
dest: /etc/chrony.conf
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- "chrony reconfigured"
|
||||
|
||||
- name: Enable chronyd
|
||||
systemd:
|
||||
name: chronyd
|
||||
enabled: yes
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- "chrony reconfigured"
|
||||
|
||||
- name: Configure dhcpcd chrony hook
|
||||
copy:
|
||||
src: dhcpcd.exit-hook
|
||||
dest: /etc/dhcpcd.exit-hook
|
||||
become: yes
|
||||
notify: etc changed
|
||||
|
||||
# TODO Hibernation, if that's relevant
|
||||
# $ sudo blkid | grep 'TYPE="swap"'
|
||||
# $ sudoedit /etc/default/grub
|
||||
# Add resume=UUID=<UUID-of-swap-partition> to GRUB_CMDLINE_LINUX_DEFAULT
|
||||
# $ sudo grub-mkconfig -o /boot/grub/grub.cfg
|
|
@ -0,0 +1,90 @@
|
|||
# Giving configuration update rights to wpa_cli
|
||||
ctrl_interface=/run/wpa_supplicant
|
||||
ctrl_interface_group=wheel
|
||||
update_config=1
|
||||
|
||||
# AP scanning
|
||||
ap_scan=1
|
||||
|
||||
# ISO/IEC alpha2 country code in which the device is operating
|
||||
country=NL
|
||||
|
||||
{% set password_store_path = lookup('env', 'PASSWORD_STORE_DIR') or ansible_user_dir + '/.password-store/' %}
|
||||
{% set wifi_pass_paths = query('fileglob', password_store_path + 'wifi/*.gpg') %}
|
||||
{% set names = wifi_pass_paths | map('regex_replace', '^.+/wifi/(.+).gpg$', '\\1') | sort%}
|
||||
{% for name in names %}
|
||||
{#
|
||||
community.general.passwordstore doesn't support path with spaces in it,
|
||||
so we're using a `ssid` attribute, which default to the names for SSIDs without space.
|
||||
#}
|
||||
{% set suffixes = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=suffixes') or [''] %}
|
||||
{% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %}
|
||||
{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or 'wpa' %}
|
||||
{% set pass = lookup('community.general.passwordstore', 'wifi/' + name) %}
|
||||
# {{ name }}
|
||||
{% for suffix in suffixes %}
|
||||
network={
|
||||
ssid="{{ ssid }}{{ suffix }}"
|
||||
{% if type == 'wpa' %}
|
||||
psk="{{ pass }}"
|
||||
{% elif type == 'wep' %}
|
||||
key_mgmt=NONE
|
||||
wep_key0={{ pass }}
|
||||
{% elif type == 'open' %}
|
||||
key_mgmt=NONE
|
||||
{% else %}
|
||||
# Error, unknown type: {{ type }}
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
{# REFERENCES
|
||||
|
||||
# WPA
|
||||
network={
|
||||
ssid="WPA_SSID"
|
||||
psk="XXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
}
|
||||
|
||||
# WEP
|
||||
network={
|
||||
ssid="WEP_SSID"
|
||||
key_mgmt=NONE
|
||||
wep_key0=FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
}
|
||||
|
||||
# Open
|
||||
network={
|
||||
ssid="OPEN_SSID"
|
||||
key_mgmt=NONE
|
||||
}
|
||||
|
||||
# eduroam password
|
||||
network={
|
||||
ssid="eduroam"
|
||||
key_mgmt=WPA-EAP
|
||||
eap=PEAP
|
||||
identity="id@univ.tld"
|
||||
password="hunter2"
|
||||
}
|
||||
|
||||
# eduroam certificate
|
||||
network={
|
||||
ssid="eduroam"
|
||||
key_mgmt=WPA-EAP
|
||||
# pairwise=CCMP
|
||||
pairwise=CCMP TKIP
|
||||
group=CCMP TKIP
|
||||
eap=TLS
|
||||
ca_cert="/path/to/ca.pem"
|
||||
identity="id@univ.tld"
|
||||
domain_suffix_match="wifi.univ.tld"
|
||||
client_cert="/path/to/cert.pem"
|
||||
private_key="/path/to/key.pem"
|
||||
private_key_passwd="hunter2"
|
||||
phase2="auth="
|
||||
#anonymous_identity=""
|
||||
}
|
||||
|
||||
#}
|
|
@ -149,16 +149,10 @@ set $WS9 9
|
|||
set $WS10 10
|
||||
|
||||
# Workspace output
|
||||
workspace "$WS1" output eDP-1-1
|
||||
workspace "$WS2" output HDMI-0
|
||||
workspace "$WS3" output eDP-1-1
|
||||
workspace "$WS4" output HDMI-0
|
||||
workspace "$WS5" output eDP-1-1
|
||||
workspace "$WS6" output HDMI-0
|
||||
workspace "$WS7" output eDP-1-1
|
||||
workspace "$WS8" output HDMI-0
|
||||
workspace "$WS9" output eDP-1-1
|
||||
workspace "$WS10" output HDMI-0
|
||||
{% set screens = ["HDMI-0", "eDP-1-1"] %}
|
||||
{% for i in range(1, 11) %}
|
||||
workspace "$WS{{ i }}" output {{ screens[(i - 1) % (screens | length)] }}
|
||||
{% endfor %}
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $WS1; exec ~/.config/i3/focus_windows
|
||||
|
@ -373,14 +367,18 @@ bindsym $mod+F5 exec --no-startup-id xautolock -enable
|
|||
#exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Password remembering
|
||||
#exec --no-startup-id gnome-keyring-daemon # Password remembering
|
||||
# exec --no-startup-id urxvtd -q -f # urxvt daemon
|
||||
{% if auto_numlock %}
|
||||
exec --no-startup-id numlockx on # Activate Num lock
|
||||
{% endif %}
|
||||
exec --no-startup-id unclutter -root # Hide mouse cursor after some time
|
||||
#exec --no-startup-id dunst # Notifications (handled by systemd)
|
||||
exec --no-startup-id keynav # Keyboard cursor controller
|
||||
#exec --no-startup-id mpd # Music Player Daemon (handled by systemd)
|
||||
# exec --no-startup-id ~/.config/i3/ashuffle # MPD Auto-refill
|
||||
exec --no-startup-id autorandr --change --force # Screen configuration and everything that depends on it
|
||||
{% if has_battery %}
|
||||
exec --no-startup-id ~/.config/i3/batteryNotify -d # Battery state notification
|
||||
{% endif %}
|
||||
# exec --no-startup-id ~/.config/i3/aw_start # Activity tracker
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ if __name__ == "__main__":
|
|||
|
||||
# Personal
|
||||
PERSONAL_THEME = 0
|
||||
Bar.addSectionAll(KeystoreProvider(theme=PERSONAL_THEME), BarGroupType.RIGHT)
|
||||
# Bar.addSectionAll(KeystoreProvider(theme=PERSONAL_THEME), BarGroupType.RIGHT)
|
||||
# Bar.addSectionAll(NotmuchUnreadProvider(dir='~/.mail/', theme=PERSONAL_THEME), BarGroupType.RIGHT)
|
||||
# Bar.addSectionAll(TodoProvider(dir='~/.vdirsyncer/currentCalendars/', theme=PERSONAL_THEME), BarGroupType.RIGHT)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd ~/.dotfiles/config/automatrop
|
||||
ansible-playbook --diff playbooks/default.yml --limit $HOSTNAME --connection local "$@"
|
|
@ -1,340 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# DEPRECATED
|
||||
|
||||
# set -x
|
||||
|
||||
# Allows to install software
|
||||
|
||||
# Find list of available installers in order of preference
|
||||
# Read wanted packages and their availability
|
||||
# Install packages per installer (after prompting)
|
||||
|
||||
# COMMON FUNCTIONS
|
||||
|
||||
# GLOBAL VARIABLES
|
||||
|
||||
# TODO Lock or temp folder
|
||||
CACHE_DIR="${XDG_CACHE_DIR:-$HOME/.cache}/installSoftware"
|
||||
INSTALLERS_DIR="${CACHE_DIR}/installers"
|
||||
INSTALLERS_LIST="${CACHE_DIR}/installers.list"
|
||||
|
||||
# TODO Package groups
|
||||
|
||||
# INSTALLER SPECIFIC FUNCTIONS
|
||||
|
||||
# Test if available
|
||||
available_pkgbuild() {
|
||||
true
|
||||
}
|
||||
|
||||
available_Tapt() {
|
||||
[ -f /data/data/com.termux/files/usr/bin/apt ]
|
||||
}
|
||||
|
||||
# Update the database
|
||||
update_Rpacman() {
|
||||
sudo pacman -Syu --noconfirm
|
||||
}
|
||||
|
||||
update_Ryay() {
|
||||
yay -Syu --noconfirm --devel
|
||||
}
|
||||
|
||||
update_Rapt() {
|
||||
# TODO non-interactive
|
||||
sudo apt update -y
|
||||
sudo apt upgrade -y
|
||||
}
|
||||
|
||||
# Test if installed
|
||||
|
||||
installed_Rpacman() { # packageName
|
||||
pacman -Qq "$1" &> /dev/null
|
||||
}
|
||||
|
||||
installed_Ryay() { # package
|
||||
installed_Rpacman "$@"
|
||||
}
|
||||
|
||||
installed_pip() { # package
|
||||
pip show "$@" > /dev/null
|
||||
}
|
||||
|
||||
installed_makepkg() { # package
|
||||
installed_Rpacman "$@"
|
||||
}
|
||||
|
||||
installed_pkgbuild() { # package
|
||||
installed_Rpacman "$@"
|
||||
# TODO Might need all the systems package too
|
||||
}
|
||||
|
||||
installed_apt() { # package
|
||||
dpkg -s "$1" &> /dev/null
|
||||
}
|
||||
|
||||
# Test if available in the repositories
|
||||
|
||||
installable_aur() {
|
||||
curl --fail --silent --head "https://aur.archlinux.org/packages/$@" > /dev/null
|
||||
}
|
||||
|
||||
installable_Rpacman() {
|
||||
pacman -Si "$1" &> /dev/null
|
||||
}
|
||||
|
||||
installable_Ryay() {
|
||||
# yay -Ss "$1" > /dev/null
|
||||
installable_aur
|
||||
}
|
||||
|
||||
installable_pkgbuild() {
|
||||
installable_aur
|
||||
}
|
||||
|
||||
installable_makepkg() {
|
||||
installable_aur
|
||||
}
|
||||
|
||||
installable_apt() {
|
||||
apt-cache show "$1" &> /dev/null
|
||||
}
|
||||
|
||||
# Tell if it hadles mutiple argument for install
|
||||
|
||||
multiinstall_pacman() {
|
||||
true
|
||||
}
|
||||
|
||||
multiinstall_pip() {
|
||||
true
|
||||
}
|
||||
|
||||
multiinstall_apt() {
|
||||
true
|
||||
}
|
||||
|
||||
# Really install
|
||||
|
||||
install_Rpacman() {
|
||||
sudo pacman -S --needed --noconfirm $@
|
||||
}
|
||||
|
||||
install_Ryay() {
|
||||
yay -S --needed --noconfirm $@
|
||||
}
|
||||
|
||||
install_Tapt() {
|
||||
apt install -y $@
|
||||
}
|
||||
|
||||
install_Rapt() {
|
||||
sudo apt install -y $@
|
||||
}
|
||||
|
||||
install_Rpip() {
|
||||
sudo pip install $@
|
||||
}
|
||||
|
||||
install_Upip() {
|
||||
pip install --user $@
|
||||
}
|
||||
|
||||
installable_Rmakepkg() {
|
||||
old_pwd="$PWD"
|
||||
TMP_DIR="$(mktemp -d /tmp/pkgbuild.XXXXXXXXXX)"
|
||||
cd "$TMP_DIR"
|
||||
wget "https://aur.archlinux.org/cgit/aur.git/snapshot/$1.tar.gz"
|
||||
tar xzvf "$1.tar.gz"
|
||||
cd "$1"
|
||||
makepkg -si
|
||||
cd "$old_pwd"
|
||||
rm -rf "$TMP_DIR"
|
||||
}
|
||||
|
||||
# GENERIC INSTALLER FUNCTIONS
|
||||
|
||||
installerCanonicalName() { # installerName
|
||||
echo "${1:1}"
|
||||
}
|
||||
|
||||
notImplementedFallback() { # command installerName
|
||||
echo "[NIMPL] Not implemented: command $1_$2"
|
||||
false
|
||||
}
|
||||
|
||||
# Wrapper to run a command for an installer
|
||||
commandInstaller() { # command installerName fallback args...
|
||||
# echo "[DEBUG] commandInstaller $*"
|
||||
command="$1"
|
||||
installerName="$2"
|
||||
fallback="$3"
|
||||
shift; shift; shift
|
||||
installerCName="$(installerCanonicalName "$installerName")"
|
||||
if command -v "${command}_$installerName" > /dev/null
|
||||
then
|
||||
"${command}_$installerName" "$@"
|
||||
elif command -v "${command}_$installerCName" > /dev/null
|
||||
then
|
||||
"${command}_$installerCName" "$@"
|
||||
else
|
||||
$fallback "$command" "$installerName" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# INSTALLER LIST FUNCTIONS
|
||||
|
||||
availableInstallerFallback() { # command installerName
|
||||
command -v "$(installerCanonicalName "$2")" > /dev/null
|
||||
}
|
||||
|
||||
availableInstaller() { # installerName
|
||||
commandInstaller "available" "$1" availableInstallerFallback
|
||||
}
|
||||
|
||||
# Clears the list of installers to use
|
||||
resetInstallers() {
|
||||
rm -f "$INSTALLERS_LIST"
|
||||
touch "$INSTALLERS_LIST"
|
||||
rm -rf "$INSTALLERS_DIR"
|
||||
mkdir -p "$INSTALLERS_DIR"
|
||||
}
|
||||
|
||||
addInstaller() { # installername
|
||||
if availableInstaller "$1"
|
||||
then
|
||||
echo "$1" >> "$INSTALLERS_LIST"
|
||||
rm -f "$INSTALLERS_DIR/$1"
|
||||
touch "$INSTALLERS_DIR/$1"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
listInstallers() {
|
||||
cat "$INSTALLERS_LIST"
|
||||
}
|
||||
|
||||
hasInstaller() { # installerName
|
||||
[ -f "${INSTALLERS_DIR}/$1" ]
|
||||
}
|
||||
|
||||
|
||||
# Installers that install in the user directory
|
||||
addUserInstallers() {
|
||||
addInstaller Tapt # Termux
|
||||
# addInstaller Umakepkg # TODO broken
|
||||
addInstaller Upip
|
||||
# addInstaller Upkgbuild
|
||||
}
|
||||
|
||||
# Installers that install with the system package manager
|
||||
addSystemInstallers() {
|
||||
addInstaller Rapt
|
||||
addInstaller Rpacman
|
||||
addInstaller Ryay || addInstaller Rmakepkg
|
||||
}
|
||||
|
||||
# Installers that install in the system root but not tracked with system package manager
|
||||
addRootInstallers() {
|
||||
addInstaller Rnode
|
||||
addInstaller Rpip
|
||||
addInstaller Rpkgbuild
|
||||
|
||||
}
|
||||
|
||||
# UPDATING INSTALLER DATABASES
|
||||
|
||||
updateInstallers() {
|
||||
for installerName in $(listInstallers)
|
||||
do
|
||||
commandInstaller "update" "$installerName" true
|
||||
done
|
||||
}
|
||||
|
||||
# MARKING PACKAGES TO INSTALL
|
||||
|
||||
markPackage() { # installer package
|
||||
# echo "[DEBUG] Marked $*"
|
||||
echo "$2" >> "$INSTALLERS_DIR/$1"
|
||||
}
|
||||
|
||||
# Test if a package is installed
|
||||
installedPackage() { # package
|
||||
for installerName in $(listInstallers)
|
||||
do
|
||||
if commandInstaller "installed" "$installerName" notImplementedFallback "$1"
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
installablePackageBy() { # installer package
|
||||
commandInstaller "installable" "$1" notImplementedFallback "$2"
|
||||
}
|
||||
|
||||
# List packages to install by given installer
|
||||
listPackagesForInstaller() { # installer
|
||||
cat "$INSTALLERS_DIR/$1"
|
||||
}
|
||||
|
||||
isToInstall() { # package
|
||||
for installerName in $(listInstallers)
|
||||
do
|
||||
listPackagesForInstaller "$installerName" | grep -q "^$1\$" && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Mark package to installer list where available
|
||||
tryPackage() { # packageNames
|
||||
# If package is already installed or marked to install, skip
|
||||
for package in "$@"
|
||||
do
|
||||
installedPackage "$package" && return 0
|
||||
isToInstall "$package" && return 0
|
||||
|
||||
done
|
||||
# For each installer
|
||||
for installerName in $(listInstallers)
|
||||
do
|
||||
# For each name given
|
||||
for package in "$@"
|
||||
do
|
||||
# Mark if name available to installer
|
||||
if installablePackageBy "$installerName" "$package"
|
||||
then
|
||||
markPackage "$installerName" "$package"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
done
|
||||
echo "[ERR] Cannot install package with aliases: $*"
|
||||
return 1
|
||||
}
|
||||
|
||||
i() {
|
||||
tryPackage "$@"
|
||||
}
|
||||
|
||||
installPackages() {
|
||||
for installerName in $(listInstallers)
|
||||
do
|
||||
# If we can install multiple packages in one go
|
||||
if commandInstaller "multiinstall" "$installerName" false
|
||||
then
|
||||
packages=$(listPackagesForInstaller "$installerName")
|
||||
[ -z "$packages" ] && continue
|
||||
commandInstaller "install" "$installerName" notImplementedFallback $packages
|
||||
else
|
||||
for packageName in $(listPackagesForInstaller "$installerName")
|
||||
do
|
||||
commandInstaller "install" "$installerName" notImplementedFallback "$packageName"
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Git for /etc
|
||||
sudo pacman -S etckeeper --needed
|
||||
(cd /etc/; sudo git config user.name "etckeeper on $(cat /etc/hostname)"; sudo git config user.email "etckeeper@$(cat /etc/hostname)")
|
||||
[ ! -d /etc/.git ] && sudo etckeeper init
|
||||
sudo etckeeper commit "install-arch script: begin"
|
||||
|
||||
# Install yay
|
||||
# TODO Use yay-bin
|
||||
sudo pacman -S base-devel --needed
|
||||
if ! pacman -Q yay-bin &> /dev/null
|
||||
then
|
||||
mkdir -p $HOME/.cache/yay
|
||||
cd $HOME/.cache/yay
|
||||
curl -L https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz | tar xzvf -
|
||||
cd yay-bin
|
||||
makepkg -si
|
||||
fi
|
||||
|
||||
# Keyboard layout
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "us_qwerty-fr"
|
||||
EndSection
|
||||
' | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||
|
||||
# Backlight (for Intel Devices)
|
||||
if [ -d /sys/class/backlight/intel_backlight ]
|
||||
then
|
||||
sudo pacman -S xf86-video-intel --needed
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
Section "Device"
|
||||
Identifier "Intel Graphics"
|
||||
Driver "intel"
|
||||
Option "Backlight" "intel_backlight"
|
||||
EndSection
|
||||
' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
|
||||
fi
|
||||
|
||||
# Touchpad
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
Section "InputClass"
|
||||
Identifier "touchpad"
|
||||
Driver "libinput"
|
||||
MatchIsTouchpad "on"
|
||||
Option "Tapping" "on"
|
||||
EndSection
|
||||
' | sudo tee /etc/X11/xorg.conf.d/30-touchpad.conf
|
||||
|
||||
# Disable joystick as mouse
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
Section "InputClass"
|
||||
Identifier "joystick catchall"
|
||||
MatchIsJoystick "on"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
Driver "joystick"
|
||||
Option "StartKeysEnabled" "False" #Disable mouse
|
||||
Option "StartMouseEnabled" "False" #support
|
||||
EndSection
|
||||
' | sudo tee /etc/X11/xorg.conf.d/50-joystick.conf
|
||||
|
||||
# Install same rules with nvidia-xrun
|
||||
if [ -d /etc/X11/nvidia-xorg.conf.d ]
|
||||
then
|
||||
function link { # filename
|
||||
sudo ln -s ../xorg.conf.d/$1 /etc/X11/nvidia-xorg.conf.d/$1
|
||||
}
|
||||
link 00-keyboard.conf
|
||||
link 20-intel.conf # Yep
|
||||
link 30-touchpad.conf
|
||||
link 50-joystick.conf
|
||||
fi
|
||||
exit 0
|
||||
|
||||
# Uninstall Manjaro's pamac
|
||||
if pacman -Q pamac &> /dev/null
|
||||
then
|
||||
sudo pacman -Rsc pamac --noconfirm
|
||||
fi
|
||||
|
||||
# Ccache
|
||||
sudo pacman -S ccache --needed
|
||||
sudo sed 's|BUILDENV=\(.\+\)!ccache\(.\+\)|BUILDENV=\1ccache\2|' /etc/makepkg.conf -i
|
||||
|
||||
# Makepkg config
|
||||
sudo sed 's|BUILDENV=\(.\+\)!color\(.\+\)|BUILDENV=\1color\2|' /etc/makepkg.conf -i
|
||||
|
||||
# Pacman config
|
||||
sudo sed 's|#Color|Color\nILoveCandy|' /etc/pacman.conf -i
|
||||
|
||||
# TLP
|
||||
sudo pacman -S tlp --needed
|
||||
# sudo sed 's|SATA_LINKPWR_ON_BAT=min_power|SATA_LINKPWR_ON_BAT=max_performance|' /etc/default/tlp -i
|
||||
sudo systemctl enable tlp.service tlp-sleep.service --now
|
||||
sudo systemctl disable systemd-rfkill.service systemd-rfkill.socket
|
||||
sudo tlp start
|
||||
|
||||
# Numlock on boot
|
||||
echo "# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/bin/sh -c 'setleds +num < /dev/%I'
|
||||
" | sudo tee /etc/systemd/system/getty@.service.d/override.conf
|
||||
|
||||
# Makeflags
|
||||
# I'd rather have updates not take my whole CPU
|
||||
# sudo sed "s|#MAKEFLAGS=\"-j2\"|MAKEFLAGS=\"-j$(nproc)\"|" /etc/makepkg.conf -i
|
||||
|
||||
# DHCPCD
|
||||
sudo pacman -S dhcpcd --needed
|
||||
sudo systemctl enable dhcpcd --now
|
||||
|
||||
# Time synchronisation
|
||||
sudo pacman -S chrony --needed
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
server 0.europe.pool.ntp.org offline
|
||||
server 1.europe.pool.ntp.org offline
|
||||
server 2.europe.pool.ntp.org offline
|
||||
server 3.europe.pool.ntp.org offline
|
||||
driftfile /etc/chrony.drift
|
||||
rtconutc
|
||||
rtcsync' | sudo tee /etc/chrony.conf
|
||||
sudo systemctl enable chronyd --now
|
||||
echo '# File wrote by ~/.dotfiles/config/scripts/install-arch
|
||||
|
||||
if $if_up; then
|
||||
chronyc online
|
||||
elif $if_down; then
|
||||
chronyc offline
|
||||
fi
|
||||
' | sudo tee /etc/dhcpcd.exit-hook
|
||||
|
||||
# Grub other OS
|
||||
sudo pacman -S os-prober --needed
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
# Manual
|
||||
|
||||
echo '
|
||||
# Hibernation:
|
||||
sudo blkid | grep 'TYPE="swap"'
|
||||
sudoedit /etc/default/grub
|
||||
# Add resume=UUID=<UUID-of-swap-partition> to GRUB_CMDLINE_LINUX_DEFAULT
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
'
|
||||
|
||||
echo '
|
||||
# wpa_supplicant (Wi-Fi)
|
||||
sudo pacman -S wpa_supplicant
|
||||
ip link
|
||||
[ ! -f /etc/wpa_supplicant/wpa_supplicant.conf ] && wpa_passphrase 'DUMMY' 'JustToHaveAConfigFiel' > /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
# Replace wlo1 with the correct interface
|
||||
sudo systemctl start wpa_supplicant@wlo1.service
|
||||
sudo ln -s wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlo1.conf
|
||||
'
|
||||
|
||||
sudo etckeeper commit "install-arch script: end"
|
|
@ -1,383 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# DEPRECATED
|
||||
|
||||
# List of the software I use divided by categories.
|
||||
# Oh and it asks the category you want to install on
|
||||
# the running machine too.
|
||||
|
||||
# TODO Not tested with Debian derivate
|
||||
# TODO Not tested on home folder
|
||||
|
||||
CONFIG_FILE="${XDG_CONFIG_DIR:=$HOME/.config}/softwareList"
|
||||
mkdir -p $XDG_CONFIG_DIR
|
||||
touch $CONFIG_FILE
|
||||
. $CONFIG_FILE
|
||||
|
||||
prompt() { # text
|
||||
res="none"
|
||||
while [ "$res" = "none" ]
|
||||
do
|
||||
printf "%s [yn] " "$1"
|
||||
read -r yn
|
||||
case $yn in
|
||||
[Yy]* ) return 0;;
|
||||
[Nn]* ) return 1;;
|
||||
* ) echo "Please answer y or n.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
uservar() { # var text
|
||||
if [ -z "${!1}" ]
|
||||
then
|
||||
prompt "${2}" && res=true || res=false
|
||||
export "$1"="$res"
|
||||
echo "$1"="$res" >> "$CONFIG_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Please answer some questions about this machine and what you want to do on it:"
|
||||
|
||||
# Setting variables
|
||||
[ -d /data/data/com.termux/files ] && TERMUX=true || TERMUX=false
|
||||
$TERMUX && INSTALL_GUI=false
|
||||
[ "$USER" = "root" ] && SUPERUSER=true
|
||||
|
||||
uservar SUPERUSER "Have root permissions?"
|
||||
uservar INSTALL_GUI "Install a GUI environment?"
|
||||
$INSTALL_GUI && INSTALL_X=true
|
||||
INSTALL_WAYLAND=false
|
||||
uservar INSTALL_PASSWORD "Handle password?"
|
||||
uservar INSTALL_MAIL "Read/send mail?"
|
||||
uservar INSTALL_ORGANISATION "Handle agenda/contacts?"
|
||||
uservar INSTALL_HOUSEKEEPING "Do some housekeeping?"
|
||||
uservar INSTALL_FPGA "Handle FPGAs?"
|
||||
uservar INSTALL_UTILITIES "Extra utilities?"
|
||||
uservar INSTALL_DOCUMENT "Create documents?"
|
||||
uservar INSTALL_IMAGE "Do image editing?"
|
||||
uservar INSTALL_MUSIC "Play/edit music?"
|
||||
uservar INSTALL_VIDEO "Play/edit videos?"
|
||||
if $INSTALL_GUI
|
||||
then
|
||||
uservar INSTALL_WINE "Run Windows applications?"
|
||||
else
|
||||
INSTALL_WINE=false
|
||||
fi
|
||||
|
||||
echo "(you can change those answers later in $CONFIG_FILE)"
|
||||
|
||||
# Preparing installers
|
||||
. $HOME/.config/scripts/common/installSoftware
|
||||
|
||||
resetInstallers
|
||||
$SUPERUSER && ! $TERMUX && addSystemInstallers
|
||||
addUserInstallers
|
||||
|
||||
echo "Installers that will be used:"
|
||||
listInstallers | sed 's/^/- /'
|
||||
|
||||
echo "Updating databases & packages"
|
||||
# updateInstallers # DEBUG put back
|
||||
|
||||
echo "Finding packages to install"
|
||||
# Note: i A B: will try A then B for each installer
|
||||
# i A || i B: will try A for each installer, then B for each installer
|
||||
|
||||
# Package managers (install first)
|
||||
i yay-bin
|
||||
i python-pip python3-pip pip3
|
||||
|
||||
# TODO Install first and recharge installers
|
||||
|
||||
# Utils used by those scripts
|
||||
i base coreutils # Basic shell commands (ls, rm, cp...)
|
||||
i bash # Shell
|
||||
i grep # Text finder
|
||||
i sed # Text replacer
|
||||
i tar # Archive tool
|
||||
i openssl-tool openssl-tools # machines script verification
|
||||
|
||||
# Various utilities
|
||||
|
||||
$SUPERUSER && i sudo tsu
|
||||
$TERMUX && i termux-api
|
||||
|
||||
# Shell utilities
|
||||
i moreutils # Advanced shell commands (ts, sponge...)
|
||||
i tmux # Terminal multiplexer
|
||||
i bash-completion # Shell completions
|
||||
i fzf # Fancy file finder
|
||||
i highlight # Syntax highlighter (TODO No termux)
|
||||
i powerline-go-bin powerline-go # Nice prompt (potential problem: requires go-pie)
|
||||
|
||||
i zsh # Shell
|
||||
i antigen # ZSH plugins
|
||||
# TODO Arch only for the following (antigen takes over else)
|
||||
i zsh-autosuggestions # Shell suggestions
|
||||
i zsh-completions # Shell completions
|
||||
i zsh-history-substring-search # Shell config
|
||||
i zsh-syntax-highlighting # Shell highlighting
|
||||
i rxvt-unicode-terminfo # So it doesn't act weird in root
|
||||
|
||||
# Text edition
|
||||
(i neovim nvim && i python-neovim python3-neovim) || i vim || i vi # Text editor
|
||||
|
||||
# Monitoring utilities
|
||||
i ncdu # Explore directories by weight on disk
|
||||
i lsof # Find who/what uses the files (TODO No termux)
|
||||
i pv # Allow to show progress in pipe
|
||||
|
||||
# Network utilities
|
||||
i openssh # SSH connections
|
||||
# i proxytunnel # Proxy connections through HTTPS (TODO No termux)
|
||||
i curl # Transfer URL
|
||||
i wget # Download URL
|
||||
i gnu-netcat netcat # Network piping
|
||||
i socat # Multi-purpose relay
|
||||
i rsync # Remote file-copying tool
|
||||
i speedtest-cli # Network speed benchmarker (TODO No termux)
|
||||
i bind-tools dnsutils # DNS queryier
|
||||
i whois # Domain name queryier
|
||||
|
||||
# Archives utilities
|
||||
i unzip # Unarchive ZIP files
|
||||
i unrar # Unarchive RAR files
|
||||
i p7zip # Unarchive 7z files
|
||||
|
||||
# Password handling
|
||||
if $INSTALL_PASSWORD
|
||||
then
|
||||
i pwgen # Password generator
|
||||
i pass # Password manager
|
||||
if $INSTALL_GUI
|
||||
then
|
||||
i rofi-pass # Password selector
|
||||
# i autopass.cr # Password selector
|
||||
fi
|
||||
fi
|
||||
|
||||
if $INSTALL_MAIL
|
||||
then
|
||||
# i offlineimap # Synchronize IMAP (legacy)
|
||||
i isync mbsync # Synchronize IMAP
|
||||
i msmtp # Send mail via SMTP
|
||||
i notmuch # Index mail
|
||||
i neomutt || i mutt # CLI mail client
|
||||
i lynx # CLI web browser (for HTML mail)
|
||||
i tiv # CLI image viewer
|
||||
if $INSTALL_GUI
|
||||
then
|
||||
i thunderbird # GUI mail client (just in case)
|
||||
fi
|
||||
fi
|
||||
|
||||
if $INSTALL_ORGANISATION
|
||||
then
|
||||
i vdirsyncer # Synchronize DAV
|
||||
i khard # Contacts editor
|
||||
i khal # Calendar editor
|
||||
i todoman # Todo-list
|
||||
fi
|
||||
|
||||
|
||||
if $INSTALL_HOUSEKEEPING
|
||||
then
|
||||
i syncthing # Synchronize files amongst devices
|
||||
i borg # Backups
|
||||
i jdupes # Find duplicates
|
||||
i duperemove # Find and merge dupplicates on BTRFS partitions
|
||||
i optipng # Optimize PNG files
|
||||
i jpegtran libjpeg-turbo # Compress JPEG files
|
||||
i reflac # Recompress FLAC files
|
||||
i pacman-contrib # Pactree and more
|
||||
i shred # Delete sensititve data
|
||||
i android-tools && i android-udev # Android Debug Bridge
|
||||
i tigervnc # Remote desktop
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Dev utilities
|
||||
i base-devel build-essential || (i make; i gcc)
|
||||
i git
|
||||
[ -z "$INSTALL_DEV" ] && $TERMUX && INSTALL_DEV=false
|
||||
if $INSTALL_DEV
|
||||
then
|
||||
# Misc/Reusable
|
||||
i man # Documentation
|
||||
i strace # Tracer
|
||||
i ctags universal-ctags exuberant-ctags # Tags generator
|
||||
i perf # Allow verifying performance of software
|
||||
|
||||
# C/C++
|
||||
i cmake # C++ Build system
|
||||
i clang # C/C++ Compiler
|
||||
i ccache # Build cache
|
||||
i gdb # Debugger
|
||||
|
||||
# JS
|
||||
i jq # CLI JSON file handler
|
||||
|
||||
# Python
|
||||
i python-language-server # Python language server
|
||||
i mypy && i pyls-mypy # Static typing checker for Python
|
||||
i python-language-server-black # Python code formatter
|
||||
|
||||
# Bash
|
||||
i bash-language-server # Bash / SH language server
|
||||
fi
|
||||
|
||||
|
||||
if $INSTALL_FPGA
|
||||
then
|
||||
i yosys # Verilog processor
|
||||
i iverilog # Verilog simulator
|
||||
i ghdl # VHDL simulator
|
||||
i gtkwave # Simulation file viewer
|
||||
fi
|
||||
|
||||
if $INSTALL_UTILITIES
|
||||
then
|
||||
i visidata # CSV file reader
|
||||
i insect # Unit calculator
|
||||
i zbar # Read QR codes
|
||||
i htop # View process usage
|
||||
$SUPERUSER && i iotop # View process I/O
|
||||
i progress # Show progress of functions
|
||||
fi
|
||||
|
||||
|
||||
if $INSTALL_DOCUMENT
|
||||
then
|
||||
i pandoc # Document converter
|
||||
i texlive-most && i texlive-lang # LaTeX renderer
|
||||
i pdftk # PDF manipulator
|
||||
i translate-shell # Translator
|
||||
i inkscape # Vector image converter
|
||||
i optipng # Optimize PNG files
|
||||
i jpegtran libjpeg-turbo # Compress JPEG files
|
||||
i libreoffice-fresh # Office suite
|
||||
i hunspell-en_GB # Spell checker British english
|
||||
i hunspell-en_US # Spell checker American english
|
||||
# i libreoffice-extension-grammalecte-fr # Spell checker French
|
||||
i libreoffice-extension-languagetool # Complimentary spell checker various
|
||||
# TODO The last two can't cohabit
|
||||
fi
|
||||
|
||||
if $INSTALL_IMAGE
|
||||
then
|
||||
i imagemagick # CLI Image manipulator
|
||||
i gimp # Photo editor
|
||||
i darktable # Raw photo editor
|
||||
i inkscape # Vectorial image editor
|
||||
i optipng # Optimize PNG files
|
||||
i jpegtran libjpeg-turbo # Compress JPEG files
|
||||
fi
|
||||
|
||||
if $INSTALL_MUSIC
|
||||
then
|
||||
i mpv # Audio/Video player
|
||||
i puddletag-qt5-git puddletag # Musig tag editor
|
||||
# (remove -qt5 once it has been merged upstream)
|
||||
i mpd # Music player daemon
|
||||
i mpc # CLI MPD client
|
||||
i vimpc-git # CLI UI MPD client
|
||||
i musescore # Music sheet editor
|
||||
i ashuffle # Auto-fill MPD playlist
|
||||
i audacity # Audio editor
|
||||
fi
|
||||
|
||||
|
||||
if $INSTALL_VIDEO
|
||||
then
|
||||
i vlc # Video player
|
||||
i mpv # Audio/Video player
|
||||
i mpv-thumbnail-script # Show thumbnails for mpv
|
||||
i ffmpeg # Video/Audio file handler
|
||||
i youtube-dl # Downloader for videos
|
||||
i megatools # Downloader for mega.nz
|
||||
if $INSTALL_X
|
||||
then
|
||||
i simplescreenrecorder # Screen recorder
|
||||
fi
|
||||
fi
|
||||
|
||||
if $INSTALL_WINE
|
||||
then
|
||||
# TODO Add multilib repo and pacman -Sy
|
||||
i wine # Wine
|
||||
i wine-gecko # Wine Internet Explorer
|
||||
i wine-mono # Wine .NET
|
||||
i mono # Mono .NET
|
||||
i lib32-libpulse # Sound for Wine with pulseaudio
|
||||
fi
|
||||
|
||||
# Desktop environment
|
||||
if $INSTALL_GUI
|
||||
then
|
||||
i firefox # Web browser
|
||||
# Extensions: Dark reader, Decentraleyes, Tridactyl, uBlock Origin, Containers, No Tab
|
||||
|
||||
i xkb-qwerty-fr # French QWERTY disposition
|
||||
i thunar # Directory browser (just in case)
|
||||
i gedit # Visual editor (just in case)
|
||||
i feh # Background / Image viewer
|
||||
i zathura && i zathura-pdf-mupdf # PDF viewer
|
||||
i ttf-dejavu # Font
|
||||
i ttf-twemoji # Emoji fonts
|
||||
i adobe-source-han-sans-otc-fonts # Chinese/Japanese/Korean fonts
|
||||
i sox # For beeps and stuff
|
||||
i meld # For comparison
|
||||
i python-magic # Dependency of o
|
||||
i yubikey-touch-detector # Show a notification when Yubikey needs pressing
|
||||
|
||||
if $INSTALL_X
|
||||
then
|
||||
i i3-wm # WM
|
||||
i libgnomekbd # Show keyboard layout
|
||||
i dunst # Notifications
|
||||
i i3lock # Locker
|
||||
i numlockx # Numlock auto-unlock
|
||||
i rofi # HUD selector
|
||||
i rofimoji # emoji selector
|
||||
i rxvt-unicode # Terminal emulator
|
||||
i urxvt-resize-font-git # Resize fonts for urxvt
|
||||
i scrot # Screenshot taker
|
||||
i trayer # Tray icons (just in case)
|
||||
i unclutter # Auto mask mouse
|
||||
i xautolock # Auto lock screen
|
||||
i xclip # Copy/paste
|
||||
i lemonbar-xft-git lemonbar # Bottom bar
|
||||
i wireless_tools # Bottom bar WiFi Indicator (iwgetid)
|
||||
i autorandr # Multiple screen configurations
|
||||
i keynav-enhanced keynav # Use mouse with keyboard
|
||||
i pacmixer # To change PA volumes
|
||||
i sct # Red filter # TODO Autocompile
|
||||
|
||||
i xorg-xinit # To launch X
|
||||
i xorg-xbacklight xbacklight # For laptop brightness
|
||||
i pulseaudio # To get ausdio
|
||||
# TODO Bluetooth headset stuff
|
||||
|
||||
fi
|
||||
|
||||
if $INSTALL_WAYLAND
|
||||
then
|
||||
i sway
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Listing software to install"
|
||||
|
||||
listInstallers | while read -r installerName
|
||||
do
|
||||
echo " Installer $installerName will install:"
|
||||
listPackagesForInstaller "$installerName" | sed 's/^/ - /'
|
||||
done
|
||||
|
||||
prompt "Okay with those?" || exit 0
|
||||
|
||||
echo "Installing packages"
|
||||
|
||||
installPackages
|
Loading…
Reference in New Issue