mirror of
https://github.com/mitchell/dotfiles.git
synced 2026-02-15 16:36:52 +00:00
defiant
This commit is contained in:
parent
44780e9a9e
commit
846fc109ca
32 changed files with 719 additions and 1117 deletions
|
|
@ -1,45 +1,20 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
#if ! test -e ~/.bspwm_no_lock
|
||||
# slock &
|
||||
# touch ~/.bspwm_no_lock
|
||||
#end
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
setxkbmap -option ctrl:swapcaps
|
||||
setxkbmap -option altwin:swap_alt_win
|
||||
xset s off -dpms
|
||||
xinput set-prop 'MSFT0001:00 04F3:317C Touchpad' 'libinput Tapping Enabled' 1
|
||||
xinput set-prop 'MSFT0001:00 04F3:317C Touchpad' 'libinput Middle Emulation Enabled' 1
|
||||
end
|
||||
|
||||
sxhkd &
|
||||
#wmname LG3D
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
killall -q picom sxhkd
|
||||
picom -b
|
||||
else
|
||||
picom -b --backend xrender
|
||||
end
|
||||
|
||||
#wmname LG3D
|
||||
sxhkd &
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
killall -q polybar pasystray barrier barrierc
|
||||
barrier &
|
||||
keepassxc &
|
||||
~/.fehbg
|
||||
else
|
||||
feh --no-fehbg --bg-scale '/home/m/sync/maelstrom.jpg'
|
||||
end
|
||||
|
||||
polybar m-bar &
|
||||
pasystray &
|
||||
|
||||
bspc monitor -d I II III IV V VI VII
|
||||
bspc monitor -d I II III IV V
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 10
|
||||
bspc config top_padding -10
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle false
|
||||
|
|
|
|||
14
.config/fish/conf.d/fish_frozen_key_bindings.fish
Normal file
14
.config/fish/conf.d/fish_frozen_key_bindings.fish
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||
# to its new default scope (global). We recommend you delete this file
|
||||
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||
|
||||
set --global fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
# Prior to version 4.3, fish shipped an event handler that runs
|
||||
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||
# whenever the fish_key_bindings variable is erased.
|
||||
# This means that as long as any fish < 4.3 is still running on this system,
|
||||
# we cannot complete the migration.
|
||||
# As a workaround, erase the universal variable at every shell startup.
|
||||
set --erase --universal fish_key_bindings
|
||||
46
.config/fish/conf.d/fish_frozen_theme.fish
Normal file
46
.config/fish/conf.d/fish_frozen_theme.fish
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# theme variables from universal to global scope.
|
||||
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||
# To customize your theme, delete this file and see
|
||||
# help interactive#syntax-highlighting
|
||||
# or
|
||||
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||
|
||||
set --global fish_color_autosuggestion 727169 brblack
|
||||
set --global fish_color_cancel -r
|
||||
set --global fish_color_command 957FB8 magenta
|
||||
set --global fish_color_comment 727169 brblack
|
||||
set --global fish_color_cwd green
|
||||
set --global fish_color_cwd_root red
|
||||
set --global fish_color_end FF9E64 brred
|
||||
set --global fish_color_error C34043 red
|
||||
set --global fish_color_escape D27E99 brmagenta
|
||||
set --global fish_color_history_current --bold
|
||||
set --global fish_color_host normal
|
||||
set --global fish_color_host_remote yellow
|
||||
set --global fish_color_keyword D27E99 brmagenta
|
||||
set --global fish_color_normal DCD7BA normal
|
||||
set --global fish_color_operator 7AA89F cyan
|
||||
set --global fish_color_param DCD7BA normal
|
||||
set --global fish_color_quote C0A36E yellow
|
||||
set --global fish_color_redirection 76946A green
|
||||
set --global fish_color_search_match --background=2D4F67 --background=brcyan
|
||||
set --global fish_color_selection --background=2D4F67 --background=brcyan
|
||||
set --global fish_color_status red
|
||||
set --global fish_color_user brgreen
|
||||
set --global fish_color_valid_path --underline
|
||||
set --global fish_pager_color_background
|
||||
set --global fish_pager_color_completion DCD7BA normal
|
||||
set --global fish_pager_color_description 727169 brblack
|
||||
set --global fish_pager_color_prefix 957FB8 magenta
|
||||
set --global fish_pager_color_progress 727169 brblack
|
||||
set --global fish_pager_color_secondary_background
|
||||
set --global fish_pager_color_secondary_completion
|
||||
set --global fish_pager_color_secondary_description
|
||||
set --global fish_pager_color_secondary_prefix
|
||||
set --global fish_pager_color_selected_background -r
|
||||
set --global fish_pager_color_selected_completion
|
||||
set --global fish_pager_color_selected_description
|
||||
set --global fish_pager_color_selected_prefix
|
||||
|
|
@ -2,9 +2,6 @@ function configure_fish
|
|||
# Determine OS
|
||||
set uname (uname)
|
||||
|
||||
# Set umask
|
||||
umask 077
|
||||
|
||||
# Begin profile init
|
||||
# (These functions are defined in the functions/ directory.)
|
||||
define_global_variables
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
|||
alias ai aichat
|
||||
alias ais aisearch
|
||||
alias adr aider
|
||||
alias fwl 'sudo firewall-cmd'
|
||||
|
||||
switch "$uname"
|
||||
case Linux
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
|||
|
||||
set -gx EDITOR nvim
|
||||
set -gx BROWSER firefox
|
||||
set -gx DIFFPROG nvim -d
|
||||
set -gx DIFFPROG delta
|
||||
|
||||
set -gx FZF_CTRL_T_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
|
||||
set -gx FZF_DEFAULT_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
|
||||
|
|
@ -15,8 +15,6 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
|||
set -gx GOPATH $HOME/code/go
|
||||
set -gx GOBIN $GOPATH/bin
|
||||
|
||||
set -gx GTK_THEME Kanagawa-BL
|
||||
|
||||
set -gx BUN_INSTALL $HOME/.bun
|
||||
|
||||
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
function fwl -d 'Function to simplify interacting with firewalld'
|
||||
argparse --ignore-unknown \
|
||||
p/permanent \
|
||||
r/reset \
|
||||
'z/zone=' \
|
||||
'o/policy=' \
|
||||
's/service=' \
|
||||
-- $argv
|
||||
|
||||
if set -q _flag_reset
|
||||
echo 'Resetting fwl ...'
|
||||
_fwl_reset
|
||||
return
|
||||
end
|
||||
|
||||
if set -q _flag_permanent
|
||||
if set -q _fwl_perm
|
||||
set -ge _fwl_perm
|
||||
else
|
||||
set -g _fwl_perm --permanent
|
||||
end
|
||||
end
|
||||
|
||||
if set -q _flag_zone
|
||||
set -g _fwl_mode "--zone=$_flag_z"
|
||||
else if set -q _flag_policy
|
||||
set -g _fwl_mode "--policy=$_flag_o"
|
||||
else if set -q _flag_service
|
||||
set -g _fwl_mode "--service=$_flag_s"
|
||||
end
|
||||
|
||||
echo fwl_mode={$_fwl_perm} $_fwl_mode
|
||||
|
||||
test -z "$argv"; and return
|
||||
|
||||
switch $argv
|
||||
case i info
|
||||
set argv --list-all
|
||||
case a all
|
||||
set argv --list-all-zones
|
||||
case on all-on
|
||||
set argv --get-active-zones
|
||||
case s services
|
||||
set argv --get-services
|
||||
end
|
||||
|
||||
sudo firewall-cmd {$_fwl_perm} {$_fwl_mode} $argv
|
||||
end
|
||||
|
||||
function _fwl_reset -d 'Reset fwl global variables'
|
||||
set -ge _fwl_mode
|
||||
set -ge _fwl_perm
|
||||
return 0
|
||||
end
|
||||
|
|
@ -8,11 +8,7 @@ function import_sources -a uname -d 'Loads any additional fish files needed at i
|
|||
set _asdf_shims "$ASDF_DATA_DIR/shims"
|
||||
end
|
||||
|
||||
# Do not use fish_add_path (added in Fish 3.2) because it
|
||||
# potentially changes the order of items in PATH
|
||||
if not contains $_asdf_shims $PATH
|
||||
set -gx --prepend PATH $_asdf_shims
|
||||
end
|
||||
fish_add_path $_asdf_shims
|
||||
set --erase _asdf_shims
|
||||
|
||||
test -e /opt/homebrew/bin/brew
|
||||
|
|
|
|||
57
.config/ghostty/config
Normal file
57
.config/ghostty/config
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# This is the configuration file for Ghostty.
|
||||
#
|
||||
# This template file has been automatically created at the following
|
||||
# path since Ghostty couldn't find any existing config files on your system:
|
||||
#
|
||||
# /home/m/.config/ghostty/config
|
||||
#
|
||||
# The template does not set any default options, since Ghostty ships
|
||||
# with sensible defaults for all options. Users should only need to set
|
||||
# options that they want to change from the default.
|
||||
#
|
||||
# Run `ghostty +show-config --default --docs` to view a list of
|
||||
# all available config options and their default values.
|
||||
#
|
||||
# Additionally, each config option is also explained in detail
|
||||
# on Ghostty's website, at https://ghostty.org/docs/config.
|
||||
#
|
||||
# Ghostty can reload the configuration while running by using the menu
|
||||
# options or the bound key (default: Command + Shift + comma on macOS and
|
||||
# Control + Shift + comma on other platforms). Not all config options can be
|
||||
# reloaded while running; some only apply to new windows and others may require
|
||||
# a full restart to take effect.
|
||||
|
||||
# Config syntax crash course
|
||||
# ==========================
|
||||
# # The config file consists of simple key-value pairs,
|
||||
# # separated by equals signs.
|
||||
# font-family = Iosevka
|
||||
# window-padding-x = 2
|
||||
#
|
||||
# # Spacing around the equals sign does not matter.
|
||||
# # All of these are identical:
|
||||
# key=value
|
||||
# key= value
|
||||
# key =value
|
||||
# key = value
|
||||
#
|
||||
# # Any line beginning with a # is a comment. It's not possible to put
|
||||
# # a comment after a config option, since it would be interpreted as a
|
||||
# # part of the value. For example, this will have a value of "#123abc":
|
||||
# background = #123abc
|
||||
#
|
||||
# # Empty values are used to reset config keys to default.
|
||||
# key =
|
||||
#
|
||||
# # Some config options have unique syntaxes for their value,
|
||||
# # which is explained in the docs for that config option.
|
||||
# # Just for example:
|
||||
# resize-overlay-duration = 4s 200ms
|
||||
font-family = JetBrains Mono
|
||||
font-size = 11
|
||||
window-inherit-working-directory = false
|
||||
quit-after-last-window-closed = false
|
||||
window-decoration = none
|
||||
background-opacity = 0.95
|
||||
gtk-wide-tabs = false
|
||||
theme = Kanagawa Wave
|
||||
349
.config/niri/config.kdl
Normal file
349
.config/niri/config.kdl
Normal file
|
|
@ -0,0 +1,349 @@
|
|||
environment {
|
||||
QT_QPA_PLATFORMTHEME "gtk3"
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
}
|
||||
|
||||
numlock
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
|
||||
mouse {
|
||||
accel-profile "flat"
|
||||
}
|
||||
|
||||
trackpoint {
|
||||
}
|
||||
}
|
||||
|
||||
output "ASUSTek COMPUTER INC VG27WQ L1LMDW002255" {
|
||||
mode "2560x1440@164.998"
|
||||
scale 1
|
||||
transform "normal"
|
||||
position x=2560 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 12
|
||||
center-focused-column "on-overflow"
|
||||
always-center-single-column
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
focus-ring {
|
||||
off
|
||||
width 3
|
||||
active-color "#76946a"
|
||||
inactive-color "#505050"
|
||||
}
|
||||
|
||||
border {
|
||||
width 3
|
||||
active-color "#ffc87f"
|
||||
inactive-color "#505050"
|
||||
urgent-color "#9b0000"
|
||||
}
|
||||
|
||||
shadow {
|
||||
// on
|
||||
softness 30
|
||||
spread 5
|
||||
offset x=0 y=5
|
||||
color "#0007"
|
||||
}
|
||||
|
||||
struts {
|
||||
// left 64
|
||||
// right 64
|
||||
// top 64
|
||||
// bottom 64
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||
spawn-sh-at-startup "wl-paste --watch cliphist store"
|
||||
spawn-sh-at-startup "swayidle -w timeout 1800 'niri msg action power-off-monitors' timeout 1860 'qs -c noctalia-shell ipc call lockScreen lock'"
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
animations {
|
||||
// off
|
||||
// slowdown 3.0
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
// This app-id regular expression will work for both:
|
||||
// - host Firefox (app-id is "firefox")
|
||||
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
|
||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||
open-floating true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^Emulator$"#
|
||||
open-floating true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
|
||||
// Use this instead if you want them visible on third-party screenshot tools.
|
||||
// block-out-from "screencast"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
match app-id="Alacritty"
|
||||
match app-id="zen"
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
match app-id="kitty"
|
||||
draw-border-with-background false
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 12
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||
Mod+Space hotkey-overlay-title="Run an Application" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; }
|
||||
Mod+S hotkey-overlay-title="Open the Settings" { spawn-sh "qs -c noctalia-shell ipc call settings toggle"; }
|
||||
Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn-sh "qs -c noctalia-shell ipc call lockScreen lock"; }
|
||||
Super+Alt+Q hotkey-overlay-title="Open the Session Menu" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; }
|
||||
|
||||
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
|
||||
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume increase"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume decrease"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteOutput"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteInput"; }
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }
|
||||
XF86AudioPause allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media pause"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; }
|
||||
|
||||
//XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||
//XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||
|
||||
Mod+O repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Q repeat=false { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+BracketLeft { focus-column-left; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+BracketRight { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+BracketLeft { move-column-left; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+BracketRight { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
// Mod+J { focus-window-or-workspace-down; }
|
||||
// Mod+K { focus-window-or-workspace-up; }
|
||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
Mod+Shift+Up { focus-monitor-up; }
|
||||
Mod+Shift+Right { focus-monitor-right; }
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Down { focus-workspace-down; }
|
||||
Mod+Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Semicolon { focus-workspace-down; }
|
||||
Mod+Apostrophe { focus-workspace-up; }
|
||||
Mod+Ctrl+Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+Semicolon { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Apostrophe { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
// Usually scrolling up and down with Shift in applications results in
|
||||
// horizontal scrolling; these binds replicate that.
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
Mod+Comma { consume-or-expel-window-left; }
|
||||
Mod+Period { consume-or-expel-window-right; }
|
||||
|
||||
// Consume one window from the right to the bottom of the focused column.
|
||||
//Mod+Comma { consume-window-into-column; }
|
||||
// Expel the bottom window from the focused column to the right.
|
||||
//Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
// Cycling through the presets in reverse order is also possible.
|
||||
// Mod+R { switch-preset-column-width-back; }
|
||||
Mod+Shift+R { switch-preset-window-height; }
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
Mod+Ctrl+C { center-visible-columns; }
|
||||
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
// so they may, for example, forward the key presses as-is to a remote machine.
|
||||
// It's a good idea to bind an escape hatch to toggle the inhibitor,
|
||||
// so a buggy application can't hold your session hostage.
|
||||
//
|
||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
Mod+Shift+E { quit; }
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
|
||||
gestures {
|
||||
hot-corners {
|
||||
top-right
|
||||
}
|
||||
}
|
||||
|
||||
// Noctalia
|
||||
spawn-sh-at-startup "qs -c noctalia-shell"
|
||||
|
||||
debug {
|
||||
// Allows notification actions and window activation from Noctalia.
|
||||
honor-xdg-activation-with-invalid-serial
|
||||
}
|
||||
|
||||
// Set the overview wallpaper on the backdrop.
|
||||
layer-rule {
|
||||
match namespace="^noctalia-overview*"
|
||||
place-within-backdrop true
|
||||
}
|
||||
|
||||
|
|
@ -7,9 +7,12 @@ return {
|
|||
opts = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"cpp",
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"regex",
|
||||
"bash",
|
||||
"fish",
|
||||
|
|
@ -20,16 +23,10 @@ return {
|
|||
"go",
|
||||
"elixir",
|
||||
"vue",
|
||||
"groovy",
|
||||
"java",
|
||||
"objc",
|
||||
"swift",
|
||||
"hcl",
|
||||
"terraform",
|
||||
"yaml",
|
||||
"json",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
},
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ shadow = true
|
|||
shadow-radius = 12
|
||||
|
||||
fading = true
|
||||
fade-delta = 5
|
||||
fade-delta = 7
|
||||
|
||||
vsync = true
|
||||
|
||||
|
|
@ -13,4 +13,6 @@ wintypes:
|
|||
{
|
||||
dock = { shadow = false; };
|
||||
utility = { shadow = false; };
|
||||
menu = { shadow = false; };
|
||||
popup_menu = { shadow = false; };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ configuration{
|
|||
icon-theme: "Adwaita";
|
||||
show-icons: true;
|
||||
terminal: "wezterm";
|
||||
location: 2;
|
||||
yoffset: 100;
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-combi: " Open";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
wezterm-gui start
|
||||
wezterm start
|
||||
|
||||
# browser
|
||||
super + shift + Return
|
||||
|
|
@ -60,7 +60,7 @@ super + alt + {q,r}
|
|||
bspc {quit,wm -r}
|
||||
|
||||
# close and kill
|
||||
super + {_,shift + }w
|
||||
super + {_,shift + }q
|
||||
bspc node -{c,k}
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
[delta]
|
||||
navigate = true
|
||||
dark = true
|
||||
side-by-side = true
|
||||
side-by-side = false
|
||||
line-numbers = true
|
||||
|
||||
[merge]
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
source ~/.vimrc
|
||||
41
.wezterm.lua
41
.wezterm.lua
|
|
@ -12,47 +12,20 @@ end
|
|||
|
||||
config.window_decorations = "RESIZE"
|
||||
|
||||
config.force_reverse_video_cursor = true
|
||||
config.colors = {
|
||||
foreground = "#dcd7ba",
|
||||
background = "#1f1f28",
|
||||
config.color_scheme = 'Kanagawa (Gogh)'
|
||||
|
||||
cursor_bg = "#c8c093",
|
||||
cursor_fg = "#c8c093",
|
||||
cursor_border = "#c8c093",
|
||||
|
||||
selection_fg = "#c8c093",
|
||||
selection_bg = "#2d4f67",
|
||||
|
||||
scrollbar_thumb = "#16161d",
|
||||
split = "#16161d",
|
||||
|
||||
ansi = { "#090618", "#c34043", "#76946a", "#c0a36e", "#7e9cd8", "#957fb8", "#6a9589", "#c8c093" },
|
||||
brights = { "#727169", "#e82424", "#98bb6c", "#e6c384", "#7fb4ca", "#938aa9", "#7aa89f", "#dcd7ba" },
|
||||
indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
|
||||
}
|
||||
|
||||
config.window_background_opacity = is_darwin() and 0.85 or 0.7
|
||||
config.window_background_opacity = is_darwin() and 0.85 or 0.95
|
||||
|
||||
config.font_size = is_darwin() and 14 or 11
|
||||
|
||||
config.tab_bar_at_bottom = true
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
|
||||
config.keys = {
|
||||
{ key = "Enter", mods = "SHIFT|CTRL", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = '"', mods = "SHIFT|CTRL", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = "H", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Left") },
|
||||
{ key = "L", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Right") },
|
||||
{ key = "K", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Up") },
|
||||
{ key = "J", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Down") },
|
||||
{ key = "H", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Left", 1 }) },
|
||||
{ key = "L", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Right", 1 }) },
|
||||
{ key = "K", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Up", 1 }) },
|
||||
{ key = "J", mods = "SHIFT|CTRL|SUPER", action = act.AdjustPaneSize({ "Down", 1 }) },
|
||||
{ key = "D", mods = "SHIFT|CTRL|SUPER", action = act.ShowDebugOverlay },
|
||||
{ key = "X", mods = "SHIFT|CTRL|ALT", action = act.ActivateCopyMode },
|
||||
{ key = "Z", mods = "SHIFT|CTRL|ALT", action = act.TogglePaneZoomState },
|
||||
config.window_padding = {
|
||||
left = 2,
|
||||
right = 2,
|
||||
top = 2,
|
||||
bottom = 2,
|
||||
}
|
||||
|
||||
return config
|
||||
|
|
|
|||
45
README.md
45
README.md
|
|
@ -6,14 +6,16 @@ the included scripts should be generalized enough to work on anybody's machines.
|
|||
|
||||
This repo contains my preferred configurations for:
|
||||
|
||||
- fish shell
|
||||
- neovim
|
||||
- tmux
|
||||
- fish shell
|
||||
- git
|
||||
- Wez's terminal
|
||||
- tmux
|
||||
- wezterm (X11/macOS)
|
||||
- ghostty (X11/Wayland)
|
||||
- keepassxc
|
||||
- bspwm (Linux)
|
||||
- sxhkd (Linux)
|
||||
- bspwm (X11)
|
||||
- sxhkd (X11)
|
||||
- Niri (Wayland)
|
||||
- yabaiwm (macOS)
|
||||
- skhd (macOS)
|
||||
|
||||
|
|
@ -25,27 +27,30 @@ This repo contains my preferred configurations for:
|
|||
|
||||
- fish
|
||||
- git
|
||||
- neovim
|
||||
- rsync
|
||||
- curl
|
||||
|
||||
**Description**
|
||||
|
||||
> **Warning:** This will overwrite any existing files by the same name.
|
||||
|
||||
Syncs all configuration files found in this repository to your home folder.
|
||||
|
||||
To run sync script using curl: `curl https://raw.githubusercontent.com/mitchell/dotfiles/master/sync | fish`
|
||||
|
||||
### `upgrade_debian`
|
||||
### `install_utils`
|
||||
|
||||
**Dependencies**
|
||||
|
||||
- git
|
||||
- fish
|
||||
|
||||
**Description**
|
||||
|
||||
Upgrade from Debian stable to unstable.
|
||||
Installs various CLI utilities based on OS availability. Supports Arch, Debian, Fedora, and macOS
|
||||
(brew). I recommend quickly reading what you're getting.
|
||||
|
||||
### `provision_linux`
|
||||
### `install_arch`
|
||||
|
||||
Dependencies
|
||||
|
||||
|
|
@ -53,5 +58,23 @@ Dependencies
|
|||
|
||||
**Description**
|
||||
|
||||
Provision various environments and tools on Debian or Arch linux. Has
|
||||
commands for terminal_env, desktop_env, and more. Take a peek.
|
||||
Performs the final installation steps for Arch Linux **once inside** arch-chroot. This is a highly
|
||||
specific configuration that makes A LOT of assumptions.
|
||||
|
||||
The timezone, hostname, username, network client, and boot mode can be chosen at runtime.
|
||||
|
||||
Locale is assumed to be `en_US.UTF-8`.
|
||||
|
||||
The created user will be added to the `wheel` group and given sudo permission. The root user will be
|
||||
locked.
|
||||
|
||||
If you choose systemd-networkd as your network manager it only configures a single interface
|
||||
matching the glob `en*`.
|
||||
|
||||
If installing to a UEFI system, it will use the systemd-boot bootloader and the "Boot target" should
|
||||
be the root partition, like `/dev/vda2`. UEFI mode makes the assumption that the root partition is a
|
||||
BTRFS partition, with at least one subvolume called `root`.
|
||||
|
||||
If installing to a BIOS system (VMs), it will use the Grub bootloader and the "Boot target" should
|
||||
be the boot drive, like `/dev/vda` (not partition `/dev/vda1`). BIOS mode makes no assumptions about
|
||||
root filesystem type.
|
||||
|
|
|
|||
|
|
@ -1,455 +0,0 @@
|
|||
#_preseed_V1
|
||||
#### Contents of the preconfiguration file (for bullseye)
|
||||
### Localization
|
||||
# Preseeding only locale sets language, country and locale.
|
||||
d-i debian-installer/locale string en_US
|
||||
|
||||
# The values can also be preseeded individually for greater flexibility.
|
||||
#d-i debian-installer/language string en
|
||||
#d-i debian-installer/country string NL
|
||||
#d-i debian-installer/locale string en_GB.UTF-8
|
||||
# Optionally specify additional locales to be generated.
|
||||
#d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8
|
||||
|
||||
# Keyboard selection.
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
# d-i keyboard-configuration/toggle select No toggling
|
||||
|
||||
### Network configuration
|
||||
# Disable network configuration entirely. This is useful for cdrom
|
||||
# installations on non-networked devices where the network questions,
|
||||
# warning and long timeouts are a nuisance.
|
||||
#d-i netcfg/enable boolean false
|
||||
|
||||
# netcfg will choose an interface that has link if possible. This makes it
|
||||
# skip displaying a list if there is more than one interface.
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# To pick a particular interface instead:
|
||||
#d-i netcfg/choose_interface select eth1
|
||||
|
||||
# To set a different link detection timeout (default is 3 seconds).
|
||||
# Values are interpreted as seconds.
|
||||
#d-i netcfg/link_wait_timeout string 10
|
||||
|
||||
# If you have a slow dhcp server and the installer times out waiting for
|
||||
# it, this might be useful.
|
||||
#d-i netcfg/dhcp_timeout string 60
|
||||
#d-i netcfg/dhcpv6_timeout string 60
|
||||
|
||||
# If you prefer to configure the network manually, uncomment this line and
|
||||
# the static network configuration below.
|
||||
#d-i netcfg/disable_autoconfig boolean true
|
||||
|
||||
# If you want the preconfiguration file to work on systems both with and
|
||||
# without a dhcp server, uncomment these lines and the static network
|
||||
# configuration below.
|
||||
#d-i netcfg/dhcp_failed note
|
||||
#d-i netcfg/dhcp_options select Configure network manually
|
||||
|
||||
# Static network configuration.
|
||||
#
|
||||
# IPv4 example
|
||||
#d-i netcfg/get_ipaddress string 192.168.1.42
|
||||
#d-i netcfg/get_netmask string 255.255.255.0
|
||||
#d-i netcfg/get_gateway string 192.168.1.1
|
||||
#d-i netcfg/get_nameservers string 192.168.1.1
|
||||
#d-i netcfg/confirm_static boolean true
|
||||
#
|
||||
# IPv6 example
|
||||
#d-i netcfg/get_ipaddress string fc00::2
|
||||
#d-i netcfg/get_netmask string ffff:ffff:ffff:ffff::
|
||||
#d-i netcfg/get_gateway string fc00::1
|
||||
#d-i netcfg/get_nameservers string fc00::1
|
||||
#d-i netcfg/confirm_static boolean true
|
||||
|
||||
# Any hostname and domain names assigned from dhcp take precedence over
|
||||
# values set here. However, setting the values still prevents the questions
|
||||
# from being shown, even if values come from dhcp.
|
||||
d-i netcfg/get_hostname string debim
|
||||
d-i netcfg/get_domain string lan
|
||||
|
||||
# If you want to force a hostname, regardless of what either the DHCP
|
||||
# server returns or what the reverse DNS entry for the IP is, uncomment
|
||||
# and adjust the following line.
|
||||
d-i netcfg/hostname string debim
|
||||
|
||||
# Disable that annoying WEP key dialog.
|
||||
d-i netcfg/wireless_wep string
|
||||
# The wacky dhcp hostname that some ISPs use as a password of sorts.
|
||||
#d-i netcfg/dhcp_hostname string radish
|
||||
|
||||
# If non-free firmware is needed for the network or other hardware, you can
|
||||
# configure the installer to always try to load it, without prompting. Or
|
||||
# change to false to disable asking.
|
||||
#d-i hw-detect/load_firmware boolean true
|
||||
|
||||
### Network console
|
||||
# Use the following settings if you wish to make use of the network-console
|
||||
# component for remote installation over SSH. This only makes sense if you
|
||||
# intend to perform the remainder of the installation manually.
|
||||
#d-i anna/choose_modules string network-console
|
||||
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
|
||||
#d-i network-console/password password r00tme
|
||||
#d-i network-console/password-again password r00tme
|
||||
|
||||
### Mirror settings
|
||||
# If you select ftp, the mirror/country string does not need to be set.
|
||||
#d-i mirror/protocol string ftp
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string debian.csail.mit.edu
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
|
||||
# Suite to install.
|
||||
#d-i mirror/suite string testing
|
||||
# Suite to use for loading installer components (optional).
|
||||
#d-i mirror/udeb/suite string testing
|
||||
|
||||
### Account setup
|
||||
# Skip creation of a root account (normal user account will be able to
|
||||
# use sudo).
|
||||
d-i passwd/root-login boolean false
|
||||
# Alternatively, to skip creation of a normal user account.
|
||||
#d-i passwd/make-user boolean false
|
||||
|
||||
# Root password, either in clear text
|
||||
#d-i passwd/root-password password r00tme
|
||||
#d-i passwd/root-password-again password r00tme
|
||||
# or encrypted using a crypt(3) hash.
|
||||
#d-i passwd/root-password-crypted password [crypt(3) hash]
|
||||
|
||||
# To create a normal user account.
|
||||
d-i passwd/user-fullname string m
|
||||
d-i passwd/username string m
|
||||
# Normal user's password, either in clear text
|
||||
d-i passwd/user-password password debim
|
||||
d-i passwd/user-password-again password debim
|
||||
# or encrypted using a crypt(3) hash.
|
||||
#d-i passwd/user-password-crypted password [crypt(3) hash]
|
||||
# Create the first user with the specified UID instead of the default.
|
||||
#d-i passwd/user-uid string 1010
|
||||
|
||||
# The user account will be added to some standard initial groups. To
|
||||
# override that, use this.
|
||||
#d-i passwd/user-default-groups string audio cdrom video
|
||||
|
||||
### Clock and time zone setup
|
||||
# Controls whether or not the hardware clock is set to UTC.
|
||||
d-i clock-setup/utc boolean true
|
||||
|
||||
# You may set this to any valid setting for $TZ; see the contents of
|
||||
# /usr/share/zoneinfo/ for valid values.
|
||||
d-i time/zone string UTC
|
||||
|
||||
# Controls whether to use NTP to set the clock during the install
|
||||
d-i clock-setup/ntp boolean true
|
||||
# NTP server to use. The default is almost always fine here.
|
||||
#d-i clock-setup/ntp-server string ntp.example.com
|
||||
|
||||
### Partitioning
|
||||
## Partitioning example
|
||||
# If the system has free space you can choose to only partition that space.
|
||||
# This is only honoured if partman-auto/method (below) is not set.
|
||||
#d-i partman-auto/init_automatically_partition select biggest_free
|
||||
|
||||
# Alternatively, you may specify a disk to partition. If the system has only
|
||||
# one disk the installer will default to using that, but otherwise the device
|
||||
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
|
||||
# and not e.g. /dev/discs/disc0/disc).
|
||||
# For example, to use the first SCSI/SATA hard disk:
|
||||
#d-i partman-auto/disk string /dev/sda
|
||||
# In addition, you'll need to specify the method to use.
|
||||
# The presently available methods are:
|
||||
# - regular: use the usual partition types for your architecture
|
||||
# - lvm: use LVM to partition the disk
|
||||
# - crypto: use LVM within an encrypted partition
|
||||
d-i partman-auto/method string regular
|
||||
|
||||
# You can define the amount of space that will be used for the LVM volume
|
||||
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
|
||||
# free space or the 'max' keyword.
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
|
||||
# If one of the disks that are going to be automatically partitioned
|
||||
# contains an old LVM configuration, the user will normally receive a
|
||||
# warning. This can be preseeded away...
|
||||
#d-i partman-lvm/device_remove_lvm boolean true
|
||||
# The same applies to pre-existing software RAID array:
|
||||
#d-i partman-md/device_remove_md boolean true
|
||||
# And the same goes for the confirmation to write the lvm partitions.
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
|
||||
# You can choose one of the three predefined partitioning recipes:
|
||||
# - atomic: all files in one partition
|
||||
# - home: separate /home partition
|
||||
# - multi: separate /home, /var, and /tmp partitions
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
|
||||
# Or provide a recipe of your own...
|
||||
# If you have a way to get a recipe file into the d-i environment, you can
|
||||
# just point at it.
|
||||
#d-i partman-auto/expert_recipe_file string /hd-media/recipe
|
||||
|
||||
# If not, you can put an entire recipe into the preconfiguration file in one
|
||||
# (logical) line. This example creates a small /boot partition, suitable
|
||||
# swap, and uses the rest of the space for the root partition:
|
||||
#d-i partman-auto/expert_recipe string \
|
||||
# boot-root :: \
|
||||
# 40 50 100 ext3 \
|
||||
# $primary{ } $bootable{ } \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ ext3 } \
|
||||
# mountpoint{ /boot } \
|
||||
# . \
|
||||
# 500 10000 1000000000 ext3 \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ ext3 } \
|
||||
# mountpoint{ / } \
|
||||
# . \
|
||||
# 64 512 300% linux-swap \
|
||||
# method{ swap } format{ } \
|
||||
# .
|
||||
|
||||
# The full recipe format is documented in the file partman-auto-recipe.txt
|
||||
# included in the 'debian-installer' package or available from D-I source
|
||||
# repository. This also documents how to specify settings such as file
|
||||
# system labels, volume group names and which physical devices to include
|
||||
# in a volume group.
|
||||
|
||||
## Partitioning for EFI
|
||||
# If your system needs an EFI partition you could add something like
|
||||
# this to the recipe above, as the first element in the recipe:
|
||||
# 538 538 1075 free \
|
||||
# $iflabel{ gpt } \
|
||||
# $reusemethod{ } \
|
||||
# method{ efi } \
|
||||
# format{ } \
|
||||
# . \
|
||||
#
|
||||
# The fragment above is for the amd64 architecture; the details may be
|
||||
# different on other architectures. The 'partman-auto' package in the
|
||||
# D-I source repository may have an example you can follow.
|
||||
|
||||
# This makes partman automatically partition without confirmation, provided
|
||||
# that you told it what to do using one of the methods above.
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
|
||||
#d-i partman-efi/non_efi_system boolean true
|
||||
# Ensure the partition table is GPT - this is required for EFI
|
||||
#d-i partman-partitioning/choose_label string gpt
|
||||
#d-i partman-partitioning/default_label string gpt
|
||||
|
||||
# When disk encryption is enabled, skip wiping the partitions beforehand.
|
||||
#d-i partman-auto-crypto/erase_disks boolean false
|
||||
|
||||
## Partitioning using RAID
|
||||
# The method should be set to "raid".
|
||||
#d-i partman-auto/method string raid
|
||||
# Specify the disks to be partitioned. They will all get the same layout,
|
||||
# so this will only work if the disks are the same size.
|
||||
#d-i partman-auto/disk string /dev/sda /dev/sdb
|
||||
|
||||
# Next you need to specify the physical partitions that will be used.
|
||||
#d-i partman-auto/expert_recipe string \
|
||||
# multiraid :: \
|
||||
# 1000 5000 4000 raid \
|
||||
# $primary{ } method{ raid } \
|
||||
# . \
|
||||
# 64 512 300% raid \
|
||||
# method{ raid } \
|
||||
# . \
|
||||
# 500 10000 1000000000 raid \
|
||||
# method{ raid } \
|
||||
# .
|
||||
|
||||
# Last you need to specify how the previously defined partitions will be
|
||||
# used in the RAID setup. Remember to use the correct partition numbers
|
||||
# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
|
||||
# devices are separated using "#".
|
||||
# Parameters are:
|
||||
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
|
||||
# <devices> <sparedevices>
|
||||
|
||||
#d-i partman-auto-raid/recipe string \
|
||||
# 1 2 0 ext3 / \
|
||||
# /dev/sda1#/dev/sdb1 \
|
||||
# . \
|
||||
# 1 2 0 swap - \
|
||||
# /dev/sda5#/dev/sdb5 \
|
||||
# . \
|
||||
# 0 2 0 ext3 /home \
|
||||
# /dev/sda6#/dev/sdb6 \
|
||||
# .
|
||||
|
||||
# For additional information see the file partman-auto-raid-recipe.txt
|
||||
# included in the 'debian-installer' package or available from D-I source
|
||||
# repository.
|
||||
|
||||
# This makes partman automatically partition without confirmation.
|
||||
d-i partman-md/confirm boolean true
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
## Controlling how partitions are mounted
|
||||
# The default is to mount by UUID, but you can also choose "traditional" to
|
||||
# use traditional device names, or "label" to try filesystem labels before
|
||||
# falling back to UUIDs.
|
||||
#d-i partman/mount_style select uuid
|
||||
|
||||
### Base system installation
|
||||
# Configure APT to not install recommended packages by default. Use of this
|
||||
# option can result in an incomplete system and should only be used by very
|
||||
# experienced users.
|
||||
#d-i base-installer/install-recommends boolean false
|
||||
|
||||
# The kernel image (meta) package to be installed; "none" can be used if no
|
||||
# kernel is to be installed.
|
||||
d-i base-installer/kernel/image string linux-image-cloud-amd64
|
||||
|
||||
### Apt setup
|
||||
# You can choose to install non-free and contrib software.
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
# Uncomment this if you don't want to use a network mirror.
|
||||
#d-i apt-setup/use_mirror boolean false
|
||||
# Select which update services to use; define the mirrors to be used.
|
||||
# Values shown below are the normal defaults.
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string security.debian.org
|
||||
|
||||
# Additional repositories, local[0-9] available
|
||||
#d-i apt-setup/local0/repository string \
|
||||
# http://local.server/debian stable main
|
||||
#d-i apt-setup/local0/comment string local server
|
||||
# Enable deb-src lines
|
||||
#d-i apt-setup/local0/source boolean true
|
||||
# URL to the public key of the local repository; you must provide a key or
|
||||
# apt will complain about the unauthenticated repository and so the
|
||||
# sources.list line will be left commented out.
|
||||
#d-i apt-setup/local0/key string http://local.server/key
|
||||
# If the provided key file ends in ".asc" the key file needs to be an
|
||||
# ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the
|
||||
# "GPG key public keyring" format, the "keybox database" format is
|
||||
# currently not supported.
|
||||
|
||||
# By default the installer requires that repositories be authenticated
|
||||
# using a known gpg key. This setting can be used to disable that
|
||||
# authentication. Warning: Insecure, not recommended.
|
||||
#d-i debian-installer/allow_unauthenticated boolean true
|
||||
|
||||
# Uncomment this to add multiarch configuration for i386
|
||||
#d-i apt-setup/multiarch string i386
|
||||
|
||||
|
||||
### Package selection
|
||||
tasksel tasksel/first multiselect standard, ssh-server
|
||||
|
||||
# Individual additional packages to install
|
||||
d-i pkgsel/include string git fish curl neovim firewalld qemu-guest-agent
|
||||
# Whether to upgrade packages after debootstrap.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
#d-i pkgsel/upgrade select none
|
||||
|
||||
# Some versions of the installer can report back on what software you have
|
||||
# installed, and what software you use. The default is not to report back,
|
||||
# but sending reports helps the project determine what software is most
|
||||
# popular and should be included on the first CD/DVD.
|
||||
#popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
### Boot loader installation
|
||||
# Grub is the boot loader (for x86).
|
||||
|
||||
# This is fairly safe to set, it makes grub install automatically to the UEFI
|
||||
# partition/boot record if no other operating system is detected on the machine.
|
||||
d-i grub-installer/only_debian boolean true
|
||||
|
||||
# This one makes grub-installer install to the UEFI partition/boot record, if
|
||||
# it also finds some other OS, which is less safe as it might not be able to
|
||||
# boot that other OS.
|
||||
#d-i grub-installer/with_other_os boolean true
|
||||
|
||||
# Due notably to potential USB sticks, the location of the primary drive can
|
||||
# not be determined safely in general, so this needs to be specified:
|
||||
d-i grub-installer/bootdev string /dev/vda
|
||||
# To install to the primary device (assuming it is not a USB stick):
|
||||
#d-i grub-installer/bootdev string default
|
||||
|
||||
# Alternatively, if you want to install to a location other than the UEFI
|
||||
# parition/boot record, uncomment and edit these lines:
|
||||
#d-i grub-installer/only_debian boolean false
|
||||
#d-i grub-installer/with_other_os boolean false
|
||||
#d-i grub-installer/bootdev string (hd0,1)
|
||||
# To install grub to multiple disks:
|
||||
#d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1)
|
||||
|
||||
# Optional password for grub, either in clear text
|
||||
#d-i grub-installer/password password r00tme
|
||||
#d-i grub-installer/password-again password r00tme
|
||||
# or encrypted using an MD5 hash, see grub-md5-crypt(8).
|
||||
#d-i grub-installer/password-crypted password [MD5 hash]
|
||||
|
||||
# Use the following option to add additional boot parameters for the
|
||||
# installed system (if supported by the bootloader installer).
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
#d-i debian-installer/add-kernel-opts string nousb
|
||||
|
||||
### Finishing up the installation
|
||||
# During installations from serial console, the regular virtual consoles
|
||||
# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
|
||||
# line to prevent this.
|
||||
#d-i finish-install/keep-consoles boolean true
|
||||
|
||||
# Avoid that last message about the install being complete.
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
# This will prevent the installer from ejecting the CD during the reboot,
|
||||
# which is useful in some situations.
|
||||
#d-i cdrom-detect/eject boolean false
|
||||
|
||||
# This is how to make the installer shutdown when finished, but not
|
||||
# reboot into the installed system.
|
||||
d-i debian-installer/exit/halt boolean true
|
||||
# This will power off the machine instead of just halting it.
|
||||
d-i debian-installer/exit/poweroff boolean true
|
||||
|
||||
### Preseeding other packages
|
||||
# Depending on what software you choose to install, or if things go wrong
|
||||
# during the installation process, it's possible that other questions may
|
||||
# be asked. You can preseed those too, of course. To get a list of every
|
||||
# possible question that could be asked during an install, do an
|
||||
# installation, and then run these commands:
|
||||
# debconf-get-selections --installer > file
|
||||
# debconf-get-selections >> file
|
||||
|
||||
|
||||
#### Advanced options
|
||||
### Running custom commands during the installation
|
||||
# d-i preseeding is inherently not secure. Nothing in the installer checks
|
||||
# for attempts at buffer overflows or other exploits of the values of a
|
||||
# preconfiguration file like this one. Only use preconfiguration files from
|
||||
# trusted locations! To drive that home, and because it's generally useful,
|
||||
# here's a way to run any shell command you'd like inside the installer,
|
||||
# automatically.
|
||||
|
||||
# This first command is run as early as possible, just after
|
||||
# preseeding is read.
|
||||
#d-i preseed/early_command string anna-install some-udeb
|
||||
# This command is run immediately before the partitioner starts. It may be
|
||||
# useful to apply dynamic partitioner preseeding that depends on the state
|
||||
# of the disks (which may not be visible when preseed/early_command runs).
|
||||
#d-i partman/early_command \
|
||||
# string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
|
||||
# This command is run just before the install finishes, but when there is
|
||||
# still a usable /target directory. You can chroot to /target and use it
|
||||
# directly, or use the apt-install and in-target commands to easily install
|
||||
# packages and run commands in the target system.
|
||||
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
|
||||
|
||||
20
format_btrfs
Executable file
20
format_btrfs
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
lsblk
|
||||
echo
|
||||
read -P 'Device (/dev/vda2):' -l device
|
||||
|
||||
if test -z "$device"
|
||||
set device /dev/vda2
|
||||
end
|
||||
|
||||
mkfs.btrfs $device
|
||||
mount $device /mnt
|
||||
btrfs subvolume create /mnt/root
|
||||
btrfs subvolume create /mnt/home
|
||||
umount /mnt
|
||||
|
||||
mount -o subvol=root,compress=zstd $device /mnt
|
||||
mount -m -o subvol=home,compress=zstd $device /mnt/home
|
||||
|
||||
lsblk
|
||||
15
greetd_niri.kdl
Normal file
15
greetd_niri.kdl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
spawn-sh-at-startup "swaybg --image /usr/share/wallpapers/Path/contents/images/2560x1440.jpg"
|
||||
spawn-sh-at-startup "gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'"
|
||||
spawn-sh-at-startup "gtkgreet -l -s /etc/greetd/gtkgreet.css; niri msg action quit --skip-confirmation"
|
||||
input {
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
mouse {
|
||||
accel-profile "flat"
|
||||
}
|
||||
}
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
37
gtkgreet.css
Normal file
37
gtkgreet.css
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* Example colors for adw-gtk3 */
|
||||
|
||||
@define-color accent_color #76946a;
|
||||
@define-color accent_bg_color #76946a;
|
||||
@define-color accent_fg_color #e6e1e5;
|
||||
@define-color window_bg_color #1f1f28;
|
||||
@define-color window_fg_color #ffffff;
|
||||
@define-color headerbar_bg_color #1f1f28;
|
||||
@define-color headerbar_fg_color #ffffff;
|
||||
@define-color popover_bg_color #2a2a36;
|
||||
@define-color popover_fg_color #ffffff;
|
||||
@define-color view_bg_color #1f1f28;
|
||||
@define-color view_fg_color #ffffff;
|
||||
@define-color card_bg_color #1f1f28;
|
||||
@define-color card_fg_color #ffffff;
|
||||
|
||||
@define-color sidebar_bg_color #2c2c39;
|
||||
@define-color sidebar_fg_color #ffffff;
|
||||
@define-color sidebar_border_color @window_bg_color;
|
||||
@define-color sidebar_backdrop_color @window_bg_color;
|
||||
|
||||
/* Important bit (borrowed from Fedora 43 /etc/gtkgreet/gtkgreet.css) */
|
||||
|
||||
window, window.background {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#body {
|
||||
background: @window_bg_color;
|
||||
padding: 50px;
|
||||
padding-top: 80px;
|
||||
border-radius: 15px;
|
||||
border-width: 0px;
|
||||
/* Based on the CSD shadow style from Adwaita */
|
||||
box-shadow: 0 3px 9px 1px alpha(black, 0.5),
|
||||
0 0 0 1px alpha(@borders, 0.2);
|
||||
}
|
||||
132
install_arch
132
install_arch
|
|
@ -2,19 +2,33 @@
|
|||
|
||||
function main
|
||||
log 'Enter your configuration'
|
||||
read -P 'Timezone: ' -l timezone
|
||||
read -P 'Hostname: ' -l new_host_name
|
||||
read -P 'Network interface: ' -l net_interface
|
||||
read -P 'Username: ' -l username
|
||||
read -P 'Is your disk encrypted? (y/N) ' -l is_encrypt
|
||||
read -P 'Timezone (America/New_York): ' -l timezone
|
||||
read -P 'Hostname (archlinux): ' -l new_host_name
|
||||
read -P 'Username (m): ' -l username
|
||||
read -P 'Password: ' -s -l pass
|
||||
read -P 'Confirm: ' -s -l confpass
|
||||
|
||||
set -l encrypted_uuid ''
|
||||
if test "$is_encrypt" = 'y'; or test "$is_encrypt" = 'Y'
|
||||
read -P 'Encrypted device UUID: ' encrypted_uuid
|
||||
while test "$pass" != "$confpass"
|
||||
echo 'Passwords did not match!'
|
||||
read -P 'Password: ' -s -f pass
|
||||
read -P 'Confirm: ' -s -f confpass
|
||||
end
|
||||
|
||||
read -P 'Boot mode (bios/uefi): ' -l boot_mode
|
||||
read -P 'Grub target: ' -l device
|
||||
read -P 'Network client (NM/networkd): ' -l network
|
||||
read -P 'Boot mode (BIOS/uefi): ' -l boot_mode
|
||||
read -P 'Boot target: ' -l device
|
||||
#read -P 'Is your disk encrypted? (y/N) ' -l is_encrypt
|
||||
|
||||
read -P 'Continue? (y/N): ' -l ready
|
||||
|
||||
if test "$ready" != y; and test "$ready" != Y
|
||||
return
|
||||
end
|
||||
|
||||
set -l encrypted_uuid ''
|
||||
if test "$is_encrypt" = y; or test "$is_encrypt" = Y
|
||||
read -P 'Encrypted device UUID: ' encrypted_uuid
|
||||
end
|
||||
|
||||
set_timezone $timezone
|
||||
|
||||
|
|
@ -22,21 +36,27 @@ function main
|
|||
|
||||
set_hostname $new_host_name
|
||||
|
||||
configure_wired_network $net_interface
|
||||
|
||||
if test "$is_encrypt" = 'y'; or test "$is_encrypt" = 'Y'
|
||||
add_lvm2_mkinitcpio_hook true
|
||||
if test "$network" = networkd
|
||||
configure_systemd_networkd
|
||||
else
|
||||
add_lvm2_mkinitcpio_hook
|
||||
configure_network_manager
|
||||
end
|
||||
|
||||
if test "$is_encrypt" = y; or test "$is_encrypt" = Y
|
||||
add_lvm2_mkinitcpio_hook true
|
||||
end
|
||||
|
||||
mkinitcpio -P
|
||||
|
||||
configure_sudo
|
||||
|
||||
create_admin_user $username
|
||||
|
||||
install_grub $boot_mode $device $encrypted_uuid
|
||||
create_admin_user $username $pass
|
||||
|
||||
install_openssh
|
||||
|
||||
install_zram
|
||||
|
||||
install_bootloader $boot_mode $device $encrypted_uuid
|
||||
end
|
||||
|
||||
function install
|
||||
|
|
@ -49,6 +69,9 @@ function log -a message level
|
|||
end
|
||||
|
||||
function set_timezone -a timezone
|
||||
if test -z "$timezone"
|
||||
set -f timezone America/New_York
|
||||
end
|
||||
log "Setting timezone to $timezone"
|
||||
ln -sf /usr/share/zoneinfo/$timezone /etc/localtime
|
||||
|
||||
|
|
@ -56,7 +79,6 @@ function set_timezone -a timezone
|
|||
hwclock --systohc
|
||||
end
|
||||
|
||||
|
||||
function set_locale
|
||||
log 'Setting locale to en_US.UTF-8 and generating it'
|
||||
sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen
|
||||
|
|
@ -64,8 +86,10 @@ function set_locale
|
|||
echo 'LANG=en_US.UTF-8' >/etc/locale.conf
|
||||
end
|
||||
|
||||
|
||||
function set_hostname -a new_hostname
|
||||
if test -z "$new_hostname"
|
||||
set -f new_hostname archlinux
|
||||
end
|
||||
log "Setting hostname to $new_hostname"
|
||||
echo $new_hostname >/etc/hostname
|
||||
echo "
|
||||
|
|
@ -74,12 +98,11 @@ function set_hostname -a new_hostname
|
|||
127.0.1.1 $new_hostname.local $new_hostname" >>/etc/hosts
|
||||
end
|
||||
|
||||
|
||||
function configure_wired_network -a interface
|
||||
log "Configuring DHCP managed wired interface $interface"
|
||||
function configure_systemd_networkd
|
||||
log "Configuring systemd-resolved wired interface"
|
||||
echo "
|
||||
[Match]
|
||||
Name=$interface
|
||||
Name=en*
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
|
|
@ -88,19 +111,25 @@ IPv6PrivacyExtensions=yes" >/etc/systemd/network/20-wired.network
|
|||
log 'Enabling systemd networkd and resolved services'
|
||||
systemctl enable systemd-networkd.service
|
||||
systemctl enable systemd-resolved.service
|
||||
systemctl start systemd-networkd.service
|
||||
systemctl start systemd-resolved.service
|
||||
|
||||
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
end
|
||||
|
||||
function configure_network_manager
|
||||
log "Configuring NetworkManager wired interface"
|
||||
install networkmanager
|
||||
|
||||
log 'Enabling systemd networkd and resolved services'
|
||||
systemctl enable NetworkManager.service
|
||||
systemctl enable systemd-resolved.service
|
||||
end
|
||||
|
||||
function add_lvm2_mkinitcpio_hook -a is_encrypt
|
||||
log 'Adding lvm2 mkinitcpio hook'
|
||||
|
||||
set -l hooks 'lvm2'
|
||||
set -l hooks lvm2
|
||||
if test -n "$is_encrypt"
|
||||
set hooks 'encrypt' $hooks
|
||||
set hooks encrypt $hooks
|
||||
end
|
||||
|
||||
sed -i "s/modconf block filesystems/modconf block $hooks filesystems/" /etc/mkinitcpio.conf
|
||||
|
|
@ -109,40 +138,49 @@ function add_lvm2_mkinitcpio_hook -a is_encrypt
|
|||
install lvm2
|
||||
end
|
||||
|
||||
|
||||
function configure_sudo
|
||||
log 'Adding and configuring sudo group'
|
||||
log 'Adding and configuring wheel group'
|
||||
install sudo
|
||||
groupadd sudo
|
||||
|
||||
echo "# Enable sudo group
|
||||
%sudo ALL=(ALL) ALL" | sudo tee /etc/sudoers.d/sudo_group
|
||||
sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
||||
end
|
||||
|
||||
function create_admin_user -a username
|
||||
log "Creating user $username and adding to sudo group"
|
||||
useradd -m $username
|
||||
passwd $username
|
||||
gpasswd -a $username sudo
|
||||
function create_admin_user -a username pass
|
||||
if test -z "$username"
|
||||
set -f username m
|
||||
end
|
||||
log "Creating user $username and adding to wheel group"
|
||||
useradd -m -G wheel -s /usr/bin/fish $username
|
||||
echo $pass | passwd -s $username
|
||||
passwd -l root
|
||||
end
|
||||
|
||||
function install_grub -a boot_mode target encrypted_uuid
|
||||
function install_bootloader -a boot_mode target encrypted_uuid
|
||||
if test "$boot_mode" = uefi
|
||||
log "Installing systemd-boot with root $target"
|
||||
|
||||
bootctl install
|
||||
set -lx partuuid (blkid --match-tag PARTUUID --output value $target)
|
||||
echo "title Arch Linux
|
||||
linux /vmlinuz-linux
|
||||
initrd /initramfs-linux.img
|
||||
options root=PARTUUID=$partuuid rootflags=subvol=root rootfstype=btrfs zswap.enabled=0 rw quiet" >/boot/loader/entries/arch.conf
|
||||
else
|
||||
log "Installing grub to target $target"
|
||||
|
||||
switch $boot_mode
|
||||
case bios
|
||||
install grub
|
||||
grub-install --target=i386-pc $target
|
||||
case uefi
|
||||
install grub efibootmgr
|
||||
grub-install --target=x86_64-efi --efi-directory=$target --bootloader-id=GRUB
|
||||
end
|
||||
|
||||
if test -n "$encrypted_uuid"
|
||||
sed -i "s/loglevel=3 quiet/loglevel=3 quiet cryptdevice=UUID=$encrypted_uuid:cryptlvm/" /etc/default/grub
|
||||
end
|
||||
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
end
|
||||
end
|
||||
|
||||
function install_zram
|
||||
log "Installing and configuring zram-generator"
|
||||
install zram-generator
|
||||
echo '[zram0]' >/etc/systemd/zram-generator.conf
|
||||
end
|
||||
|
||||
function install_openssh
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
test -e /etc/os-release; and source /etc/os-release
|
||||
|
||||
set -l uname (uname)
|
||||
|
||||
if test $uname = Darwin
|
||||
set -l distro mac
|
||||
else
|
||||
set -l distro $ID
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
end
|
||||
|
||||
read -P "OS? (arch/debian/fedora/mac) " -l distro
|
||||
|
||||
set -l base_pkgs \
|
||||
fish \
|
||||
git \
|
||||
|
|
@ -17,61 +13,69 @@ set -l base_pkgs \
|
|||
tmux \
|
||||
rsync \
|
||||
curl \
|
||||
less \
|
||||
fzf \
|
||||
mosh \
|
||||
lsd \
|
||||
ripgrep \
|
||||
bat
|
||||
bat \
|
||||
tree-sitter-cli \
|
||||
nodejs \
|
||||
zoxide \
|
||||
git-delta
|
||||
|
||||
set -l mac_pkgs \
|
||||
$base_pkgs \
|
||||
fd \
|
||||
yazi \
|
||||
git-delta \
|
||||
starship
|
||||
yazi
|
||||
|
||||
set -l arch_pkgs \
|
||||
$base_pkgs \
|
||||
fd \
|
||||
yazi \
|
||||
git-delta \
|
||||
starship
|
||||
ttf-nerd-fonts-symbols \
|
||||
ttf-nerd-fonts-symbols-common \
|
||||
ttf-nerd-fonts-symbols-mono
|
||||
|
||||
set -l debian_pkgs \
|
||||
$base_pkgs \
|
||||
fd-find
|
||||
|
||||
set -l fedora_pkgs \
|
||||
$base_pkgs \
|
||||
fd-find
|
||||
|
||||
switch $distro
|
||||
case mac
|
||||
log 'Installing packages with Homebrew'
|
||||
brew install $mac_pkgs
|
||||
case arch
|
||||
log 'Installing Pikaur'
|
||||
log 'Installing yay'
|
||||
|
||||
install_pkgs --needed base-devel
|
||||
sudo pacman --sync --needed --noconfirm base-devel go
|
||||
or return $status
|
||||
|
||||
set -l cwd (pwd)
|
||||
and set -l tmp_dir (mktemp --directory)
|
||||
or return $status
|
||||
|
||||
git clone https://aur.archlinux.org/pikaur.git $tmp_dir
|
||||
git clone https://aur.archlinux.org/yay.git $tmp_dir
|
||||
and cd $tmp_dir
|
||||
and makepkg --clean --install --rmdeps --syncdeps --noconfirm
|
||||
and makepkg --syncdeps --install --noconfirm
|
||||
and cd $cwd
|
||||
or return $status
|
||||
|
||||
log 'Installing packages with Pikaur '
|
||||
log 'Installing packages with yay'
|
||||
|
||||
pikaur --sync --refresh --sysupgrade --noconfirm
|
||||
and pikaur --sync --noconfirm $arch_pkgs
|
||||
yay --sync --refresh --sysupgrade --noconfirm
|
||||
and yay --sync --noconfirm $arch_pkgs
|
||||
case debian
|
||||
log 'Installing packages with APT'
|
||||
sudo apt-get --quiet --yes update
|
||||
and sudo apt-get --quiet --yes upgrade
|
||||
and sudo apt-get --quiet --yes install $debian_pkgs
|
||||
end
|
||||
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
case fedora
|
||||
log 'Installing packages with DNF'
|
||||
sudo dnf upgrade --assumeyes
|
||||
and sudo dnf --assumeyes install $fedora_pkgs
|
||||
end
|
||||
|
|
|
|||
Binary file not shown.
89
pkglist.txt
89
pkglist.txt
|
|
@ -1,89 +0,0 @@
|
|||
age
|
||||
android-studio
|
||||
android-tools
|
||||
archlinux-contrib
|
||||
aria2
|
||||
aws-cli-v2
|
||||
barrier
|
||||
bat
|
||||
bspwm
|
||||
bun-bin
|
||||
caddy
|
||||
cbatticon
|
||||
curl
|
||||
discord
|
||||
dunst
|
||||
easyeffects
|
||||
feh
|
||||
firefox
|
||||
firewalld
|
||||
fish
|
||||
flameshot
|
||||
fzf
|
||||
git
|
||||
git-delta
|
||||
glances
|
||||
htop
|
||||
inxi
|
||||
jellyfin-mpv-shim
|
||||
jq
|
||||
keepassxc
|
||||
light
|
||||
mosh
|
||||
mpv
|
||||
ncdu
|
||||
neofetch
|
||||
neovim
|
||||
nnn
|
||||
noto-fonts-emoji
|
||||
pacman-contrib
|
||||
parsec-bin
|
||||
pasystray
|
||||
pavucontrol
|
||||
picom
|
||||
pikaur
|
||||
pipewire
|
||||
pipewire-alsa
|
||||
pipewire-pulse
|
||||
playerctl
|
||||
polybar
|
||||
pyright
|
||||
python
|
||||
python-pip
|
||||
python-pynvim
|
||||
rclone
|
||||
reactotron
|
||||
reflector
|
||||
ripgrep
|
||||
rofi
|
||||
rsync
|
||||
slack-desktop
|
||||
slock
|
||||
speedtest-cli
|
||||
spotify-launcher
|
||||
starship
|
||||
steam
|
||||
streamlink
|
||||
streamlink-twitch-gui-bin
|
||||
stylua
|
||||
sxhkd
|
||||
syncthing
|
||||
terraform
|
||||
the_silver_searcher
|
||||
tigervnc
|
||||
tlp
|
||||
tmux
|
||||
traceroute
|
||||
ttf-font-awesome
|
||||
ttf-ibm-plex
|
||||
ttf-jetbrains-mono
|
||||
ttf-jetbrains-mono-nerd
|
||||
ttf-liberation
|
||||
ttf-nerd-fonts-symbols
|
||||
ttf-nerd-fonts-symbols-mono
|
||||
vlc
|
||||
wezterm
|
||||
wget
|
||||
wireguard-tools
|
||||
yt-dlp
|
||||
zoxide
|
||||
299
provision_linux
299
provision_linux
|
|
@ -1,299 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
#
|
||||
set general_help '
|
||||
A collection of useful functions for provisioning arch/debian linux.
|
||||
|
||||
Either run a function like ./provision_linux <function> [arg [arg [...]]
|
||||
or source the file and run them as commands:
|
||||
$ source ./provision_linux
|
||||
$ lint [args]
|
||||
|
||||
Run ./provision_linux <function_name> to see it\'s definition.
|
||||
'
|
||||
|
||||
### Config ###
|
||||
|
||||
set -g distro
|
||||
|
||||
for line in (cat /etc/os-release)
|
||||
set -l items (string split --max 1 '=' $line)
|
||||
|
||||
if test $items[1] = ID
|
||||
set distro $items[2]
|
||||
end
|
||||
end
|
||||
|
||||
### Commands ###
|
||||
|
||||
function terminal_env -d 'Install base terminal utilities and sync configurations'
|
||||
if test $distro = arch
|
||||
log 'Installing pikaur from AUR'
|
||||
|
||||
install_pkgs --needed base-devel
|
||||
|
||||
set -l cwd (pwd)
|
||||
set -l tmp_dir (mktemp --directory)
|
||||
|
||||
git clone https://aur.archlinux.org/pikaur.git $tmp_dir
|
||||
and cd $tmp_dir
|
||||
and makepkg --clean --install --rmdeps --syncdeps --noconfirm
|
||||
|
||||
cd $cwd
|
||||
rm -rf $tmp_dir
|
||||
end
|
||||
|
||||
set -l base_pkgs \
|
||||
fish \
|
||||
git \
|
||||
neovim \
|
||||
tmux \
|
||||
rsync \
|
||||
curl \
|
||||
fzf \
|
||||
nnn \
|
||||
mosh
|
||||
|
||||
set -l arch_pkgs \
|
||||
$base_pkgs \
|
||||
python-neovim \
|
||||
the_silver_searcher \
|
||||
bat \
|
||||
sysz
|
||||
|
||||
set -l debian_pkgs \
|
||||
$base_pkgs \
|
||||
silversearcher-ag
|
||||
|
||||
log 'Installing base terminal utilities'
|
||||
install_pkgs
|
||||
or return $status
|
||||
|
||||
log 'Setting m\'s default shell to fish'
|
||||
sudo chsh -s /usr/bin/fish m
|
||||
|
||||
log 'Running sync script'
|
||||
./sync --desktop
|
||||
|
||||
log 'Installing asdf-vm'
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
|
||||
and cd ~/.asdf
|
||||
and git checkout (git describe --abbrev=0 --tags)
|
||||
end
|
||||
|
||||
function desktop_env -d 'Install base desktop utilities and configure theme'
|
||||
set -l base_pkgs \
|
||||
xclip \
|
||||
bspwm \
|
||||
sxhkd \
|
||||
picom \
|
||||
feh \
|
||||
rofi \
|
||||
wget \
|
||||
unzip \
|
||||
physlock \
|
||||
pipewire \
|
||||
playerctl \
|
||||
tar \
|
||||
xz
|
||||
|
||||
|
||||
set -l arch_pkgs \
|
||||
$base_pkgs \
|
||||
xorg-server \
|
||||
xorg-xinit \
|
||||
ttf-ibm-plex \
|
||||
ttf-jetbrains-mono \
|
||||
pavucontrol \
|
||||
wmname \
|
||||
pipewire-pulse \
|
||||
pipewire-alsa \
|
||||
polybar \
|
||||
light \
|
||||
wezterm \
|
||||
slock
|
||||
|
||||
set -l debian_pkgs \
|
||||
$base_pkgs \
|
||||
xinit \
|
||||
fonts-ibm-plex \
|
||||
suckless-tools \
|
||||
polybar
|
||||
|
||||
log 'Installing base desktop environment utilities'
|
||||
install_pkgs
|
||||
or return $status
|
||||
|
||||
log 'Setting xinitrc'
|
||||
echo '#!/bin/sh
|
||||
|
||||
userresources=$HOME/.Xresources
|
||||
usermodmap=$HOME/.Xmodmap
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
xrdb -merge $sysresources
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
xmodmap $sysmodmap
|
||||
fi
|
||||
|
||||
if [ -f "$userresources" ]; then
|
||||
xrdb -merge "$userresources"
|
||||
fi
|
||||
|
||||
if [ -f "$usermodmap" ]; then
|
||||
xmodmap "$usermodmap"
|
||||
fi
|
||||
|
||||
# start some nice programs
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
rm -f $HOME/.bspwm_no_lock
|
||||
|
||||
exec bspwm' >~/.xinitrc
|
||||
|
||||
log 'Installing arc-gruvbox theme'
|
||||
mkdir -p ~/.themes
|
||||
xzcat ./oomox-arc-gruvbox.tar.xz | tar --extract --directory=$HOME/.themes
|
||||
|
||||
if test $distro = debian
|
||||
log 'Installing JetBrains Mono font manually'
|
||||
|
||||
set -l cwd (pwd)
|
||||
set -l tmp_dir (mktemp --directory)
|
||||
|
||||
cd $tmp_dir
|
||||
|
||||
wget -q https://github.com/JetBrains/JetBrainsMono/releases/download/v2.002/JetBrainsMono-2.002.zip
|
||||
and unzip -q JetBrainsMono-2.002.zip
|
||||
and mkdir -p ~/.local/share/fonts/truetype/JetBrainsMono
|
||||
and cp ./ttf/*.ttf ~/.local/share/fonts/truetype/JetBrainsMono/
|
||||
|
||||
cd $cwd
|
||||
rm -r $tmp_dir
|
||||
end
|
||||
|
||||
log 'Setting gtk theme'
|
||||
mkdir ~/.config/gtk-3.0
|
||||
echo "
|
||||
[Settings]
|
||||
gtk-icon-theme-name = Adwaita
|
||||
gtk-theme-name = oomox-arc-gruvbox
|
||||
gtk-font-name = IBM Plex Sans 11" >~/.config/gtk-3.0/settings.ini
|
||||
end
|
||||
|
||||
function m_net -d 'Install syncthing and keepassxc'
|
||||
log 'Installing m-net utilities'
|
||||
install_pkgs \
|
||||
wireguard-tools \
|
||||
keepassxc \
|
||||
syncthing
|
||||
or return $status
|
||||
|
||||
log 'Enabling syncthing service'
|
||||
sudo systemctl enable syncthing@m.service
|
||||
end
|
||||
|
||||
function libvirt -d 'Provision libvirt and virt-manager'
|
||||
log 'Installing libvirt, qemu, and virt-manager'
|
||||
install_libvirt
|
||||
end
|
||||
|
||||
function vagrant -d 'Provision vagrant with libvirt'
|
||||
install_libvirt
|
||||
or return $status
|
||||
|
||||
log 'Installing vagrant and libvirt plugin'
|
||||
set -l arch_pkgs vagrant
|
||||
set -l debian_pkgs vagrant-libvirt
|
||||
|
||||
install_pkgs
|
||||
or return $status
|
||||
|
||||
vagrant plugin install vagrant-libvirt
|
||||
end
|
||||
|
||||
function install_libvirt
|
||||
set -l base_pkgs \
|
||||
virt-manager \
|
||||
virt-install \
|
||||
virt-viewer \
|
||||
dnsmasq \
|
||||
dmidecode
|
||||
|
||||
set -l arch_pkgs \
|
||||
$base_pkgs \
|
||||
libvirt \
|
||||
qemu \
|
||||
ebtables
|
||||
|
||||
set -l debian_pkgs \
|
||||
$base_pkgs \
|
||||
qemu-system \
|
||||
libvirt-clients \
|
||||
libvirt-daemon-system
|
||||
|
||||
install_pkgs
|
||||
|
||||
log 'Adding m to libvirt group and enabling libvirtd service'
|
||||
switch $distro
|
||||
case debian
|
||||
sudo adduser m libvirt
|
||||
case arch
|
||||
sudo gpasswd -a m libvirt
|
||||
end
|
||||
|
||||
sudo systemctl enable libvirtd.service
|
||||
end
|
||||
|
||||
function install_pkgs -S
|
||||
switch $distro
|
||||
case arch
|
||||
set -l cmd sudo pacman
|
||||
|
||||
if command -q pikaur
|
||||
set cmd pikaur
|
||||
end
|
||||
|
||||
$cmd --sync --refresh --sysupgrade --noconfirm
|
||||
and $cmd --sync --noconfirm $arch_pkgs $argv
|
||||
case debian
|
||||
sudo apt-get --quiet --yes update
|
||||
and sudo apt-get --quiet --yes upgrade
|
||||
and sudo apt-get --quiet --yes install $debian_pkgs $argv
|
||||
end
|
||||
end
|
||||
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
end
|
||||
|
||||
# --- execution/help handling ---
|
||||
|
||||
function help -a function_name -d 'Displays help for internal function'
|
||||
if test -n "$function_name"
|
||||
functions $function_name
|
||||
else
|
||||
echo $general_help
|
||||
end
|
||||
end
|
||||
|
||||
argparse --ignore-unknown h/help -- $argv
|
||||
|
||||
if test -n "$_flag_h"
|
||||
help $argv
|
||||
else if test -n "$argv"
|
||||
$argv
|
||||
else
|
||||
echo $general_help
|
||||
end
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
if command -q prime-run
|
||||
prime-run /usr/bin/streamlink-twitch-gui
|
||||
else
|
||||
/usr/bin/streamlink-twitch-gui
|
||||
end
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
if command -q prime-run
|
||||
set -lx __NV_PRIME_RENDER_OFFLOAD 1
|
||||
set -lx __VK_LAYER_NV_optimus NVIDIA_only
|
||||
/usr/bin/wezterm $argv
|
||||
else
|
||||
/usr/bin/wezterm $argv
|
||||
end
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
if command -q prime-run
|
||||
set -lx __NV_PRIME_RENDER_OFFLOAD 1
|
||||
set -lx __VK_LAYER_NV_optimus NVIDIA_only
|
||||
/usr/bin/wezterm-gui $argv
|
||||
else
|
||||
/usr/bin/wezterm-gui $argv
|
||||
end
|
||||
2
sync
2
sync
|
|
@ -73,6 +73,7 @@ end
|
|||
|
||||
function sync_desktop_env -a uname
|
||||
rsync -aP ./.wezterm.lua ~/
|
||||
rsync -aP ./.config/ghostty ~/.config/
|
||||
or return 1
|
||||
|
||||
switch $uname
|
||||
|
|
@ -86,6 +87,7 @@ function sync_desktop_env -a uname
|
|||
and rsync -aP ./.config/picom ~/.config/
|
||||
and rsync -aP ./.config/polybar ~/.config/
|
||||
and rsync -aP ./.config/rofi ~/.config/
|
||||
and rsync -aP ./.config/niri ~/.config/
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function main
|
||||
log 'Update apt sources list'
|
||||
echo '
|
||||
deb http://ftp.us.debian.org/debian unstable main contrib non-free
|
||||
deb-src http://ftp.us.debian.org/debian unstable main contrib non-free' | sudo tee /etc/apt/sources.list
|
||||
|
||||
log 'Upgrading debian to unstable'
|
||||
sudo apt-get --quiet --yes update
|
||||
sudo apt-get --quiet --yes dist-upgrade
|
||||
|
||||
log 'Rebooting'
|
||||
sudo reboot
|
||||
end
|
||||
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
end
|
||||
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue