Compare commits

..

1 Commits
main ... nixos

Author SHA1 Message Date
lelgenio 850d98c48f init 2022-02-10 10:31:56 -03:00
115 changed files with 1152 additions and 2428 deletions

View File

@ -1,252 +0,0 @@
alacritty
alsa-utils
archlinux-appstream-data-pamac
autoconf
automake
autopep8
base
bash-language-server
bat
bc
bemenu-wayland
binutils
bison
blade-formatter
blender
bluez-plugins
bluez-utils
bpython
bpytop
breeze-obsidian-cursor-theme
btrfs-progs
caffeinated
capitaine-cursors
cargo-edit
cargo-watch
clyrics
composer
cronie
deemix
deluge
deluge-gtk
dhcpcd
diffr
direnv
discord_arch_electron
docker
docker-compose
dotdrop
efibootmgr
emmet-cli
engrampa
entr
exa
fail2ban
fakeroot
fd
ffmpegthumbnailer
firefox
fish
flex
fuzzel
fzf
gammastep
gcc
gdb
gimp
git
gnu-netcat
grim
grub
gst-editing-services
gst-libav
gst-plugin-gtk
gst-plugin-pipewire
gst-plugins-bad
gst-plugins-bad-libs
gst-plugins-base
gst-plugins-base-libs
gst-plugins-good
gstreamer
gtk-engine-murrine
gtk3-nocsd-legacy-git
helix
htop
hunspell-pt-br
inetutils
intel-compute-runtime
intel-gpu-tools
intel-media-driver
intel-ucode
inter-font
inxi
iotop
ipython
isync
iwd
j4-dmenu-desktop
jitsi-meet-desktop-bin
kakoune
kanshi
kdeconnect
khal
khard
kitty
kvantum
lib32-libappindicator-gtk2
lib32-libappindicator-gtk3
libappindicator-gtk2
libopenraw
libpipewire02
libreoffice-fresh
libreoffice-fresh-pt-br
libtool
libva-intel-driver
libva-mesa-driver
libva-utils
libva-vdpau-driver
libvdpau-va-gl
light
linux-firmware
linux-zen
lutris
lutris-wine-meta
lynx
m4
make
mako
man-db
mariadb
mesa-vdpau
meson
micro
mpc
mpd
mpdris2
mpv
mtr
ncmpcpp
neofetch
neomutt
nerd-fonts-fira-code
nerd-fonts-hack
net-tools
networkmanager
nmap
nodejs-intelephense
nodejs-less
nodejs-less-plugin-clean-css
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-extra
ntp
obs-studio
orchis-kde-theme-git
orchis-theme-git
otf-font-awesome
p7zip
pacman-contrib
pamixer
papirus-folders
papirus-icon-theme
papirus-libreoffice-theme
paru
pass
patch
pavucontrol
php7
php7-apache
phpmyadmin
pikaur
pipewire-alsa
pipewire-jack
pipewire-media-session
pkgconf
pkgfile
playerctl
postgresql
powertop
pqiv
prettier
pulseaudio
pulseaudio-alsa
pulsemixer
python-pydocstyle
python-pyflakes
python-pylint
python-pynvim
python-rope
qemu
qt5-styleplugins
qt5ct
qt6ct
qt6gtk2
qutebrowser
ranger
rclone
reflector
ripgrep
rsync
ruby-fusuma
rust-analyzer
sassc
sd
shfmt
slurp
so
speedtest-cli
sshfs
starship
steam-native-runtime
sudo
swappy
sway
swayidle
swaylock
syncthing
tealdeer
telegram-desktop
texinfo
thunar
thunar-archive-plugin
thunar-vcs-plugin
thunar-volman
tlp
tor
translate-shell
transmission-cli
trash-cli
ttf-dejavu
ttf-font-awesome
ttf-liberation
ttf-ms-fonts
tumbler
tuxi-git
udiskie
uglify-js
urlview
vdirsyncer
vdpauinfo
visual-studio-code-bin
vscode-css-languageserver
vscode-html-languageserver
vscode-json-languageserver
vulkan-intel
vulkan-mesa-layers
vulkan-tools
waybar
wf-recorder
wget
which
wine-mono
winetricks
wl-clipboard
wtype
xdg-desktop-portal-wlr
xorg-xwayland
xsettingsd
yt-dlp
zathura
zathura-pdf-mupdf
zoxide

View File

@ -1,3 +0,0 @@
#!/bin/env fish
pacman -Qqe > arch.freeze

View File

@ -23,8 +23,7 @@ variables:
bar_pos: top
tmux: false
starship: false
asdf: false
user_svdir: $HOME/.config/runit
supervisor: runit
accent_fg: '#ffffff'
@ -58,10 +57,6 @@ variables:
###############################################################
profiles:
###############################################################
###############################################################
# Themes
###############################################################
dark:
@ -78,7 +73,6 @@ profiles:
txt: '#FFFFFF'
nontxt: '#252525'
random_range: "[a-f]"
normal:
black: '#404040'
red: '#AB4642'
@ -107,7 +101,6 @@ profiles:
txt: '#303030'
nontxt: '#D0D0D0'
random_range: "[0-4]"
normal:
black: '#555555'
red: '#D54E53'
@ -153,7 +146,6 @@ profiles:
tabR: Y
insertMode: s
insertQuit: kk
menu: s
qwerty:
variables:
@ -169,107 +161,30 @@ profiles:
tabR: O
insertMode: i
insertQuit: jj
menu: d
###############################################################
common:
# Main profile
###############################################################
main:
variables:
# gtk_theme: "Mint-Y{{@@ '-Dark' if color.type == 'dark' else '' @@}}-{{@@ accent_color_name.capitalize() @@}}"
gtk_theme: "Orchis-{{@@ accent_color_name.capitalize() @@}}-{{@@ color.type.capitalize() @@}}"
gtk_theme: "Orchis-{{@@ accent_color_name.lower() @@}}-{{@@ 'dark' if color.type == 'dark' else 'light' @@}}"
kvantum_theme: "Materia{{@@ color.type.capitalize() @@}}"
# icon_theme: "Mint-Y-{{@@ 'Dark' if color.type == 'dark' else 'Darker' @@}}-{{@@ accent_color_name.capitalize() @@}}"
icon_theme: "Papirus-{{@@ color.type.capitalize() @@}}"
cursor_theme: "Breeze_Obsidian"
# cursor_theme: "Breeze_Snow"
# cursor_theme: "capitaine-cursors"
dotfiles:
- ALL
include:
- "{{@@ key_layout @@}}"
- "{{@@ color_type @@}}"
- "accent_{{@@ accent_color_name @@}}"
dotfiles:
- alacritty
- backgrounds
- bat
- blender
- clang-format
- code-oss
- crontab
- dav
- deemix
- firefox
- fish
- fonts
- foot
- git
- gpg-agent
- i3
- imv
- kak-lsp
- kakoune
- kanshi
- kitty
- lesskey
- libinput-gestures
- mako
- mangohud
- mime
- mpd
- mpv
- mutt
- mypy
- nvim
- pqivrc
- prettierrc
- qutebrowser
- ranger
- rclone
- rustfmt
- scripts
- starship
- sway
- swaylock
- telegram-theme
- theme
- thunar
- tmux
- vscode
- waybar
- wofi
- xdpw
- zathura
###############################################################
# Os profiles
###############################################################
voidlinux:
include:
- "common"
variables:
supervisor: runit
dotfiles:
- runit_services
artixlinux:
include:
- "common"
dotfiles:
- arch-packages
- paru
variables:
supervisor: runit
archlinux:
include:
- "common"
dotfiles:
- arch-packages
- paru
- systemd
variables:
supervisor: systemd
###############################################################
config:
@ -310,16 +225,9 @@ actions:
true
reload_sway: swaymsg reload & disown
reload_mako: makoctl reload
reload_waybar: pkill -SIGUSR2 waybar
reload_runit_sv:
which sv 2> /dev/null &&
env SVDIR="{{@@ user_svdir @@}}" sv reload "{0}" ||
true
restart_systemd_sv:
systemctl --user restart "${0}"
enable_systemd_sv:
systemctl --user enable --now "{0}" &
reload_mako: pkill -SIGHUP mako
reload_waybar: env SVDIR=$HOME/.config/runit/sv sv hup waybar
reload_xsettingsd: env SVDIR=$HOME/.config/runit/sv sv hup xsettingsd
groups_install: _groups_install
lesskey: lesskey
reload_fish: pkill -SIGHUP fish
@ -346,7 +254,7 @@ actions:
crontab ~/.local/share/crontab
vdirsyncer: |
yes | vdirsyncer discover &
yes | vdirsyncer discover & disown
lnMail: |
ln -fs ~/.config/neomutt/mbsyncrc ~/.mbsyncrc
@ -358,18 +266,18 @@ actions:
https://github.com/alexanderjeurissen/ranger_devicons
~/.config/ranger/plugins/ranger_devicons
start_services: >
_runit_config "{{@@ _dotfile_abs_dst @@}}"
fusuma gammastep mako xsettingsd mpd mpDris2 telegram pipewire
pipewire-media-session xdpw pulseaudio kdeconnectd kdeconnect-indicator
kanshi swayidle waybar syncthing udiskie notify-mail
# bootstrap scripts
pam_gpg: _pam-gpg-strap
make_theme: _make_theme
qt6ct: |
cd "$HOME/.config"
rm -rf "qt6ct/"
cp -r "qt5ct/" "qt6ct"
mv "qt6ct/qt5ct.conf" "qt6ct/qt6ct.conf"
install_arch_meta: install_arch_meta
install_meta: install_meta
install_mpv: _mpv_install
filter_backgrounds: _backgrouds_filter
apply_gsetting_gnome: gsettings set org.gnome.desktop.interface {0} {1}
###############################################################
dotfiles: # Just a bunch of paths and action mappings
@ -489,34 +397,11 @@ dotfiles: # Just a bunch of paths and action mappings
- make_theme
- groups_install
runit_services:
services:
src: runit_sv
dst: ~/.config/runit
systemd:
src: systemd
dst: ~/.config/systemd/user
dst: ~/.config/runit/sv
actions:
- enable_systemd_sv caffeinated.service
- enable_systemd_sv gammastep.service
- enable_systemd_sv kanshi.service
- enable_systemd_sv mako.service
- enable_systemd_sv mpDris2.service
- enable_systemd_sv notify-mail.service
- enable_systemd_sv pipewire.service
- enable_systemd_sv kdeconnectd.service
- enable_systemd_sv kdeconnect-indicator.service
- enable_systemd_sv sway-idle.service
- enable_systemd_sv syncthing.service
- enable_systemd_sv telegram-desktop.service
- enable_systemd_sv waybar.service
- enable_systemd_sv xsettingsd.service
libinput-gestures:
src: libinput-gestures.conf
dst: ~/.config/libinput-gestures.conf
actions:
- reload_runit_sv libinput-gestures
- start_services
deemix:
src: deemix
@ -546,12 +431,7 @@ dotfiles: # Just a bunch of paths and action mappings
src: theme
dst: ~/
actions:
- qt6ct
- restart_systemd_sv xsettingsd
- reload_runit_sv xsettingsd
- apply_gsetting_gnome gtk-theme '{{@@ gtk_theme @@}}'
- apply_gsetting_gnome icon-theme '{{@@ icon_theme @@}}'
- apply_gsetting_gnome cursor-theme '{{@@ cursor_theme @@}}'
- reload_xsettingsd
prettierrc:
src: prettierrc.toml
@ -571,11 +451,11 @@ dotfiles: # Just a bunch of paths and action mappings
actions:
- pam_gpg
arch-packages:
packages:
src: meta.PKGBUILD
dst: ~/.local/share/metapkg/PKGBUILD
actions:
- install_arch_meta
- install_meta
kak-lsp:
src: kak-lsp.toml
@ -583,7 +463,7 @@ dotfiles: # Just a bunch of paths and action mappings
rustfmt:
src: rustfmt.toml
dst: ~/.config/rustfmt/rustfmt.toml
dst: ~/.rustfmt.toml
###############################################################
# Big pahts
@ -593,10 +473,6 @@ dotfiles: # Just a bunch of paths and action mappings
src: vscode.jsonc
dst: "~/.config/Code - OSS/User/settings.json"
vscode:
src: vscode.jsonc
dst: "~/.config/Code/User/settings.json"
telegram-theme:
src: ./telegram.palette
dst: ~/.local/share/TelegramDesktop/theme.tdesktop-palette
@ -616,9 +492,9 @@ dotfiles: # Just a bunch of paths and action mappings
alacritty: { "src":"alacritty.yml", "dst":"~/.config/alacritty.yml" }
bat: { "src":"bat", "dst":"~/.config/bat/config" }
foot: { "src": "foot.ini", "dst": "~/.config/foot/foot.ini" }
fusuma: { "src":"fusuma.yml", "dst":"~/.config/fusuma/config.yml" }
imv: { "src":"imv.conf", "dst":"~/.config/imv/config" }
kanshi: { "src":"kanshi", "dst":"~/.config/kanshi/config" }
mangohud: { "src":"MangoHud.conf", "dst":"~/.config/MangoHud/MangoHud.conf" }
mpd: { "src":"mpd.conf", "dst":"~/.config/mpd/mpd.conf" }
paru: { "src":"paru.conf", "dst":"~/.config/paru/paru.conf" }
pqivrc: { "src":"pqiv.ini", "dst":"~/.config/pqivrc" }

433
configuration.nix Normal file
View File

@ -0,0 +1,433 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, buildPythonPackage, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
# systemd.services = {
# create-swapfile = {
# serviceConfig.Type = "oneshot";
# wantedBy = [ "swap-swapfile.swap" ];
# script = ''
# ${pkgs.coreutils}/bin/truncate -s 0 /swap/swapfile
# ${pkgs.e2fsprogs}/bin/chattr +C /swap/swapfile
# ${pkgs.btrfs-progs}/bin/btrfs property set /swap/swapfile compression none
# '';
# };
# };
# Use the systemd-boot EFI boot loader.
boot.loader.grub.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "nodev";
boot.loader.grub.extraEntries = ''
menuentry 'Void GNU/Linux' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux 5.15.19_1 ...'
linux /vmlinuz-5.15.19_1 root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c ro rootflags=subvol=@void loglevel=4 rd.vconsole.keymap=colemak rd.luks.uuid=luks-7e99abff-be7a-4fa7-aeeb-e54e5fa9d9a8 rootfstype=btrfs rootflags=rw,noatime,compress=zstd:3,subvol=@void
echo 'Loading initial ramdisk ...'
initrd /initramfs-5.15.19_1.img
}
'';
#boot.kernelParams = [ "rd.vconsole.keymap=colemak" ];
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
#networking.interfaces.br-0990e9f22445.useDHCP = true;
# networking.interfaces.br-17830196a80a.useDHCP = true;
# networking.interfaces.docker0.useDHCP = true;
networking.interfaces.enp2s0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "pt_BR.UTF-8";
console = {
# font = "Lat2-Terminus16";
keyMap = "colemak";
};
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; })
];
# Enable the X11 windowing system.
services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.layout = "colemak";
# services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
nixpkgs.config.pulseaudio = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.lelgenio = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "input" "docker" ]; # Enable sudo for the user.
};
security.sudo.wheelNeedsPassword = false;
# programs.sway.enable = true;
# xdg.portal.wlr.enable = true;
services.pipewire.enable = true;
# Gnome
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.gnome.tracker-miners.enable = false;
services.gnome.tracker.enable = false;
home-manager.users.lelgenio = {
/* Here goes your home-manager config, eg home.packages = [ pkgs.foo ]; */
home.packages = with pkgs; [
# # missing
# # caffeinated
# # dotdrop
# # papirus-folders papirus-libreoffice-theme
# # tuxi-git
# # bluez bluez-utils bluez-plugins
# #thunar-vcs-plugin
# # clyrics
# # zathura-pdf-mupdf
# # libreoffice-fresh-pt-br hunspell-pt-br
# # neovim python-pynvim neovim-symlinks
# # Sway
sway swayidle swaylock waybar
bemenu j4-dmenu-desktop
# # Utility
fusuma light mako kanshi udiskie
gammastep
wtype
# # Configuration manager
xsettingsd
# # Screenshot
grim slurp swappy wl-clipboard imagemagick wf-recorder
# # Dav
vdirsyncer khal khard
# Audio
# pulseaudio pulseaudio-rtp pulseaudio-alsa pulseaudio-bluetooth
pamixer pulsemixer pavucontrol
# # # Fonts
# # # inter-font ttf-ms-fonts ttf-dejavu
# # # nerd-fonts-hack nerd-fonts-fira-code
# # # Icons
# # # otf-font-awesome ttf-font-awesome
# # Emoji and stuff
noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
papirus-icon-theme
capitaine-cursors
# # Terminal
# # Emulators
kitty alacritty
# #Tools
translate-shell tealdeer so
ranger atool p7zip jq fzf
neofetch htop bpytop
inxi entr
#Prompt
starship
# Replacements
#ls cat rm -rf grep find sed diff cd fmt
exa bat trash-cli ripgrep fd sd diffr zoxide par
# Network
iwd dhcpcd
# Transfer
wget curl rsync rclone nmap
# Testing
# tor nettools
netcat-gnu mtr speedtest-cli
inetutils
# ssh
openssh sshfs fail2ban
# Bluetooth
# Browser
qutebrowser yt-dlp
# # Email
neomutt urlview isync
# # # Files
xfce.thunar-volman
xfce.thunar-archive-plugin mate.engrampa
syncthing xdg-user-dirs
transmission
python39Packages.deemix
# Media
pqiv mpv
mpd mpc_cli ncmpcpp mpdris2
playerctl
kdeconnect
blender gimp
zathura
# Office
libreoffice-fresh
# Programing
kakoune
shfmt nodePackages.bash-language-server
# web lsp
nodePackages.vscode-css-languageserver-bin
# vscode-html-languageserver
# vscode-css-languageserver
# vscode-json-languageserver
# # php lsp
# # nodejs-intelephense
# # Python
# # ipython bpython
# # Python lsp
# # python-language-server
# # python-pylint autopep8 pyls-mypy
# # python-mccabe python-rope python-pyflakes
# # python-pycodestyle python-pydocstyle
# rust lsp
rust-analyzer
# Compiled
# rustc
cargo
gcc
gdb
meson
# # work
# # mariadb
# # php7 php7-apache
# # phpmyadmin
# # lipsum-git emmet-cli
# # blade-formatter prettier
# # nodejs-less nodejs-less-plugin-clean-css
# # uglify-js
# Virt
qemu
# Power manager
tlp
# # Gtk
# # gtk3-nocsd-legacy-git
# Qt
# qt5-base
# qt5-wayland
qt5ct
# kvantum-qt5
libsForQt5.qtstyleplugins
# # X11
# #xorg-xwayland
# # codecs
# # gst-plugins-good gst-plugins-bad
# Tray
libappindicator-gtk3
# lib32-libappindicator-gtk2 lib32-libappindicator-gtk3
# # Chat
# discord telegram-desktop
# jitsi-meet-desktop-bin
#
# # Gaming
# steam
# lutris
#lutris-wine-meta wine wine-mono winetricks
# File thumbnails
# tumbler
ffmpegthumbnailer poppler
libgsf libgepub
# libopenraw freetype2
# # alacritty
any-nix-shell
capitaine-cursors
hack-font
htop
kakoune
neomutt
nerdfonts
nodejs
orchis-theme
pass-wayland
# php-with-extensions
python3
# python3.8-pip
tdesktop
xfce.thunar
thunderbird
vscodium
waybar
wl-clipboard
yarn
yarn2nix
];
};
virtualisation.docker.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
micro
wget
firefox
fish
iwd
jq
diffr
docker
docker-compose
git
gnumake
tmux
ripgrep
gnome3.gnome-tweaks
];
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
# programs.fish.plugins = [
# {
# name = "nix-env.fish";
# src = pkgs.fetchFromGitHub {
# owner = "lilyball";
# repo = "nix-env.fish";
# rev = "7b65bd228429e852c8fdfa07601159130a818cfa";
# sha256 = "069ybzdj29s320wzdyxqjhmpm9ir5815yx6n522adav0z2nz8vs4";
# };
# }
# ];
# services.mysql.enable = true;
# services.mysql.package = pkgs.mariadb;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
# nix = {
# package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
# extraOptions = ''
# experimental-features = nix-command flakes
# '';
# };
}

View File

@ -1 +0,0 @@
full,histogram

View File

@ -4,11 +4,6 @@
# Behaviour
############################################################
shell:
program: /usr/bin/env
args:
- {{@@ shell @@}}
selection:
save_to_clipboard: true
@ -72,9 +67,7 @@ colors:
draw_bold_text_with_bright_colors: false
window:
opacity: {{@@ opacity @@}}
dynamic_padding: true
background_opacity: {{@@ opacity @@}}
############################################################

View File

@ -5,8 +5,7 @@ PATH={{@@ env['PATH'] @@}}
#minute hour day month day_week cmd
*/30 * * * * forecast json
*/5 * * * * checkmail update
*/30 * * * * vdirsyncer sync
*/30 * * * * pass git pull --rebase; pass git push
*/5 * * * * vdirsyncer sync
0 */6 * * * yes | vdirsyncer discover
*/30 * * * * savegame_backup
*/30 * * * * _gpg-unlock

View File

@ -1,8 +0,0 @@
# {{@@ header() @@}}
# A glob expression which matches all directories relevant.
path = "~/.local/share/calendars/*"
date_format = "%Y-%m-%d"
time_format = "%H:%M"
default_list = "Personal"
default_due = 48

View File

@ -9,8 +9,8 @@
"artistNameTemplate": "%artist%",
"createAlbumFolder": true,
"albumNameTemplate": "%album%",
"createCDFolder": false,
"createStructurePlaylist": false,
"createCDFolder": true,
"createStructurePlaylist": true,
"createSingleFolder": true,
"padTracks": true,
"paddingSize": "0",

View File

@ -80,8 +80,3 @@
display: none;
}
/*** END Remove webRTC indicator ***/
/*** BEGIN Remove title bar ***/
#titlebar {
display: none;
}
/*** END Remove title bar ***/

View File

@ -63,7 +63,7 @@ user_pref("devtools.editor.tabsize", 4);
user_pref("devtools.inspector.activeSidebar", "ruleview");
user_pref("devtools.inspector.three-pane-enabled", false);
user_pref("devtools.responsive.leftAlignViewport.enabled", true);
user_pref("devtools.theme", "auto");
user_pref("devtools.theme", "dark");
// hardware acceleration
user_pref("media.ffmpeg.vaapi.enabled", "true");

View File

@ -16,7 +16,9 @@ function calias
abbr -g mpn ncmpcpp
abbr -g dot "dotdrop install -f"
cabbr ytd "yt-dlp --merge-output-format mp4"
set -l root_cfg (dirname $DOTDROP_CONFIG)/root
alias rootdrop 'sudo dotdrop install -f -c "$root_cfg"'
cabbr p emerge
@ -30,31 +32,11 @@ cabbr p yay
cabbr p paru
################################################################
# Editor
################################################################
{%@@ if editor == "kak" @@%}
function kak --wraps kak
if contains -- -s $argv > /dev/null
or contains -- -c $argv > /dev/null
command kak $argv
return
end
set -l session (
echo $PWD |
string replace -r "$HOME/?" '' |
string replace -a '/' '_'
)
if test $HOME = $PWD
set session (basename $PWD)
end
command kak -c $session $argv 2> /dev/null
or command kak -s $session $argv
or command kak $argv
end
{%@@ endif @@%}
cabbr v {{@@ editor @@}}
cabbr rv sudoedit
@ -126,12 +108,38 @@ abbr -g gds 'git diff --staged'
abbr -g gc 'git commit'
abbr -g gca 'git commit --all'
abbr -g gcf 'git commit --fixup'
abbr -g gp 'git push -u origin (git branch --show-current)'
abbr -g gw 'git switch'
abbr -g gr 'cd (git root)'
abbr -g gri 'git rebase --interactive FETCH_HEAD'
################################################################
# work stuff
################################################################
abbr svu sv start apache mariadb
abbr svd sv stop apache mariadb
abbr svs sv status apache mariadb
abbr pname "\
set pname (basename (pwd | sd -- - _))
sd 'DB_DATABASE=.*' DB_DATABASE=\$pname .env
test (count dump/*) -eq 1
and mv dump/* dump/\$pname.sql"
abbr msv "\
string match -r 'DB_DATABASE=(?<db>.*)\$' < .env
set margs -v -u root --password=(_pass_get work_db)"
abbr msc 'echo "CREATE DATABASE $db" | mysql $margs'
abbr msdrop 'echo "DROP DATABASE $db" | mysql $margs'
abbr msl 'mysql $margs $db < dump/$db.sql'
abbr msd 'mariadb-dump $margs $db | mysql_format > dump/$db.sql'
abbr vw 'kak (fd -E \'*.min.js\' \'.(php|less|js)$\' app/ public/assets/ resources/)'
abbr gdw 'git diff -- "*.less" "*.js" "*.blade.php"'
abbr pl 'php7 artisan serve --host 0.0.0.0 & make watch'
function mysql_format
sd "\),\(" "),\n\t(" | sd "VALUES \(" "VALUES\n\t("
end
################################################################
# open
################################################################
@ -147,7 +155,7 @@ end
# Copy files like graphical programs
################################################################
function wl-copy-f
function wl-copy-f -w wl-copy
set -a file
for arg in (seq 1 (count $argv))
if test -f "$argv[$arg]"

View File

@ -8,9 +8,6 @@
set -U fish_features stderr-nocaret qmark-noglob regex-easyesc
if status is-interactive
{%@@ if asdf @@%}
set asdf
{%@@ endif @@%}
source {$__fish_config_dir}/env.fish
source {$__fish_config_dir}/wm.fish
@ -18,7 +15,14 @@ if status is-interactive
source {$__fish_config_dir}/keys.fish
source {$__fish_config_dir}/tmux.fish
source {$__fish_config_dir}/colors.fish
source {$__fish_config_dir}/plugins.fish
{%@@ if starship @@%}
starship init fish | source
# Set cursor shape
printf '\e[5 q' # Bar
{%@@ else @@%}
source {$__fish_config_dir}/prompt.fish
{%@@ endif @@%}
end

View File

@ -7,7 +7,6 @@
set -x QT_QPA_PLATFORMTHEME gtk2
set -x DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY 1
set -x ALSOFT_DRIVERS "pulse," # Telegram audio library
set -x SDL_GAMECONTROLLERCONFIG '050000004c0500006802000000800000,Sony PLAYSTATION(R)3 Controller,a:b0,b:b1,x:b3,y:b2,back:b8,guide:b10,start:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpdown:b14,dpleft:b15,dpright:b16,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux,'
set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share"
@ -15,19 +14,8 @@ set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"
set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:/usr/share"
set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:$HOME/.local/share"
set -x XDG_CONFIG_HOME "$HOME/.config/"
if set -q asdf
set __cargo_asdf_bin ~/.asdf/installs/rust/*/bin/
set __yarn_asdf_bin ~/.config/yarn/global/node_modules/.bin/
else
set __cargo_bin ~/.cargo/bin/
set __yarn_bin ~/.yarn/bin/
set -x NVM_DIR ~/.local/share/nvm
end
for i in ~/.local/bin $__cargo_bin $__cargo_asdf_bin $__yarn_asdf_bin ~/.yarn/bin ~/.factorio/bin/*
test -d "$i";and fish_add_path --global "$i"
for i in ~/.local/bin ~/.cargo/bin ~/.yarn/bin ~/.factorio/bin/*
test -d "$i";and fish_add_path "$i"
end
# needed for tmux
@ -99,6 +87,14 @@ set -x _COLOR_TYPE "{{@@ color_type @@}}"
set -x _ACCENT_COLOR "{{@@ accent_color_name @@}}"
set -x DOTDROP_CONFIG "{{@@ _dotdrop_cfgpath @@}}"
# set -x DOTDROP_PROFILE "{{@@ profile @@}}"
set -x DOTDROP_PROFILE "{{@@ profile @@}}"
set -x DOTDROP_WORKERS (math 2 \* (nproc))
################################################################
# Source .env files
################################################################
command -qs direnv &&
direnv hook fish | source

View File

@ -34,16 +34,13 @@ end
bind \cy 'commandline | wl-copy -n'
# Enable fzf key bindings
if not type -q fzf_key_bindings
and test -f /usr/share/fzf/key-bindings.fish
if test -f /usr/share/fzf/key-bindings.fish
source /usr/share/fzf/key-bindings.fish
end
if type -q fzf_key_bindings
fzf_key_bindings
end
function rcd
function rcd #{{{
set file (mktemp)
ranger --choosedir=$file

View File

@ -1,89 +0,0 @@
# {{@@ header() @@}}
##################################################
# fundle fish plugin manager
##################################################
if not functions -q fundle
and test "$USER" != root
eval (curl -sfL https://git.io/fundle-install)
end
if not set -q asdf
fundle plugin 'FabioAntunes/fish-nvm'
end
fundle plugin 'edc/bass'
fundle init
################################################################
# Source .env files
################################################################
command -qs direnv &&
direnv hook fish | source
##################################################
# asdf Version manager
##################################################
if set -q asdf
if not test -d ~/.asdf
and test "$USER" != root
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
mkdir -p ~/.config/fish/completions
and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
source ~/.asdf/asdf.fish
asdf plugin add nodejs
asdf install nodejs 12.13.1
asdf install nodejs latest
asdf global nodejs latest
asdf plugin-add yarn
asdf install yarn latest
asdf global yarn latest
asdf plugin add rust
asdf install rust nightly
asdf global rust nightly
end
test -f ~/.asdf/asdf.fish
and source ~/.asdf/asdf.fish
end
##################################################
# Rust tools
##################################################
command -qs rustup
or _install-rustup &> /dev/null &
command -qs sccache
or _install-sccache &> /dev/null &
# set -x RUSTC_WRAPPER sccache
command -qs rust-analyzer
or _install-rust-analyzer &> /dev/null &
command -qs trunk
or _install-trunk &> /dev/null &
command -qs diesel
and diesel completions fish | source
##################################################
# Prompt
##################################################
{%@@ if starship @@%}
starship init fish | source
# Set cursor shape
printf '\e[5 q' # Bar
{%@@ else @@%}
source {$__fish_config_dir}/prompt.fish
{%@@ endif @@%}

View File

@ -51,21 +51,17 @@ function fish_git_prompt
command -qs git
or return
set -l here (string replace -r '/\.git(/.*)?$' '' "$PWD")
test -d "$here"
or return
pushd "$here"
pushd (string replace -r '/\.git(/.*)?$' '' "$PWD")
############################################################
# Check if in a git repo and save branch and status
############################################################
set -l git_branch (git branch --show-current 2> /dev/null);or return
set -l git_detach (_fish_prompt_git_detached)
set -l git_remote_branch (git rev-parse --abbrev-ref (git branch --show-current)@{u} 2> /dev/null)
set -l git_status_s (timeout 1s git status -s | string collect)
set git_branch (git branch --show-current 2> /dev/null);or return
set git_detach (_fish_prompt_git_detached)
set git_remote (_fish_prompt_git_remote_branches)
set git_remotes (git remote)
set git_status_s (timeout 1s git status -s | string collect)
_fish_prompt_normal " on "
@ -87,23 +83,14 @@ function fish_git_prompt
_fish_prompt_warn "init"
end
# Remote has the current branch
if test -n "$git_remote_branch"
# print a "↑" if ahead of origin
test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l)
and set -l _git_sync_ahead '↑'
# print a "↓" if behind of origin
test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l)
and set -l _git_sync_behind '↓'
if set -q _git_sync_ahead _git_sync_behind
_fish_prompt_normal '⇅'
else if set -q _git_sync_ahead
_fish_prompt_normal '↑'
else if set -q _git_sync_behind
_fish_prompt_normal '↓'
end
# print a "↑" if ahead of origin
for git_remote in (echo $git_remotes | sort -u)
# Remote has the current branch
string match -qr "$git_remote"/"$git_branch" $git_remote
# Check if remote is different
and not git diff --quiet "$git_branch" "$git_remote"/"$git_branch" --
and _fish_prompt_normal '↑'
and break
end
############################################################

View File

@ -11,14 +11,14 @@
function esway
# You get a wayland, and you get a wayland. Everybody get's a wayland!
# set -x MOZ_ENABLE_WAYLAND 1
# set -x CLUTTER_BACKEND wayland
set -x MOZ_ENABLE_WAYLAND 1
set -x CLUTTER_BACKEND wayland
set -x QT_QPA_PLATFORM wayland-egl
# set -x ECORE_EVAS_ENGINE wayland-egl
# set -x ELM_ENGINE wayland_egl
# set -x SDL_VIDEODRIVER wayland
set -x ECORE_EVAS_ENGINE wayland-egl
set -x ELM_ENGINE wayland_egl
set -x SDL_VIDEODRIVER wayland
set -x _JAVA_AWT_WM_NONREPARENTING 1
# set -x NO_AT_BRIDGE 1
set -x NO_AT_BRIDGE 1
# Hardware acceleration
set -x MOZ_DISABLE_RDD_SANDBOX 1
@ -39,18 +39,12 @@ function esway
# this should not be necessary, but whatever
if not pidof sway &> /dev/null
{%@@ if supervisor == "runit" @@%}
pkill -HUP -u "$USER" runsvdir
exec dbus-launch --exit-with-session sway
{%@@ elif supervisor == "systemd" @@%}
exec systemd-cat --identifier=sway sway
{%@@ else @@%}
exec dbus-launch --exit-with-session sway
{%@@ endif @@%}
end
end
if test (tty) = /dev/tty1
if test "$XDG_VTNR" = 1
and test -z "$DISPLAY$WAYLAND_DISPLAY"
esway &> .swaylog

View File

@ -8,7 +8,7 @@
# title=foot
# locked-title=no
font={{@@ font.mono @@}}:size={{@@ font.size.small @@}}
font={{@@ font.mono @@}}:size={{@@ font.size.small * 4/3 @@}}
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
@ -18,7 +18,7 @@ font={{@@ font.mono @@}}:size={{@@ font.size.small @@}}
# vertical-letter-offset=0
# underline-offset=<font metrics>
# box-drawings-uses-font-glyphs=no
dpi-aware=no
# dpi-aware=yes
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
@ -28,7 +28,7 @@ dpi-aware=no
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
bold-text-in-bright=no
bold-text-in-bright=yes
# bell=none
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary

31
dotfiles/fusuma.yml Normal file
View File

@ -0,0 +1,31 @@
# {{@@ header() @@}}
# _____
# | ___| _ ___ _ _ _ __ ___ __ _
# | |_ | | | / __| | | | '_ ` _ \ / _` |
# | _|| |_| \__ \ |_| | | | | | | (_| |
# |_| \__,_|___/\__,_|_| |_| |_|\__,_|
swipe:
3:
left:
command: 'swaymsg workspace next'
right:
command: 'swaymsg workspace prev'
up:
command: 'swaymsg fullscreen toggle'
down:
command: 'launcher'
# pinch:
# in:
# command: 'xdotool key ctrl+shift+plus'
# out:
# command: 'xdotool key ctrl+minus'
# threshold:
# swipe: 1
# # pinch: 0.2
# interval:
# swipe: 0.5
# # pinch: 0.2

View File

@ -5,6 +5,7 @@
# | |_| | | |_
# \____|_|\__|
[user]
name = {{@@ username @@}}
email = {{@@ mail.personal.user @@}}
@ -21,9 +22,6 @@
[merge]
conflictStyle = diff3
[rerere]
enabled = true
[rebase]
abbreviateCommands = true
autoSquash = true
@ -57,10 +55,7 @@
excludesfile = {{@@ _dotfile_abs_dst @@}}/ignore
; hooksPath = {{@@ _dotfile_abs_dst @@}}/hooks/
[includeIf "gitdir:~/Projects/"]
path = {{@@ _dotfile_abs_dst @@}}/config-personal
[includeIf "gitdir:~/Wopus/"]
path = {{@@ _dotfile_abs_dst @@}}/config-work
[includeIf "gitdir:~/Projects/work/"]
path = ~/.config/git/config-work
# vim: ft=ini

View File

@ -7,7 +7,7 @@
[user]
name = {{@@ mail.work.from | title @@}}
email = {{@@ mail.work.user @@}}
name = {{@@ mail.work.from | capitalize @@}}
email = {{@@ mail.work.user.split("@")[0] @@}}
# vim: ft=ini

View File

@ -9,6 +9,3 @@
allow-preset-passphrase
max-cache-ttl 604800
default-cache-ttl 604800
allow-loopback-pinentry
pinentry-mode loopback

View File

@ -6,7 +6,7 @@
# |_|\_\__,_|_|\_\ |_____|____/|_|
snippet_support = true
snippet_support = false
verbosity = 2
[server]
@ -76,7 +76,9 @@ offset_encoding = "utf-8"
[language.haskell]
filetypes = ["haskell"]
roots = ["Setup.hs", "stack.yaml", "*.cabal"]
command = "haskell-language-server-wrapper"
# You might also be interested in the newer, but early stage, haskell-language-server
# https://github.com/haskell/haskell-language-server
command = "hie-wrapper"
args = ["--lsp"]
[language.html]
@ -131,25 +133,7 @@ command = "intelephense"
args = ["--stdio"]
settings_section = "intelephense"
[language.php.settings]
intelephense.format.braces = "k&r"
intelephense.storagePath = "/tmp/intelephense"
intelephense.environment.includePaths = [
"./vendor",
"./vendor/autoload",
"./vendor/laravel/framework/",
"./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/"
]
intelephense.files.exclude = [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/resources/views/**"
]
[language.python]
filetypes = ["python"]
@ -186,14 +170,22 @@ args = ["stdio"]
[language.rust]
filetypes = ["rust"]
roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"]
command = "rust-analyzer"
roots = ["Cargo.toml"]
command = "sh"
args = [
"-c",
"""
if path=$(rustup which rust-analyzer 2>/dev/null); then
"$path"
else
rust-analyzer
fi
""",
]
[language.rust.settings.rust-analyzer]
## this can use too much space and processing power
# checkOnSave.extraArgs = ["--target-dir", "./target/check"]
hoverActions.enable = false # kak-lsp doesn't support this at the moment
# procMacro.enable = true
# cargo.loadOutDirsFromCheck = true
procMacro.enable = true
cargo.loadOutDirsFromCheck = true
[language.terraform]
filetypes = ["terraform"]
@ -207,12 +199,6 @@ roots = ["project.godot", ".git/"]
command = "nc"
args = [ "localhost", "6008"]
[language.clojure]
filetypes = ["clojure"]
roots = ["project.clj", ".git/"]
command = "clojure-lsp"
args = []

View File

@ -57,17 +57,10 @@ face global MenuInfo cyan
face global Information default,{{@@ bg_dark @@}}
face global Error default,red+g
face global StatusLine %sh{
printf "rgb:"
head /dev/urandom |
base64 |
rg --text -o '{{@@ color.random_range @@}}' |
head -n 6 |
sd '\n' ''
}
face global StatusLineMode StatusLine
face global StatusLineInfo StatusLine
face global StatusLineValue StatusLine
face global StatusLine default,{{@@ bg_dark @@}}
face global StatusLineMode green,{{@@ bg_dark @@}}
face global StatusLineInfo default,{{@@ bg_dark @@}}
face global StatusLineValue default,{{@@ bg_dark @@}}
face global StatusCursor {{@@ accent_fg @@}},{{@@ accent_color @@}}
face global Prompt yellow,default

View File

@ -12,10 +12,6 @@ hook global WinSetOption filetype=c %{
set buffer formatcmd 'clang-format'
}
hook global BufCreate .*\.rs %{
set buffer formatcmd 'rustfmt'
}
hook global BufCreate .*\.html %{
set buffer formatcmd 'prettier --parser html'
}
@ -54,17 +50,11 @@ hook global WinCreate .* %{
hook global BufCreate .*\.jsonc %[ set buffer filetype jsonc ]
hook global BufCreate .*\.blade.php %[ set buffer filetype blade ]
hook global BufCreate .*\.less %[ set buffer filetype less ]
hook global BufCreate .*\.(tera|askama)\.?.* %[
hook global BufCreate .*\.tera %[
require-module jinja
add-highlighter buffer/jinja ref jinja
]
hook global WinSetOption filetype=rust %[
require-module rust
require-module html
add-highlighter shared/rust/html region -recurse '\{' 'html!\s*\{\K' '(?=\})' ref html
]
hook global WinSetOption filetype=sql %[
set buffer comment_line '--'
]

View File

@ -39,8 +39,8 @@ hook global BufOpenFile .*/COMMIT_EDITMSG %{
}
hook global RegisterModified '"' %{ nop %sh{ {
printf %s "$kak_reg_dquote" | wl-copy -n
printf %s "$kak_reg_dquote" | xclip -i -selection clipboard
printf %s "$kak_main_reg_dquote" | wl-copy -n
printf %s "$kak_main_reg_dquote" | xclip -i -selection clipboard
} > /dev/null 2>&1 < /dev/null & }}
# Trim trailing whitespace

View File

@ -1,10 +1,40 @@
# {{@@ header() @@}}
map global normal <c-d> 10j
map global normal <c-u> 10k
map global normal <F2> ': lsp-rename-prompt<ret>'
# alt i makes searches case insensitive
map global prompt <a-i> '<c-a>(?i)<c-e>'
{%@@ for old, new, gdoc, vdoc in [
[ "h", key.left, "line begin", "scroll left" ],
[ "l", key.right, "line right", "scroll right" ],
[ "k", key.up, "buffer begin", "scroll up" ],
[ "j", key.down, "buffer end", "scroll down" ],
[ "i", key.insertMode, "first non blank", "" ],
[ "n", key.next, "", "" ],
[ "o", "h", "", "" ],
] @@%}
{%@@ set NEW, OLD = new.upper(), old.upper()@@%}
{%@@ if vdoc @@%}
map global view {{@@ old @@}} ''
map global view {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ vdoc @@}}"
{%@@ endif @@%}
{%@@ if gdoc @@%}
map global goto {{@@ old @@}} ''
map global goto {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ gdoc @@}}"
{%@@ endif @@%}
map global normal {{@@ new @@}} {{@@ old @@}}
map global normal {{@@ NEW @@}} {{@@ OLD @@}}
map global normal <a-{{@@ new @@}}> <a-{{@@ old @@}}>
map global normal <a-{{@@ NEW @@}}> <a-{{@@ OLD @@}}>
{%@@ endfor @@%}
{%@@ if key.layout == 'colemak' @@%}
map global normal k s
map global normal K S
map global normal <c-k> <a-s>
map global normal t e
map global normal T E
{%@@ endif @@%}
######################################################
# Emacs-like insert

View File

@ -20,12 +20,21 @@ plug "andreyorst/plug.kak" noload config %{
plug 'eraserhd/kak-ansi'
plug 'alexherbo2/auto-pairs.kak' config %{
enable-auto-pairs
plug 'alexherbo2/prelude.kak'
plug 'alexherbo2/auto-pairs.kak' commit "fd735ec149ef0d9ca5f628a95b1e52858b5afbdc" config %{
require-module 'prelude'
require-module 'auto-pairs'
auto-pairs-enable
}
plug 'lelgenio/kakoune-mirror-colemak' config %{
map global user "s" ': enter-user-mode mirror<ret>'
# declare-user-mode tag;
# map global user "t" ': enter-user-mode tag<ret>'
map global mirror "t" 'Za<lt>/<gt><esc>;"tZzi<lt><gt><esc>h"t<a-z>ai'
map global mirror " " 'a <esc>i <esc>'
}
plug 'delapouite/kakoune-palette'
@ -35,43 +44,45 @@ plug 'lelgenio/kak-crosshairs' config %{
}
# Search and replace, for every buffer
plug "natasky/kakoune-multi-file"
plug "lelgenio/kakoune-colemak-neio"
plug 'occivink/kakoune-find'
plug 'kak-lsp/kak-lsp' do %{
cargo install --locked --force --path .
} config %{
map global normal <F2> ': lsp-rename-prompt<ret>'
set global lsp_hover_max_lines 10
# lsp-inlay-diagnostics-enable global
set global lsp_auto_highlight_references true
set global lsp_inlay_diagnostic_sign "●"
set global lsp_diagnostic_line_error_sign "●"
# set global lsp_inlay_diagnostic_sign "●"
# set global lsp_diagnostic_line_error_sign "●"
hook global BufCreate .* %{try lsp-enable}
# hook global BufCreate .* %{try lsp-enable}
define-command -override -hidden lsp-next-placeholder-bind %{
map global normal <tab> ': try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
map global insert <tab> '<a-;>: try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
}
lsp-next-placeholder-bind
map global insert <c-o> "<esc>: lsp-code-action-sync Fill<ret>"
# hook global -group rust-inlay-hints-auto WinSetOption filetype=rust %{
# hook window -group rust-inlay-hints BufReload .* rust-analyzer-inlay-hints
# hook window -group rust-inlay-hints NormalIdle .* rust-analyzer-inlay-hints
# hook window -group rust-inlay-hints InsertIdle .* rust-analyzer-inlay-hints
# hook -once -always window WinSetOption filetype=.* %{
# remove-hooks window rust-inlay-hints
# }
# }
define-command -override -hidden lsp-enable-decals %{
lsp-inlay-diagnostics-enable global
lsp-inlay-hints-enable global
}
# define-command -override -hidden lsp-enable-decals %{
# lsp-inlay-diagnostics-enable global
# try %{
# add-highlighter global/rust_analyzer_inlay_hints replace-ranges rust_analyzer_inlay_hints
# }
# }
define-command -override -hidden lsp-disable-decals %{
lsp-inlay-diagnostics-disable global
lsp-inlay-hints-disable global
}
lsp-enable-decals
# define-command -override -hidden lsp-disable-decals %{
# lsp-inlay-diagnostics-disable global
# remove-highlighter global/rust_analyzer_inlay_hints
# }
hook global ModeChange '.*:insert:normal' %{lsp-enable-decals}
hook global ModeChange '.*:normal:insert' %{lsp-disable-decals}
# hook global ModeChange '.*:insert:normal' %{lsp-enable-decals}
# hook global ModeChange '.*:normal:insert' %{lsp-disable-decals}
hook global WinSetOption filetype=(c|cpp|rust) %{
lsp-enable
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
@ -79,16 +90,5 @@ plug 'kak-lsp/kak-lsp' do %{
remove-hooks window semantic-tokens
}
}
declare-option -hidden str modeline_progress ""
define-command -hidden -params 6 -override lsp-handle-progress %{
set global modeline_progress %sh{
if ! "$6"; then
echo "$2${5:+" ($5%)"}${4:+": $4"}"
fi
}
}
set global modelinefmt "%%opt{modeline_progress} %opt{modelinefmt}"
}

View File

@ -13,8 +13,8 @@ map global user 'z' ':zoxide ' -docstring 'zoxide'
map global user 'n' ': new<ret>' -docstring 'new window'
map global user 'e' 'x|emmet<ret>{{@@ "@" if not tabs @@}}' -docstring 'process line with emmet'
map global user 'm' ': try lsp-formatting-sync catch format-buffer<ret>' -docstring 'format document'
map global user 'M' ': try lsp-range-formatting-sync catch format-selections<ret>' -docstring 'format selection'
map global user 'm' ': try format-buffer catch lsp-formatting<ret>' -docstring 'format document'
map global user 'M' ': try format-selections catch lsp-range-formatting<ret>' -docstring 'format selection'
map global user 'c' ': comment-line<ret>' -docstring 'comment line'
map global user 'C' '_: comment-block<ret>' -docstring 'comment block'
@ -52,7 +52,6 @@ map global find 'f' ': find_file<ret>' -docstring 'file'
map global find 'l' ': find_line<ret>' -docstring 'jump to line'
map global find 'r' ': find_ripgrep<ret>' -docstring 'ripgrep all file'
map global find 'g' ': find_git_file<ret>' -docstring 'git files'
map global find 'm' ': find_git_modified<ret>' -docstring 'git modified files'
map global find 'c' ': find_dir<ret>' -docstring 'change dir'
map global find 'd' ': find_delete<ret>' -docstring 'file to delete'
@ -69,16 +68,9 @@ define-command -override -hidden find_delete \
} }
define-command -override -hidden find_git_file \
%{ evaluate-commands %sh{
%{ evaluate-commands -existing %sh{
for line in `git ls-files | wdmenu`; do
echo "edit -existing '$line'"
done
} }
define-command -override -hidden find_git_modified \
%{ evaluate-commands %sh{
for line in `git status --porcelain | sd '^.. ' ''| wdmenu`; do
echo "edit -existing '$line'"
echo "edit '$line'"
done
} }

View File

@ -1,196 +0,0 @@
# Configuration file for libinput-gestures.
# Mark Blakeney, Sep 2015
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
# maintain compatibility with original format configuration files).
#
# Each gesture line has 3 [or 4] arguments separated by whitespace:
#
# action motion [finger_count] command
#
# where action and motion is either:
# swipe up
# swipe down
# swipe left
# swipe right
# swipe left_up
# swipe left_down
# swipe right_up
# swipe right_down
# pinch in
# pinch out
# pinch clockwise
# pinch anticlockwise
#
# command is the remainder of the line and is any valid shell command +
# arguments.
#
# finger_count is a single numeric digit and is optional (and is
# typically 3 or 4). If specified then the command is executed when
# exactly that number of fingers is used in the gesture. If not
# specified then the command is executed when that gesture is executed
# with any number of fingers. Gesture lines specified with finger_count
# have priority over the same gesture specified without any
# finger_count.
#
# Typically command will be _internal, or xdotool. See "man xdotool" for
# the many things you can action with that tool. Note that unfortunately
# xdotool does not work with native Wayland clients.
###############################################################################
# SWIPE GESTURES:
###############################################################################
# Note the default is an "internal" command that uses wmctrl to switch
# workspaces and, unlike xdotool, works on both Xorg and Wayland (via
# XWayland). It also can be configured for vertical and horizontal
# switching over tabular workspaces, as per the example below. You can
# also add "-w" to the internal command to allow wrapping workspaces.
# Ensure you install wmctrl if you use _internal.
# Move to next workspace (works for GNOME/KDE/etc on Wayland and Xorg)
gesture swipe up swaymsg fullscreen toggle
# NOTE ABOUT FINGER COUNT:
# The above command will configure this command for all fingers (i.e. 3
# for 4) but to configure it for 3 fingers only, change it to:
# gesture swipe up 3 _internal ws_up
# Then you can configure something else for 4 fingers or leave 4 fingers
# unconfigured. You can configure an explicit finger count like this for
# all example commands in this configuration file.
#
# gesture swipe up xdotool key super+Page_Down
# Move to prev workspace (works for GNOME/KDE/etc on Wayland and Xorg)
gesture swipe down launcher
# gesture swipe down xdotool key super+Page_Up
# Browser go forward (works only for Xorg, and Xwayland clients)
gesture swipe left swaymsg workspace next
# Browser go back (works only for Xorg, and Xwayland clients)
gesture swipe right swaymsg workspace prev
# NOTE: If you don't use "natural" scrolling direction for your touchpad
# then you may want to swap the above default left/right and up/down
# configurations.
# Optional extended swipe gestures, e.g. for browser tab navigation:
#
# Jump to next open browser tab
# gesture swipe right_up xdotool key control+Tab
#
# Jump to previous open browser tab
# gesture swipe left_up xdotool key control+shift+Tab
#
# Close current browser tab
# gesture swipe left_down xdotool key control+w
#
# Reopen and jump to last closed browser tab
# gesture swipe right_down xdotool key control+shift+t
# Example of 8 static workspaces, e.g. using KDE virtual-desktops,
# arranged in 2 rows of 4 columns across using swipe up/down/left/right
# to navigate in fixed planes. You can also add the "-w/--wrap" option
# to allow wrapping in any direction. You must configure your virtual
# desktops with the same column dimension.
# gesture swipe up _internal --cols 4 ws_up
# gesture swipe down _internal --cols 4 ws_down
# gesture swipe left _internal --cols 4 ws_left
# gesture swipe right _internal --cols 4 ws_right
#
# Example of 16 static workspaces, e.g. using KDE virtual-desktops,
# arranged in 4 rows of 4 columns across using swipe up/down/left/right
# to navigate in fixed planes, and also using swipe
# left_up/left_down/right_up/right_down to navigate diagonally. You can
# also add the "-w/--wrap" option to allow wrapping in any direction
# and/or diagonally. You must configure your virtual desktops with the
# same column dimension.
# gesture swipe up _internal --cols 4 ws_up
# gesture swipe down _internal --cols 4 ws_down
# gesture swipe left _internal --cols 4 ws_left
# gesture swipe right _internal --cols 4 ws_right
# gesture swipe left_up _internal --cols 4 ws_left_up
# gesture swipe left_down _internal --cols 4 ws_left_down
# gesture swipe right_up _internal --cols 4 ws_right_up
# gesture swipe right_down _internal --cols 4 ws_right_down
# Example virtual desktop switching for Ubuntu Unity/Compiz. The
# _internal command does not work for Compiz but you can explicitly
# configure the swipe commands to work for a Compiz virtual 2
# dimensional desktop as follows:
# gesture swipe up xdotool key ctrl+alt+Up
# gesture swipe down xdotool key ctrl+alt+Down
# gesture swipe left xdotool key ctrl+alt+Left
# gesture swipe right xdotool key ctrl+alt+Right
# Example to change audio volume:
# Note this only works on an Xorg desktop (not Wayland).
# gesture swipe up xdotool key XF86AudioRaiseVolume
# gesture swipe down xdotool key XF86AudioLowerVolume
###############################################################################
# PINCH GESTURES:
###############################################################################
# GNOME SHELL open/close overview (works for GNOME on Xorg only)
gesture pinch in xdotool key super+s
gesture pinch out xdotool key super+s
# KDE Plasma open/close overview
# gesture pinch in xdotool key ctrl+F9
# gesture pinch out xdotool key ctrl+F9
# GNOME SHELL open/close overview (works for GNOME on Wayland and Xorg)
# Note since GNOME 3.24 on Wayland this is implemented natively so no
# real point configuring for Wayland.
# gesture pinch in dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
# gesture pinch out dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
# Optional extended pinch gestures:
# gesture pinch clockwise <whatever command>
# gesture pinch anticlockwise <whatever command>
###############################################################################
# This application normally determines your touchpad device
# automatically. Some users may have multiple touchpads but by default
# we use only the first one found. However, you can choose to specify
# the explicit device name to use. Run "libinput list-devices" to work
# out the name of your device (from the "Device:" field). Then add a
# device line specifying that name, e.g:
#
# device DLL0665:01 06CB:76AD Touchpad
#
# If the device name starts with a '/' then it is instead considered as
# the explicit device path although since device paths can change
# through reboots this is best to be a symlink. E.g. instead of specifying
# /dev/input/event12, you should use the corresponding full path link
# under /dev/input/by-path/ or /dev/input/by-id/.
#
# You can choose to use ALL touchpad devices by setting the device name
# to "all". E.g. Do this if you have multiple touchpads which you want
# to use in parallel. This reduces performance slightly so only set this
# if you have to.
#
# device all
###############################################################################
# You can set a minimum travel distance threshold before swipe gestures
# are actioned using the swipe_threshold configuration command.
# Specify this value in dots. The default is 0.
# E.g. set it to 100 dots with "swipe_threshold 100".
# swipe_threshold 0
###############################################################################
# You can set a timeout on gestures from start to end. The default is
# the value commented below. It can be any value in float secs >= 0.
# 0 = no timeout. E.g. set it to 2 secs with "timeout 2".
# timeout 1.5
# vim:ft=ini

View File

@ -1,260 +0,0 @@
# Nushell Config File
def create_left_prompt [] {
let path_segment = ($env.PWD)
$path_segment
}
def create_right_prompt [] {
let time_segment = ([
(date now | date format '%m/%d/%Y %r')
] | str collect)
$time_segment
}
# Use nushell functions to define your right and left prompt
let-env PROMPT_COMMAND = { create_left_prompt }
let-env PROMPT_COMMAND_RIGHT = { create_right_prompt }
# The prompt indicators are environmental variables that represent
# the state of the prompt
let-env PROMPT_INDICATOR = "〉"
let-env PROMPT_INDICATOR_VI_INSERT = ": "
let-env PROMPT_INDICATOR_VI_NORMAL = "〉"
let-env PROMPT_MULTILINE_INDICATOR = "::: "
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
let-env ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) }
to_string: { |v| $v | str collect (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) }
to_string: { |v| $v | str collect (char esep) }
}
}
# Directories to search for scripts when calling source or use
#
# By default, <nushell-config-dir>/scripts is added
let-env NU_LIB_DIRS = [
($nu.config-path | path dirname | path join 'scripts')
]
# Directories to search for plugin binaries when calling register
#
# By default, <nushell-config-dir>/plugins is added
let-env NU_PLUGIN_DIRS = [
($nu.config-path | path dirname | path join 'plugins')
]
module completions {
# Custom completions for external commands (those outside of Nushell)
# Each completions has two parts: the form of the external command, including its flags and parameters
# and a helper command that knows how to complete values for those flags and parameters
#
# This is a simplified version of completions for git branches and git remotes
def "nu-complete git branches" [] {
^git branch | lines | each { |line| $line | str find-replace '\* ' '' | str trim }
}
def "nu-complete git remotes" [] {
^git remote | lines | each { |line| $line | str trim }
}
export extern "git checkout" [
branch?: string@"nu-complete git branches" # name of the branch to checkout
-b: string # create and checkout a new branch
-B: string # create/reset and checkout a branch
-l # create reflog for new branch
--guess # second guess 'git checkout <no-such-branch>' (default)
--overlay # use overlay mode (default)
--quiet(-q) # suppress progress reporting
--recurse-submodules: string # control recursive updating of submodules
--progress # force progress reporting
--merge(-m) # perform a 3-way merge with the new branch
--conflict: string # conflict style (merge or diff3)
--detach(-d) # detach HEAD at named commit
--track(-t) # set upstream info for new branch
--force(-f) # force checkout (throw away local modifications)
--orphan: string # new unparented branch
--overwrite-ignore # update ignored files (default)
--ignore-other-worktrees # do not check if another worktree is holding the given ref
--ours(-2) # checkout our version for unmerged files
--theirs(-3) # checkout their version for unmerged files
--patch(-p) # select hunks interactively
--ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only
--pathspec-from-file: string # read pathspec from file
]
export extern "git push" [
remote?: string@"nu-complete git remotes", # the name of the remote
refspec?: string@"nu-complete git branches"# the branch / refspec
--verbose(-v) # be more verbose
--quiet(-q) # be more quiet
--repo: string # repository
--all # push all refs
--mirror # mirror all refs
--delete(-d) # delete refs
--tags # push tags (can't be used with --all or --mirror)
--dry-run(-n) # dry run
--porcelain # machine-readable output
--force(-f) # force updates
--force-with-lease: string # require old value of ref to be at this value
--recurse-submodules: string # control recursive pushing of submodules
--thin # use thin pack
--receive-pack: string # receive pack program
--exec: string # receive pack program
--set-upstream(-u) # set upstream for git pull/status
--progress # force progress reporting
--prune # prune locally removed refs
--no-verify # bypass pre-push hook
--follow-tags # push missing but relevant tags
--signed: string # GPG sign the push
--atomic # request atomic transaction on remote side
--push-option(-o): string # option to transmit
--ipv4(-4) # use IPv4 addresses only
--ipv6(-6) # use IPv6 addresses only
]
}
# Get just the extern definitions without the custom completion commands
use completions *
# for more information on themes see
# https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.md
let default_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr non effectively turns this off
header: green_bold
empty: blue
bool: white
int: white
filesize: white
duration: white
date: white
range: white
float: white
string: white
nothing: white
binary: white
cellpath: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
shape_binary: purple_bold
shape_bool: light_cyan
shape_int: purple_bold
shape_float: purple_bold
shape_range: yellow_bold
shape_internalcall: cyan_bold
shape_external: cyan
shape_externalarg: green_bold
shape_literal: blue
shape_operator: yellow
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_datetime: cyan_bold
shape_list: cyan_bold
shape_table: blue_bold
shape_record: cyan_bold
shape_block: blue_bold
shape_filepath: cyan
shape_globpattern: cyan_bold
shape_variable: purple
shape_flag: blue_bold
shape_custom: green
shape_nothing: light_cyan
}
# The default config record. This is where much of your global configuration is setup.
let $config = {
filesize_metric: false
table_mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
use_ls_colors: true
rm_always_trash: false
color_config: $default_theme
use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto
quick_completions: true # set this to false to prevent auto-selecting completions when only one remains
partial_completions: true # set this to false to prevent partial filling of the prompt
animate_prompt: false # redraw the prompt every second
float_precision: 2
use_ansi_coloring: true
filesize_format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
edit_mode: emacs # emacs, vi
max_history_size: 10000
menu_config: {
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
text_style: green
selected_text_style: green_reverse
marker: "| "
}
history_config: {
page_size: 10
selector: "!"
text_style: green
selected_text_style: green_reverse
marker: "? "
}
keybindings: [
{
name: completion_menu
modifier: none
keycode: tab
mode: emacs # Options: emacs vi_normal vi_insert
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
]
}
}
{
name: completion_previous
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
event: { send: menuprevious }
}
{
name: history_menu
modifier: control
keycode: char_x
mode: emacs
event: {
until: [
{ send: menu name: history_menu }
{ send: menupagenext }
]
}
}
{
name: history_previous
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
]
}

View File

@ -11,7 +11,7 @@
set viewmode miller
# How many columns are there, and what are their relative widths?
set column_ratios 2,4,2
set column_ratios 1,3,4
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
@ -45,7 +45,7 @@ set vcs_aware true
# State of the four backends git, hg, bzr, svn. The possible states are
# disabled, local (only show local info), enabled (show local and remote
# information).
set vcs_backend_git disabled
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set vcs_backend_svn disabled
@ -143,7 +143,7 @@ set dirname_in_tabs true
set mouse_enabled true
# Display the file size in the main column or status bar?
# set display_size_in_main_column true
set display_size_in_main_column true
set display_size_in_status_bar true
# Display the free disk space in the status bar?

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec _start_dbus-daemon

2
dotfiles/runit_sv/fusuma/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec fusuma

View File

@ -1,3 +1,9 @@
#!/bin/sh
exec _gammastep
if type curl; then
loc=`curl ipinfo.io/loc | sed 's/,/:/'`
else
loc="-30:-50"
fi
exec gammastep -l "$loc"

5
dotfiles/runit_sv/geoclue/run Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
PATH="/usr/lib/geoclue-2.0/demos/:/usr/libexec/geoclue-2.0/demos/"
exec agent

View File

@ -1,3 +1,5 @@
#!/bin/sh
exec _kdeconnectd
PATH="$PATH:/usr/lib:/usr/libexec:/usr/lib/libexec"
exec kdeconnectd --replace

View File

@ -1,2 +0,0 @@
#!/bin/sh
exec libinput-gestures

View File

2
dotfiles/runit_sv/light/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec light -N 1

2
dotfiles/runit_sv/redshift/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec redshift

View File

@ -1,8 +1,8 @@
# {{@@ header() @@}} #
# group_imports = "StdExternalCrate"
# imports_granularity = "Crate"
# imports_layout = "Vertical"
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
imports_layout = "Vertical"
tab_spaces = {{@@ indent_width @@}}
max_width = 80

View File

@ -1,9 +0,0 @@
#!/bin/sh
if type curl; then
loc=`curl ipinfo.io/loc | sed 's/,/:/'`
else
loc="-30:-50"
fi
exec gammastep -l "$loc"

View File

@ -1,4 +0,0 @@
#!/bin/sh
localectl set-x11-keymap us pc104 colemak
localectl set-keymap colemak

View File

@ -1,16 +0,0 @@
#!/bin/fish
cd "$HOME/Projects"
fd -d5 -H '^\.git$' |
sd '\.git$' '' |
while read repo
pushd "$repo"
if git cherry -v 2> /dev/null | wc -l | xargs -n1 test 0 -lt
echo Unpushed repos $repo
break
end
popd
end
# vim: ft=fish

View File

@ -2,7 +2,7 @@
gpg-connect-agent reloadagent /bye
PATH="$PATH:/usr/lib:/usr/libexec:/usr/lib/gnupg"
PATH="$PATH:/usr/lib:/usr/libexec"
keygrip=$(cat "$HOME/.pam-gnupg")
echo '{{@@ main_password @@}}' |

View File

@ -1,13 +1,5 @@
#!/bin/sh
for g in audio video input bluetooth wheel _seatd kvm docker; do
if
cat /etc/group |
cut -d: -f1 |
grep "^${g}\$" > /dev/null
then
sudo usermod "$USER" -aG "$g" &
else
echo "warning: group $g does not exist"
fi
for g in docker video input audio wheel; do
sudo usermod "{{@@ env['USER'] @@}}" -aG "$g"
done

View File

@ -1,3 +0,0 @@
#!/bin/sh
cargo install diesel_cli --no-default-features --features mysql,postgres

8
dotfiles/scripts/_install-ra Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
rm ~/.local/bin/rust-analyzer
mkdir -p ~/.local/bin
curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz |
gunzip -c - > ~/.local/bin/rust-analyzer
chmod +x ~/.local/bin/rust-analyzer

View File

@ -1,29 +0,0 @@
#!/bin/sh
# Download and install rust analyzer to ~/.local/bin
set -ex
## Set this to get a fixed version
# PIN_VERSION="2022-05-02"
if [ -n "$PIN_VERSION" ]
then
REPO="https://github.com/rust-analyzer/rust-analyzer"
VERSION="$PIN_VERSION"
DLURL="$REPO/releases/download/$VERSION/rust-analyzer-x86_64-unknown-linux-gnu.gz"
else
API_URL="https://api.github.com/repos/rust-lang/rust-analyzer/releases/latest"
API_RESP="$(curl "$API_URL")"
VERSION=$(echo "$API_RESP" | jq -r '.tag_name')
DLURL=$(echo "$API_RESP" | jq -r '.assets[]|select(.name|match("x86_64.*gnu")).browser_download_url')
fi
GZFILE="$HOME/.cache/rust-analyzer-$VERSION-x86_64-unknown-linux-gnu.gz"
BINDIR="$HOME/.local/bin"
test -f "$GZFILE" ||
wget -O "$GZFILE" "$DLURL"
rm -f "$BINDIR/rust-analyzer"
gunzip "$GZFILE" --stdout > "$BINDIR/rust-analyzer"
chmod u+x "$BINDIR/rust-analyzer"

View File

@ -1,3 +0,0 @@
#!/bin/sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -ex
REPO=https://github.com/mozilla/sccache
VERSION=v0.2.15
TARFILENAME="sccache-$VERSION-x86_64-unknown-linux-musl"
TARFILEPATH="$HOME/.cache/$TARFILENAME.tar.gz"
BINDIR="$HOME/.local/bin"
test -f "$TARFILEPATH" ||
wget -qO "$TARFILEPATH" "$REPO/releases/download/$VERSION/$TARFILENAME.tar.gz"
tar -xf "$TARFILEPATH" -C "$BINDIR" --wildcards "*/sccache" --strip-components=1
chmod u+x "$BINDIR/sccache"

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -ex
REPO=https://github.com/thedodd/trunk
VERSION=v0.14.0
TARFILE="$HOME/.cache/trunk-$VERSION-x86_64-unknown-linux-gnu.tar.gz"
BINDIR="$HOME/.local/bin"
test -f "$TARFILE" ||
wget -qO "$TARFILE" "$REPO/releases/download/$VERSION/trunk-x86_64-unknown-linux-gnu.tar.gz"
tar -xf "$TARFILE" -C "$BINDIR" trunk
chmod u+x "$BINDIR/trunk"

View File

@ -1,5 +0,0 @@
#!/bin/sh
PATH="$PATH:/usr/lib:/usr/libexec:/usr/lib/libexec"
exec kdeconnectd --replace

View File

@ -1,13 +0,0 @@
#!/bin/sh
swaylock -f
export SVDIR="{{@@ user_svdir @@}}"
maybe() {
command -v $1 > /dev/null &&
env "$@"
}
maybe sv up swayidle
maybe systemctl --user start sway-idle.service

View File

@ -67,12 +67,7 @@ mkdir -p "${dst_path}/${theme_name}"
{%@@ endif @@%}
{%@@ if 'orchis' in gtk_theme.lower() @@%}
MARKER_FILE="$HOME/.themes/.orchis_installed"
test -f "$MARKER_FILE" &&
exit 0
{%@@ if 'Orchis' in gtk_theme.lower() @@%}
TMPDIR="$HOME/.cache/share/orchis"
mkdir -p "$TMPDIR" && cd "$TMPDIR"
@ -84,6 +79,4 @@ mkdir -p "${dst_path}/${theme_name}"
./install.sh \
--theme "{{@@ accent_color_name.lower() @@}}" \
--tweaks "solid" --tweaks "compact"
touch "$MARKER_FILE"
{%@@ endif @@%}

View File

@ -3,9 +3,6 @@
set NEW_MAIL_PATH ~/.local/share/mail/*/*/new/
set ICON "/usr/share/icons/{{@@ icon_theme @@}}/symbolic/status/mail-unread-symbolic.svg"
command -qs maildir-notify-daemon
and exec maildir-notify-daemon $NEW_MAIL_PATH
inotifywait \
--monitor \
--quiet \

42
dotfiles/scripts/_runit_config Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
set -ex
mkdir -p "$1"
cd `dirname $1` && shift
create_logger() {
pushd sv/
for svd in */; do
pushd "$svd"
if ! test -d log; then
mkdir -p log
ln -s "$(which _default_logger)" log/run
fi
popd
done
popd
}
enable_defaults() {
mkdir -p "runsvdir/default"
pushd "runsvdir/default"
svdir="$(readlink -f ../../sv)"
for sv; do
ln -fs "$svdir/$sv" .
done
popd
}
create_logger
test -f .inited && exit 0
enable_defaults "$@"
touch .inited

View File

@ -1,7 +0,0 @@
#!/bin/sh
_lock
loginctl suspend &
systemctl suspend &
sudo -A zzz &

View File

@ -3,8 +3,8 @@
pkill -9 swayidle
exec swayidle -w \
before-sleep 'swaylock -f' \
timeout 360 'swaylock -f' \
before-sleep 'pkill caffeinated; swaylock -f' \
timeout 360 'pkill caffeinated; swaylock -f' \
timeout 1800 'mpc status | grep "^\[playing\]" > /dev/null ||
swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \

View File

@ -1,16 +0,0 @@
#!/bin/sh
export SVDIR="{{@@ user_svdir @@}}"
maybe() {
command -v $1 > /dev/null &&
env "$@"
}
if pidof swayidle > /dev/null; then
maybe sv down swayidle
maybe systemctl --user stop sway-idle.service
else
maybe sv up swayidle
maybe systemctl --user start sway-idle.service
fi

View File

@ -82,6 +82,7 @@ command -qs dhist &&
env $wraper -- bemenu \
$focused_output\
--grab\
--ignorecase\
--bottom\
--no-overlap\

View File

@ -37,8 +37,7 @@ sed -i -- '1d' "${namebase}.2"
{
echo '# Please review/modify this script or empty it to do nothing'
echo 'run(){'
echo ' mkdir -p "$(dirname "$2")"'
echo ' mv -T -- "$1" "$2"'
echo ' mv -Ti -- "$1" "$2"'
echo '}'
while read -r l1 <&3 && read -r l2 <&4; do
[ "$l1" = "$l2" ] || printf "%s\n%s\n" "$l1" "$l2"

View File

@ -21,7 +21,7 @@ if test "$1" = "update" && ! pidof mbsync; then
then
exit 0
fi
timeout 10m mbsync -a
mbsync -a
fi
cd "$HOME/.local/share/mail/" >/dev/null

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# {%@@ if launcher == "fuzzel" @@%} #
which fuzzel &> /dev/null &&

View File

@ -2,7 +2,7 @@
# Create symbolic links from game save folders to documents folder
# Useful if you sync it with syncthing or something similar
set -e
set -ex
clean() {
if test $? -ne 0; then
@ -43,8 +43,8 @@ game_save() {
game_save mindustry ".local/share/Mindustry"
game_save minecraft ".minecraft/saves"
game_save factorio_saves ".factorio/saves"
game_save factorio_saves "Games/factorio/saves"
game_save factorio ".factorio"
game_save factorio "Games/factorio"
game_save cuphead "Games/cuphead/drive_c/users/$USER/Application Data/Cuphead"
game_save dusk "Games/dusk/game/saves"
game_save stardew_valley ".config/StardewValley"

View File

@ -24,11 +24,8 @@ test "$1" = "-e" && shift
exec alacritty --class "$CLASS"
}
# {%@@ elif terminal == "foot" @@%} #
if ! pidof foot; then
foot --server 2> /dev/null &
fi
command -v footclient > /dev/null &&
exec footclient --app-id "$CLASS" -- $@
exec footclient --class "$CLASS" -- $@
# {%@@ elif terminal == "kitty" @@%} #
command -v kitty > /dev/null &&
exec kitty --class "$CLASS" -- $@

View File

@ -29,7 +29,7 @@ main() {
[ -n "$entry" ] || exit
username=`pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'`
username=`pass show "$entry" 2>/dev/null | perl -ne 'print $1 if /^login: (.*)/'`
password=`pass show "$entry" 2>/dev/null | head -n 1`
action=`printf "Autotype\nUsername -> $username\nPassword" | "$dmenu" -p Action`

View File

@ -45,8 +45,8 @@ assign [class="Hollow Knight"] workspace 9
assign [class=dishonored.exe] workspace 9
# Chats
assign [app_id=".*[Tt]elegram.*"] workspace 10
assign [class=".*[Tt]elegram.*"] workspace 10
assign [app_id=telegram.?desktop] workspace 10
assign [class=TelegramDesktop] workspace 10
assign [class="Jitsi Meet"] workspace 10
assign [class=discord] workspace 10
assign [title=Discord] workspace 10

View File

@ -22,8 +22,9 @@ set $Up {{@@ key.up @@}}
set $Right {{@@ key.right @@}}
set $tabL {{@@ key.tabL @@}}
set $tabR {{@@ key.tabR @@}}
set $lock {{@@ key.next @@}}
set $menu {{@@ key.menu @@}}
set $menu s
set $mus r
###############################################################
# Includes
@ -40,18 +41,16 @@ include modes
include assigns
{%@@ if supervisor == "runit" @@%}
set $user_svd "{{@@ user_svdir @@}}"
exec_always pgrep -u "$USER" "^runsvdir$" || runsvdir $user_svd
exec_always env SVDIR=$user_svd sv hup kanshi
exec_always _gpg-unlock
{%@@ elif supervisor == "systemd" @@%}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
{%@@ else @@%}
include daemons
{%@@ if supervisor == "scripts" @@%}
include daemons
{%@@ elif supervisor == "runit" @@%}
set $user_svd "$HOME/.config/runit/runsvdir/default"
exec_always pgrep -u "$USER" "^runsvdir$" || runsvdir $user_svd
exec_always env SVDIR=$user_svd sv hup kanshi
exec_always env SVDIR=$user_svd sv hup waybar
exec_always _gpg-unlock
{%@@ endif @@%}
exec light -N 1
exec dbus-update-activation-environment DISPLAY XAUTHORITY SWAYSOCK I3SOCK WAYLAND_DISPLAY
# Prevent the screen from locking if fullscreen

View File

@ -49,8 +49,8 @@ exec udiskie
exec_always pidof -x fusuma || fusuma
# Blue light filter
# exec /usr/lib/geoclue-2.0/demos/agent
exec_always pidof gammastep || gammastep -l -30:-50
exec /usr/lib/geoclue-2.0/demos/agent
exec_always pidof redshift || redshift
# Screen manager
exec_always _sway_displays

View File

@ -23,7 +23,7 @@ $mod+g exec emoji
$mod+d exec sway-displays
# Insert special characters
$mod+Alt+c exec _sway_idle_toggle
$mod+Alt+c exec pidof caffeinated && pkill caffeinated || caffeinated -d
# Kill focused window
$mod+x kill
@ -37,11 +37,8 @@ $mod+p exec wpass
# Reload the configuration file
$mod+Shift+c reload
# Lock Sway
$mod+$lock exec _lock
# Lock Sway and suspend
--locked $mod+Control+z exec _suspend
--locked $mod+Control+z exec loginctl suspend || systemctl suspend
# Exit sway
Control+Alt+delete exec pkill -u "$USER" -HUP runsvdir ; exit

View File

@ -57,9 +57,6 @@ bindsym --to-code {
{%@@ endfor @@%}
{%@@ endfor @@%}
$mod+Tab workspace next_on_output
$mod+Shift+Tab workspace prev_on_output
###############################################################
# Layout
@ -84,8 +81,8 @@ $mod+space focus mode_toggle
$mod+equal focus parent
$mod+minus focus child
# $mod+tab scratchpad show
# $mod+Shift+tab move container scratchpad
$mod+tab scratchpad show
$mod+Shift+tab move container scratchpad
}

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description=Wayland equivalent of autorandr.
Documentation=https://sr.ht/~emersion/kanshi/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _gammastep
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description=Wayland equivalent of autorandr.
Documentation=https://sr.ht/~emersion/kanshi/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/kanshi
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description=Wayland equivalent of autorandr.
Documentation=https://sr.ht/~emersion/kanshi/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env kdeconnect-indicator
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description=Wayland equivalent of autorandr.
Documentation=https://sr.ht/~emersion/kanshi/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _kdeconnectd
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description= Lightweight notification daemon for Wayland compositors.
Documentation=https://github.com/emersion/mako/wiki
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/mako
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,12 +0,0 @@
# {{ header() }}
[Unit]
Description= Send notification when maildir gets modified
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _notify-mail
[Install]
WantedBy=sway-session.target

View File

@ -1,12 +0,0 @@
# {{ header() }}
[Unit]
Description= Send notification when maildir gets modified
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _sway_idle
[Install]
WantedBy=sway-session.target

View File

@ -1,8 +0,0 @@
# {{ header() }}
[Unit]
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

View File

@ -1,14 +0,0 @@
# {{ header() }}
[Unit]
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/telegram-desktop
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,16 +0,0 @@
# {{ header() }}
[Unit]
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
Documentation=https://github.com/Alexays/Waybar/wiki/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/waybar
Restart=always
StartLimitBurst=2
StartLimitInterval=1
[Install]
WantedBy=sway-session.target

View File

@ -1,13 +0,0 @@
# {{ header() }}
[Unit]
Description= X settings daemon
Documentation=https://github.com/derat/xsettingsd
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/xsettingsd
[Install]
WantedBy=sway-session.target

View File

@ -16,15 +16,10 @@
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.openDiffOnClick": false,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"files.autoSave": "off",
"window.closeWhenEmpty": true,
"diffEditor.ignoreTrimWhitespace": true,
"gitlens.advanced.blame.customArguments": [
"-w",
],
// Rendering
"terminal.integrated.rendererType": "dom",
"editor.renderWhitespace": "none",
@ -40,7 +35,7 @@
"keyboard.dispatch": "keyCode",
// Colors
{%@@ if color.type == "dark" @@%}
"workbench.colorTheme": "Community Material Theme Darker High Contrast",
"workbench.colorTheme": "Community Material Theme Darker",
{%@@ else @@%}
"workbench.colorTheme": "GitHub Light",
{%@@ endif @@%}
@ -87,10 +82,9 @@
// "editorCursor.background": "{{@@ color.txt @@}}",
// "statusBar.foreground": "{{@@ color.txt @@}}",
},
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.formatOnSaveMode": "modifications",
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.suggestSelection": "first",
"debug.allowBreakpointsEverywhere": true,
"files.exclude": {
@ -128,13 +122,4 @@
"python.formatting.provider": "black",
"python.linting.pylintUseMinimalCheckers": false,
"python.linting.mypyEnabled": true,
"intelephense.format.braces": "k&r",
// copilot
"editor.inlineSuggest.enabled": true,
"github.copilot.enable": {
"*": true,
"yaml": true,
"plaintext": false,
"markdown": false
},
}

View File

@ -24,7 +24,7 @@
"custom/updates",
"custom/caffeine",
"pulseaudio",
// "bluetooth",
"bluetooth",
"network",
"battery"
],
@ -87,7 +87,6 @@
"format-icons": ["", "", "", "", "", ""]
},
"network": {
"interval": 5,
"tooltip":false,
"on-click": "terminal iwd",
"format-wifi": "{icon}",
@ -108,7 +107,6 @@
"tooltip-format": "{}"
},
"pulseaudio": {
"interval": 5,
"tooltip":false,
"scroll-step": 10,
"format": "{icon}",
@ -124,8 +122,7 @@
"car": "",
"default": ["奄", "奔", "墳"]
},
"on-click": "pavucontrol",
"on-click-right": "pulse-sink"
"on-click": "pavucontrol"
},
"custom/weather": {
"tooltip":false,
@ -190,9 +187,9 @@
},
"custom/caffeine":{
"format":"{}",
"exec":"pidof swayidle > /dev/null && echo 鈴 || echo ",
"on-click":"_sway_idle_toggle",
"interval": 1,
"exec":"pidof caffeinated > /dev/null && echo  || echo 鈴",
"on-click":"pidof caffeinated && pkill caffeinated || caffeinated -d",
"interval": 5,
"tooltip":false
},
"sway/language": {
@ -202,11 +199,6 @@
"exec":"test $(date +%H) -lt 5 && echo 'GO TO SLEEP' | trans -b",
"interval": 60,
"tooltip":false
},
"custom/unpushed": {
"exec":"_git_check_unpushed",
"interval": 30,
"tooltip": false
}
}

View File

@ -1,7 +1,7 @@
/* {{@@ header() @@}} */
/* {%@@ set bg_rgb = hex2rgb(color.bg) @@%} */
* {
font: {{@@ font.size.medium @@}}px "{{@@ font.interface @@}}", Hack Nerd Font;
font: {{@@ font.size.medium @@}}px "{{@@ font.interface @@}}", Font Awesome, Fira Code Nerd Font;
border-radius:0;
margin:0;
padding: 0;
@ -67,7 +67,6 @@ window#waybar.solo {
#custom-spigot,
#custom-updates,
#custom-weather,
#custom-unpushed,
#custom-transmissionD,
#custom-transmissionS,
#custom-delugeD,
@ -104,7 +103,6 @@ window#waybar.solo {
}
#custom-unpushed,
#custom-recording {
min-width:15px;
color: #ee4040;

1
root/.gitignore vendored
View File

@ -1 +0,0 @@
hardware.yaml

23
root/_create-subvolumes Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
set -e
BTRFS_ROOT="{{@@ filesystem.partitions['/'] @@}}"
if ! mountpoint "$BTRFS_ROOT"
then
mkdir -p "$BTRFS_ROOT"
mount "$BTRFS_ROOT"
fi
cd "$BTRFS_ROOT"
{%@@ set new_partitions = filesystem.partitions.update({root_subvol: '/'}) @@%}
{%@@ for name, path in filesystem.partitions.items() @@%}
test -e "./{{@@ name @@}}" ||
btrfs subvolume create "./{{@@ name @@}}"
test -d "{{@@ path @@}}" ||
mkdir -p "{{@@ path @@}}"
mountpoint "{{@@ path @@}}" ||
mount "{{@@ path @@}}"
{%@@ endfor @@%}

View File

@ -1,98 +0,0 @@
#!/bin/sh
# Default acpi script that takes an entry for all actions
# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
# modify it to not use /sys
# $1 should be + or - to step up or down the brightness.
step_backlight() {
for backlight in /sys/class/backlight/*/; do
[ -d "$backlight" ] || continue
step=$(( $(cat "$backlight/max_brightness") / 20 ))
[ "$step" -gt "1" ] || step=1 #fallback if gradation is too low
printf '%s' "$(( $(cat "$backlight/brightness") $1 step ))" >"$backlight/brightness"
done
}
minspeed=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq)
maxspeed=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
case "$1" in
button/power)
case "$2" in
PBTN|PWRF)
logger "PowerButton pressed: $2, suspending..."
pgrep swaylock ||
pkill -SIGUSR1 swayidle
zzz
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/sleep)
case "$2" in
SBTN|SLPB)
# suspend-to-ram
logger "Sleep Button pressed: $2, suspending..."
zzz
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
ac_adapter)
case "$2" in
AC|ACAD|ADP0)
case "$4" in
00000000)
printf '%s' "$minspeed" >"$setspeed"
#/etc/laptop-mode/laptop-mode start
;;
00000001)
printf '%s' "$maxspeed" >"$setspeed"
#/etc/laptop-mode/laptop-mode stop
;;
esac
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
battery)
case "$2" in
BAT0)
case "$4" in
00000000) #echo "offline" >/dev/tty5
;;
00000001) #echo "online" >/dev/tty5
;;
esac
;;
CPU0)
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/lid)
case "$3" in
close)
# suspend-to-ram
logger "LID closed, suspending..."
# zzz
;;
open)
logger "LID opened"
;;
*) logger "ACPI action undefined (LID): $2";;
esac
;;
video/brightnessdown)
step_backlight -
;;
video/brightnessup)
step_backlight +
;;
*)
logger "ACPI group/action undefined: $1 / $2"
;;
esac

View File

@ -21,17 +21,39 @@ config:
- "../funcs.py"
# import_configs:
# - "../config.yaml"
import_variables:
- "hardware.yaml"
# ###############################################################
# variables:
# ###############################################################
# plymouth: true
# zram: false
# filesystem:
# partitions:
# "/": /mnt/btrfs-root
# "/@home": /home
# "/@sql": /var/lib/mysql
# "/@swap": /swap
###############################################################
dynvariables:
###############################################################
# phisical_uuid: sudo blkid /dev/sda2 -s UUID -o value
# decrypted_uuid: sudo blkid /dev/mapper/main -s UUID -o value
# boot_uuid: sudo blkid /dev/sda1 -s UUID -o value
# root_subvol: echo "/@$(lsb_release -i | cut -f 2)-root"
nproc: nproc
# memory_size: env LC_ALL=C free -b | awk '/^Mem:/ {print $2}'
###############################################################
actions:
###############################################################
# greetd_install: _greetd_install
greetd_install: _greetd_install
grub_install: update-grub
locale_install: locale-gen
libc_locale_install: xbps-reconfigure -f glibc-locales
pacman_install: |
pacman-key --init
pacman-key --populate
@ -39,136 +61,64 @@ actions:
sv restart "{{@@ '_dotfile_key' @@}}" ||
rc-service "{{@@ '_dotfile_key' @@}}" restart
create_subvolumes: _create-subvolumes
create_swapfile: _create-swapfile
mount_partitions: mount -a
dbus_uuidgen: dbus-uuidgen --ensure
sysctl_apply: sysctl -a
mkinitcpio: mkinitcpio -P
restart_runit_service: sv restart "{0}"
enable_runit_services: ln -sf "{{@@ sys_services @@}}/{0}" "{{@@ sys_svdir @@}}/{0}"
enable_systemd_services: systemctl enable --now "{0}"
link_timezone: ln -sf "/usr/share/zoneinfo/{{@@ timezone @@}}" "/etc/localtime"
start_services: >
_runit_config "{{@@ _dotfile_abs_dst @@}}"
apache
cronie
dbus
dhcpcd
docker
earlyoom
elogind
greetd
iwd
bluetoothd
mariadb
preload
syslog-ng
tlp
###############################################################
profiles:
###############################################################
common:
dotfiles:
- bluez
# - fstab
- grub
- grub_d
- iwd
- kernel_modules
- locale
- pam
- sudoers
- sysctl
- udev_rules
- vconsole
voidlinux:
variables:
sys_services: /etc/sv
sys_svdir: /etc/runit/runsvdir/default/
root_subvol: /@void
include:
- "common"
dotfiles:
- elogind
- acpid
- libc_locales
- runit_services
- runit_services_enable
artixlinux:
variables:
root_subvol: /@artix
include:
- "common"
dotfiles:
- elogind
- mkinitcpio
- pacman-artix
archlinux:
variables:
root_subvol: /@arch
include:
- "common"
dotfiles:
- logind
- mkinitcpio
- pacman-arch
- systemd_services
- systemd_services_enable
###############################################################
dotfiles:
###############################################################
# greetd:
# src: greetd
# dst: /etc/greetd
# actions:
# - greetd_install
runit_sv:
src: runit_sv
dst: /etc/runit/sv
logind:
src: logind.conf
dst: /etc/systemd/logind.conf
greetd:
src: greetd
dst: /etc/greetd
actions:
- dbus_uuidgen
iwd:
src: iwd.conf
dst: /etc/iwd/main.conf
- greetd_install
elogind:
src: logind.conf
src: elogind.conf
dst: /etc/elogind/logind.conf
actions:
- dbus_uuidgen
acpid:
src: acpi-handler.sh
dst: /etc/acpi/handler.sh
actions:
- restart_runit_service acpid
# grub:
# src: grub
# dst: /etc/default/grub
# actions:
# - grub_install
grub:
src: grub
dst: /etc/default/grub
actions:
- grub_install
# mkinitcpio:
# src: mkinitcpio.conf
# dst: /etc/mkinitcpio.conf
# actions:
# - mkinitcpio
grub_d:
src: grub.d
dst: /etc/grub.d
actions:
- grub_install
pam:
src: pam-local-login
dst: /etc/pam.d/system-local-login
sudoers:
src: sudoers
dst: /etc/sudoers.d/local
mkinitcpio:
src: mkinitcpio.conf
dst: /etc/mkinitcpio.conf
actions:
- mkinitcpio
pacman-artix:
src: pacman-artix.conf
dst: /etc/pacman.conf
actions:
- pacman_install
pacman-arch:
src: pacman-arch.conf
pacman:
src: pacman.conf
dst: /etc/pacman.conf
actions:
- pacman_install
@ -183,17 +133,13 @@ dotfiles:
actions:
- locale_install
libc_locales:
src: locale.gen
dst: /etc/default/libc-locales
actions:
- libc_locale_install
fstab:
src: fstab
dst: /etc/fstab
actions:
- create_swapfile
# fstab:
# src: fstab
# dst: /etc/fstab
# actions:
# - create_subvolumes
# - create_swapfile
# - mount_partitions
sysctl:
src: sysctl
@ -201,61 +147,24 @@ dotfiles:
actions:
- sysctl_apply
kernel_modules:
src: kernel-modules
dst: /etc/modules-load.d/
udev_rules:
src: udev-rules
dst: /etc/udev/rules.d/
vconsole:
src: vconsole.conf
dst: /etc/vconsole.conf
# zram:
# src: zram
# dst: /etc/
# earlyoom:
# src: earlyoom
# dst: /etc/default/earlyoom
runit_services:
services:
src: runit_sv
dst: /etc/runit/sv
runit_services_enable:
src:
dst:
actions:
- enable_runit_services acpid
- enable_runit_services bluetoothd
- enable_runit_services crond
- enable_runit_services dbus
- enable_runit_services dhcpcd
- enable_runit_services docker
- enable_runit_services iwd
- enable_runit_services ntpd
- enable_runit_services rundird
- enable_runit_services seatd
- enable_runit_services socklog-unix
- enable_runit_services tlp
- start_services
systemd_services:
src: systemd
dst: /etc/systemd/system/
systemd_services_enable:
src:
dst:
actions:
- enable_systemd_services bluetooth
- enable_systemd_services cronie
- enable_systemd_services docker
# - enable_systemd_services dhcpcd
# - enable_systemd_services iwd
- enable_systemd_services ntpd
- enable_systemd_services tlp
timezone:
src:
dst:
actions:
- link_timezone
###############################################################
profiles:
###############################################################
main:
dotfiles:
- ALL

View File

@ -1,26 +1,17 @@
{{@@ non_templated(_dotfile_abs_dst) @@}}
##### Dotdrop-start #####
# <filesystem> <dir> <type> <options> <dump> <pass>
{#@@<filesystem> <dir> <type> <options> <dump> <pass> @@#}
{%@@ set btrfs_opt_t = "defaults,autodefrag,rw,noatime,compress=zstd:3,subvol={}" @@%}
{%@@ set btrfs_opt_t = "rw,noatime,compress=zstd:3,subvol={}" @@%}
{%@@ set entry_t = "UUID={uuid} {path} {fs} {opts} {dump} {pass}" @@%}
{%@@ for partition in filesystem.partition @@%}
{{@@ entry_t.format(
uuid= partition.uuid ,
path= partition.path ,
fs= partition.type,
opts= partition.options,
dump= "0",
pass= "0",
) @@}}
{%@@ endfor @@%}
UUID={{@@ boot_uuid @@}} /boot vfat rw,errors=remount-ro 0 2
{%@@ set new_partitions = filesystem.btrfs_subvolumes.update({root_subvol: '/'}) @@%}
{%@@ for name, path in filesystem.btrfs_subvolumes.items() @@%}
{%@@ set new_partitions = filesystem.partitions.update({root_subvol: '/'}) @@%}
{%@@ for name, path in filesystem.partitions.items() @@%}
{{@@ entry_t.format(
uuid= root_uuid ,
uuid= decrypted_uuid ,
path= path ,
fs= "btrfs",
opts= btrfs_opt_t.format(name),

View File

@ -7,20 +7,11 @@ GRUB_TIMEOUT=1
GRUB_HIDDEN_TIMEOUT=1
GRUB_RECORDFAIL_TIMEOUT=$GRUB_HIDDEN_TIMEOUT
GRUB_DISTRIBUTOR="Void"
GRUB_DISTRIBUTOR="Artix"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=" \
quiet loglevel=3 rd.udev.log_level=3 \
rd.vconsole.keymap={{@@ key_layout @@}} \
{%@@ if phisical_uuid @@%}
rd.luks.uuid={{@@ phisical_uuid @@}} \
root=UUID={{@@ root_uuid @@}} \
{%@@ endif @@%}
{%@@ if root_subvol @@%}
rootflags=rw,noatime,compress=zstd,subvol=/{{@@ root_subvol @@}} \
{%@@ endif @@%}
"
GRUB_CMDLINE_LINUX=" cryptdevice=/dev/disk/by-uuid/{{@@ phisical_uuid @@}}:main "
GRUB_CMDLINE_LINUX+=" root=/dev/mapper/main rootflags=rw,noatime,compress=zstd,subvol=/{{@@ root_subvol @@}} "
{%@@ if plymouth @@%}
GRUB_CMDLINE_LINUX+=" fbcon=nodefer splash quiet loglevel=3 vt.global_cursor_default=0 rd.udev.log_level=3 "

View File

@ -1,23 +0,0 @@
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux-zen.img
}

View File

@ -1,192 +0,0 @@
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=1
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 1 ; then
set timeout=0
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux-zen.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
menuentry 'Arch Linux, with Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux-zen.img
}
menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux-zen-fallback.img
}
menuentry 'Arch Linux, with Linux 5.15.32_1' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.32_1-advanced-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux 5.15.32_1 ...'
linux /vmlinuz-5.15.32_1 root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-5.15.32_1.img
}
menuentry 'Arch Linux, with Linux 5.15.30_1' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.30_1-advanced-71dcad6d-3c93-473d-ad60-0cea0d6d379c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5977-60ED
else
search --no-floppy --fs-uuid --set=root 5977-60ED
fi
echo 'Loading Linux 5.15.30_1 ...'
linux /vmlinuz-5.15.30_1 root=UUID=71dcad6d-3c93-473d-ad60-0cea0d6d379c rw rootflags=subvol=@arch quiet loglevel=3 rd.udev.log_level=3 rd.vconsole.keymap=colemak cryptdevice=/dev/disk/by-label/CRYPTROOT:main root=/dev/disk/by-label/ROOT rootflags=rw,noatime,compress=zstd,subvol=//@arch
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-5.15.30_1.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

View File

@ -1,26 +0,0 @@
variables:
plymouth: false
zram: false
key_layout: colemak
# set to false if root_uuid == phisical_uuid
phisical_uuid: ####RUN#### sudo blkid /dev/sda2 -s UUID -o value
root_uuid: ####RUN#### sudo blkid /dev/mapper/main -s UUID -o value
boot_uuid: ####RUN#### sudo blkid /dev/sda1 -s UUID -o value
# set to false if not using btrfs
root_subvol: ####RUN#### echo "/@$(lsb_release -i | cut -f 2)-root"
nproc: ####RUN#### nproc
memory_size: ####RUN#### env LC_ALL=C free -b | awk '/^Mem:/ {print $2}'
filesystem:
partition:
- type: vfat
uuid: ####RUN#### sudo blkid /dev/sda1 -s UUID -o value
path: /boot
options: rw
btrfs_subvolumes:
"/": /mnt/btrfs-root
"/@home": /home
"/@mysql": /var/lib/mysql
"/@swap": /swap

View File

@ -1,3 +0,0 @@
[General]
EnableNetworkConfiguration=false
UseDefaultInterface=true

Some files were not shown because too many files have changed in this diff Show More