Compare commits
No commits in common. "main" and "get-config" have entirely different histories.
main
...
get-config
28 changed files with 184 additions and 334 deletions
12
README.md
12
README.md
|
@ -1,12 +0,0 @@
|
||||||
# Raine's Dotfiles
|
|
||||||
|
|
||||||
## Crates
|
|
||||||
Everything is a crate.
|
|
||||||
If something is distro specific you should follow the following naming scheme:
|
|
||||||
`crate.<DISTRO>.sh`
|
|
||||||
|
|
||||||
## Using it
|
|
||||||
Just use the script tbh
|
|
||||||
```sh
|
|
||||||
curl -L https://via.ixvd.net/sh | sh
|
|
||||||
```
|
|
|
@ -1,5 +0,0 @@
|
||||||
super_apply() {
|
|
||||||
apt update -y
|
|
||||||
apt install -y netselect-apt sudo
|
|
||||||
netselect-apt
|
|
||||||
}
|
|
|
@ -4,8 +4,5 @@ describe="Install stuff on the system!"
|
||||||
scripts="@distro @self"
|
scripts="@distro @self"
|
||||||
|
|
||||||
super_apply() {
|
super_apply() {
|
||||||
if [ -f /usr/lib/security/pam_wheel.so ] && ! grep -q "# pam_wheel.so added" /etc/pam.d/su; then
|
cp files/sudoers /etc/sudoers
|
||||||
echo "auth sufficient pam_wheel.so trust use_uid" > /etc/pam.d/su
|
|
||||||
echo "# pam_wheel.so added" > /etc/pam.d/su
|
|
||||||
fi
|
|
||||||
}
|
}
|
4
crates/00-system/files/sudoers
Normal file
4
crates/00-system/files/sudoers
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
root ALL=(ALL:ALL) ALL
|
||||||
|
%wheel ALL=(ALL:ALL) ALL
|
||||||
|
%root ALL=(ALL:ALL) NOPASSWD: ALL
|
||||||
|
@includedir /etc/sudoers.d
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
describe="setup ssh"
|
|
||||||
|
|
||||||
apply() {
|
|
||||||
[ -e "$HOME/.ssh/authorized_keys" ] || ln files/authorized_keys $HOME/.ssh/authorized_keys
|
|
||||||
if ! [ -f "$HOME/.ssh/id_rsa" ]; then
|
|
||||||
echo "Creating new ssh key for this device..."
|
|
||||||
ssh-keygen -f $HOME/.ssh/id_rsa -p "" -q
|
|
||||||
echo "Adding key to authorized_keys..."
|
|
||||||
cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/authorized_keys
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
undo() {
|
|
||||||
echo "Undoing ssh keys is not supported, please do this manually."
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCeNQfnbyyF3sht43vH5BcXDPca8nWu6bKPVGvAlWBOq4Av8ME2IQgwVe9nJ05r73ZY02/Vdqc01a8wyK5Hmw0XlPL0Cn6wc9QoiscOvq5lMUK87S2tr3EVLGkgl8o7nmVuWgLewyojiORjM02P1PZEiFhKPXVEQFxU0dFz9QtpAdm0u78Xn2HTukHpXSv44R3XDDMFZ3Ek/XRuS6J9dZVxGkgCLQhK8kpfbxuiYxaRC7MHgGlYuxjLuZ6P4i+V+SSSShfCGdm6U9bgeIAwftN6a8Pc9+OsBeZGSUrGjZjRlD35q0a7fbpoS8pKTfbwgf/ijYeu3JmAQUlY+H959mIpg4H9XOgRrKVJSYwx5/BGuhmWgVy6HIYpXCQfEbLE7QDmwC2C430KzAH6jCcrRNyurIUCuO4iq9dwoQTzboMccOK79S2Z+1B5fYgS3BZgaiTUBSME2G2FriM6utgleiBnvFu/p7oH2I8ZHL/aVcSWAw0gbzsr7ADywAuiDNZk18c= strix@ryuk
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
pkgs="i3 i3lock i3status libpulse brightnessctl xss-lock dex maim dmenu gnome-keyring feh picom"
|
pkgs="i3 i3lock i3status libpulse brightnessctl xss-lock dex maim dmenu gnome-keyring"
|
||||||
|
|
||||||
super_apply() {
|
super_apply() {
|
||||||
pacman -S --needed --noconfirm $pkgs
|
pacman -S --needed --noconfirm $pkgs
|
||||||
|
|
|
@ -8,7 +8,6 @@ apply() {
|
||||||
[ -d "$HOME/.config/i3status" ] || mkdir -p $HOME/.config/i3status
|
[ -d "$HOME/.config/i3status" ] || mkdir -p $HOME/.config/i3status
|
||||||
[ -e "$HOME/.config/i3/config" ] || ln files/config $HOME/.config/i3/config
|
[ -e "$HOME/.config/i3/config" ] || ln files/config $HOME/.config/i3/config
|
||||||
[ -e "$HOME/.config/i3status/config" ] || ln files/status_config $HOME/.config/i3status/config
|
[ -e "$HOME/.config/i3status/config" ] || ln files/status_config $HOME/.config/i3status/config
|
||||||
[ -e "$HOME/.config/picom.conf" ] || ln files/picom.conf $HOME/.config/picom.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
undo() {
|
undo() {
|
||||||
|
@ -17,7 +16,6 @@ undo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
super_apply() {
|
super_apply() {
|
||||||
[ -d "/etc/X11/xorg.conf.d" ] || mkdir -p /etc/X11/xorg.conf.d/
|
|
||||||
cp files/40-proper-touchpad.conf /etc/X11/xorg.conf.d/40-proper-touchpad.conf
|
cp files/40-proper-touchpad.conf /etc/X11/xorg.conf.d/40-proper-touchpad.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
pkgs="i3 i3lock i3status pulseaudio-devel brightnessctl xss-lock dex maim dmenu gnome-keyring feh picom"
|
|
||||||
|
|
||||||
super_apply() {
|
|
||||||
xbps-install -y $pkgs
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
xbps-remove -y $pkgs
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#######################
|
######################
|
||||||
## Raine's i3 config ##
|
## Raine's i3 config ##
|
||||||
## Mar 22, 2023 ##
|
## Sept 2, 2023 ##
|
||||||
## mutation: 1m ##
|
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
## Mostly similar to i3's config yet differs
|
## Mostly similar to i3's config yet differs
|
||||||
|
@ -14,26 +13,21 @@ set $screen_lock i3lock -c "#111111" --nofork
|
||||||
set $appmenu i3-dmenu-desktop
|
set $appmenu i3-dmenu-desktop
|
||||||
|
|
||||||
set $screenshot maim -s | xclip -selection clipboard -t image/png
|
set $screenshot maim -s | xclip -selection clipboard -t image/png
|
||||||
|
set $alt_screenshot maim ~/Pictures/Screenshots/$(date +%s).png
|
||||||
|
|
||||||
|
set $mod Mod4
|
||||||
|
set $alt Mod1
|
||||||
set $font pango:monospace 8
|
set $font pango:monospace 8
|
||||||
|
|
||||||
# Startup Applications:
|
# Startup Applications:
|
||||||
# Things that will startup when starting i3.
|
# Things that will startup when starting i3.
|
||||||
# ---
|
# ---
|
||||||
exec_always --no-startup-id dex --autostart --environment i3
|
exec --no-startup-id xrandr --output DP-2-1 --left-of DP-1-1
|
||||||
exec_always --no-startup-id nm-applet
|
exec --no-startup-id sh .scripts/clock-in.sh
|
||||||
exec_always --no-startup-id xss-lock --transfer-sleep-lock -- $screen_lock
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
exec_always --no-startup-id gnome-keyring-daemon --start --components=ssh,secrets,pkcs11
|
exec --no-startup-id nm-applet
|
||||||
exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpaper.jpg
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- $screen_lock
|
||||||
exec_always --no-startup-id picom
|
exec --no-startup-id gnome-keyring-daemon --start --components=ssh,secrets,pkcs11
|
||||||
|
|
||||||
# Gaps & Borders:
|
|
||||||
# ---
|
|
||||||
gaps inner 10
|
|
||||||
smart_gaps on
|
|
||||||
|
|
||||||
default_border pixel 1
|
|
||||||
hide_edge_borders smart_no_gaps
|
|
||||||
|
|
||||||
# Extra variables:
|
# Extra variables:
|
||||||
# Only need changing for very specific installations.
|
# Only need changing for very specific installations.
|
||||||
|
@ -46,16 +40,27 @@ set $audio_mute_mic XF86AudioMicMute
|
||||||
set $brightness_up XF86MonBrightnessUp
|
set $brightness_up XF86MonBrightnessUp
|
||||||
set $brightness_down XF86MonBrightnessDown
|
set $brightness_down XF86MonBrightnessDown
|
||||||
|
|
||||||
|
set $nav_up l
|
||||||
|
set $nav_down k
|
||||||
|
set $nav_left j
|
||||||
|
set $nav_right semicolon
|
||||||
|
|
||||||
set $ws_1 "1:main"
|
set $ws_1 "1:main"
|
||||||
set $ws_2 "2:term"
|
set $ws_2 "2:term"
|
||||||
set $ws_3 "3:docs"
|
set $ws_3 "3:browser"
|
||||||
set $ws_4 "4:mail"
|
set $ws_4 "4:mail"
|
||||||
set $ws_5 "5"
|
set $ws_5 "5:notes"
|
||||||
set $ws_6 "6"
|
set $ws_6 "6"
|
||||||
set $ws_7 "7"
|
set $ws_7 "7"
|
||||||
set $ws_8 "8"
|
set $ws_8 "8"
|
||||||
set $ws_9 "9:bg"
|
set $ws_9 "9:background"
|
||||||
set $ws_10 "10:misc"
|
set $ws_10 "10:multimedia"
|
||||||
|
|
||||||
|
set $mode_resize_combo Mod4+r
|
||||||
|
set $mode_session_combo Mod4+Delete
|
||||||
|
set $mode_keybind_combo Mod4+Insert
|
||||||
|
|
||||||
|
set $op_floating_modifier Mod1
|
||||||
|
|
||||||
set $meta_refresh_statusbar killall -SIGUSR1 i3status
|
set $meta_refresh_statusbar killall -SIGUSR1 i3status
|
||||||
bar {
|
bar {
|
||||||
|
@ -65,38 +70,47 @@ bar {
|
||||||
|
|
||||||
# END OF CONFIG
|
# END OF CONFIG
|
||||||
|
|
||||||
set $mod Mod4
|
|
||||||
set $alt Mod1
|
|
||||||
|
|
||||||
# Customization
|
# Customization
|
||||||
|
#! Customization
|
||||||
# class border backgr. text indic. child_border
|
# class border backgr. text indicator child_border
|
||||||
client.focused #81A1C1 #81A1C1 #ffffff #D8DEE9
|
client.focused #D991BA #D27099 #ffffff #D96FBA #D951B0
|
||||||
client.focused_inactive #2E3440 #2E3440 #88C0D0 #454948
|
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||||
client.unfocused #2E3440 #2E3440 #88C0D0 #454948
|
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||||
client.urgent #D08770 #3B4252 #ffffff #268BD2
|
client.urgent #EF2929 #900000 #ffffff #900000 #900000
|
||||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||||
client.background #3B4252
|
client.background #888A85
|
||||||
|
|
||||||
# Generic
|
# Generic
|
||||||
floating_modifier $mod
|
floating_modifier $op_floating_modifier
|
||||||
tiling_drag modifier titlebar
|
tiling_drag modifier titlebar
|
||||||
font $font
|
font $font
|
||||||
|
|
||||||
|
workspace $ws_1 output DP-2-1
|
||||||
|
workspace $ws_2 output DP-2-1
|
||||||
|
workspace $ws_3 output DP-1-1
|
||||||
|
workspace $ws_4 output DP-1-1
|
||||||
|
workspace $ws_5 output DP-2-1
|
||||||
|
workspace $ws_6 output DP-2-1
|
||||||
|
workspace $ws_7 output DP-1-1
|
||||||
|
workspace $ws_8 output DP-1-1
|
||||||
|
workspace $ws_9 output DP-2-1
|
||||||
|
workspace $ws_10 output DP-2-1
|
||||||
|
|
||||||
# Open a terminal
|
# Open a terminal
|
||||||
bindsym $mod+Return exec $terminal
|
bindsym $mod+Return exec $terminal
|
||||||
|
|
||||||
# Kill current window
|
# Kill current window
|
||||||
bindsym $mod+$alt+q kill
|
bindsym $alt+Shift+q kill
|
||||||
|
|
||||||
# Open app menu
|
# Open app menu
|
||||||
bindsym $mod+d exec --no-startup-id $appmenu
|
bindsym $mod+Shift+d exec --no-startup-id $appmenu
|
||||||
|
|
||||||
# Lock screen
|
# Lock screen
|
||||||
bindsym $mod+l exec --no-startup-id $screen_lock
|
bindsym $mod+l exec --no-startup-id $screen_lock
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
bindsym Print exec --no-startup-id $screenshot
|
bindsym Print exec $screenshot
|
||||||
|
bindsym Mod1+Print exec $alt_screenshot
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
bindsym $audio_volume_up exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $meta_refresh_statusbar
|
bindsym $audio_volume_up exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $meta_refresh_statusbar
|
||||||
|
@ -109,35 +123,43 @@ bindsym $brightness_up exec --no-startup-id brightnessctl set +5% && $meta_refre
|
||||||
bindsym $brightness_down exec --no-startup-id brightnessctl set 5%- && $meta_refresh_statusbar
|
bindsym $brightness_down exec --no-startup-id brightnessctl set 5%- && $meta_refresh_statusbar
|
||||||
|
|
||||||
# Change focused window
|
# Change focused window
|
||||||
bindsym $mod+Up focus up
|
bindsym $alt+$nav_up focus up
|
||||||
bindsym $mod+Down focus down
|
bindsym $alt+$nav_down focus down
|
||||||
bindsym $mod+Left focus left
|
bindsym $alt+$nav_left focus left
|
||||||
bindsym $mod+Right focus right
|
bindsym $alt+$nav_right focus right
|
||||||
|
bindsym $alt+Up focus up
|
||||||
|
bindsym $alt+Down focus down
|
||||||
|
bindsym $alt+Left focus left
|
||||||
|
bindsym $alt+Right focus right
|
||||||
|
|
||||||
# Move focused window
|
# Move focused window
|
||||||
bindsym $mod+Shift+Up move up
|
bindsym $alt+Shift+Up move up
|
||||||
bindsym $mod+Shift+Down move down
|
bindsym $alt+Shift+Down move down
|
||||||
bindsym $mod+Shift+Left move left
|
bindsym $alt+Shift+Left move left
|
||||||
bindsym $mod+Shift+Right move right
|
bindsym $alt+Shift+Right move right
|
||||||
|
bindsym $alt+Shift+$nav_up move up
|
||||||
|
bindsym $alt+Shift+$nav_down move down
|
||||||
|
bindsym $alt+Shift+$nav_left move left
|
||||||
|
bindsym $alt+Shift+$nav_right move right
|
||||||
|
|
||||||
# Splits
|
# Splits
|
||||||
bindsym $mod+Shift+h split h
|
bindsym $alt+h split h
|
||||||
bindsym $mod+Shift+v split v
|
bindsym $alt+v split v
|
||||||
|
|
||||||
# Change container layout
|
|
||||||
bindsym $mod+Shift+s layout stacking
|
|
||||||
bindsym $mod+Shift+t layout tabbed
|
|
||||||
bindsym $mod+Shift+d layout toggle split
|
|
||||||
|
|
||||||
# Make current window fullscreen
|
# Make current window fullscreen
|
||||||
bindsym $mod+Shift+f fullscreen toggle
|
bindsym $alt+f fullscreen toggle
|
||||||
|
|
||||||
|
# Change container layout
|
||||||
|
bindsym $mod+Mod1+s layout stacking
|
||||||
|
bindsym $mod+Mod1+t layout tabbed
|
||||||
|
bindsym $mod+Mod1+e layout toggle split
|
||||||
|
|
||||||
# Floating stuff
|
# Floating stuff
|
||||||
bindsym $mod+space focus mode_toggle
|
bindsym $mod+space focus mode_toggle
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $alt+space floating toggle
|
||||||
|
|
||||||
# Scratchpad
|
# Scratchpad
|
||||||
bindsym $mod+Shift+minus move scratchpad
|
bindsym $alt+minus move scratchpad
|
||||||
bindsym $mod+minus scratchpad show
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
# Switch to workspace
|
# Switch to workspace
|
||||||
|
@ -164,20 +186,22 @@ bindsym $mod+Shift+8 move container to workspace $ws_8
|
||||||
bindsym $mod+Shift+9 move container to workspace $ws_9
|
bindsym $mod+Shift+9 move container to workspace $ws_9
|
||||||
bindsym $mod+Shift+0 move container to workspace $ws_10
|
bindsym $mod+Shift+0 move container to workspace $ws_10
|
||||||
|
|
||||||
# Move through workspaces
|
# Move to workspace next to current
|
||||||
bindsym $mod+$alt+Left workspace prev
|
bindsym $mod+$nav_left workspace prev
|
||||||
bindsym $mod+$alt+Right workspace next
|
bindsym $mod+$nav_right workspace next
|
||||||
|
bindsym $mod+Left workspace prev
|
||||||
|
bindsym $mod+Right workspace next
|
||||||
|
|
||||||
# WM stuff
|
# WM stuff
|
||||||
# reload i3 config
|
# reload i3 config
|
||||||
bindsym $mod+$alt+c reload
|
bindsym $mod+Control+c reload
|
||||||
# restart i3
|
# restart i3
|
||||||
bindsym $mod+$alt+r restart
|
bindsym $mod+Control+r restart
|
||||||
# exit i3
|
# exit i3 (recognized combo; for people who need to exit your session)
|
||||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
# Modes
|
# Modes
|
||||||
bindsym $mod+r mode resize
|
bindsym $mode_resize_combo mode resize
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
bindsym $nav_left resize shrink width 10 px or 10 ppt
|
bindsym $nav_left resize shrink width 10 px or 10 ppt
|
||||||
bindsym $nav_down resize grow height 10 px or 10 ppt
|
bindsym $nav_down resize grow height 10 px or 10 ppt
|
||||||
|
@ -190,17 +214,23 @@ mode "resize" {
|
||||||
|
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
bindsym $mod+r mode "default"
|
bindsym $mode_resize_combo mode "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym $mod+s mode "session"
|
bindsym $mode_session_combo mode session
|
||||||
mode "session" {
|
mode "session" {
|
||||||
bindsym l exec --no-startup-id $lock, mode "default"
|
bindsym l exec --no-startup-id $screen_lock, mode "default"
|
||||||
bindsym e exec --no-startup-id i3-msg exit, mode "default"
|
bindsym e exec --no-startup-id i3-msg exit, mode "default"
|
||||||
bindsym Shift+r exec --no-startup-id systemctl reboot, mode "default"
|
bindsym Shift+r exec --no-startup-id systemctl reboot, mode "default"
|
||||||
|
bindsym Shift+h exec --no-startup-id systemctl hibernate, mode "default"
|
||||||
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
|
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
|
||||||
|
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
bindsym $mod+s mode "default"
|
bindsym $mode_session_combo mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
bindsym $mode_keybind_combo mode kbmode
|
||||||
|
mode "kbmode" {
|
||||||
|
bindsym $mode_keybind_combo mode "default"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
inactive-opacity = 0.75;
|
|
||||||
|
|
||||||
blur: {
|
|
||||||
method = "box";
|
|
||||||
size = 10;
|
|
||||||
background = false;
|
|
||||||
background-frame = false;
|
|
||||||
background-fixed = false;
|
|
||||||
}
|
|
|
@ -5,16 +5,16 @@ general {
|
||||||
}
|
}
|
||||||
|
|
||||||
order += "ipv6"
|
order += "ipv6"
|
||||||
order += "wireless wlp58s0"
|
order += "ethernet eno1"
|
||||||
order += "battery 0"
|
order += "battery 0"
|
||||||
order += "disk /"
|
order += "disk /"
|
||||||
order += "memory"
|
order += "memory"
|
||||||
order += "load"
|
order += "load"
|
||||||
order += "tztime local"
|
order += "tztime local"
|
||||||
|
|
||||||
wireless wlp58s0 {
|
ethernet eno1 {
|
||||||
format_up = "W: (%quality at %essid, %bitrate) %ip"
|
format_up = "E: %ip (%speed)"
|
||||||
format_down = "W: down"
|
format_down = "E: down"
|
||||||
}
|
}
|
||||||
|
|
||||||
battery 0 {
|
battery 0 {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
super_apply() {
|
super_apply() {
|
||||||
pacman -S --needed --noconfirm zsh
|
pacman -S --needed --noconfirm zsh cmake
|
||||||
}
|
}
|
||||||
|
|
||||||
super_undo() {
|
super_undo() {
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
super_apply() {
|
|
||||||
apt install -y zsh
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
pacman -R --noconfirm zsh
|
|
||||||
}
|
|
|
@ -4,6 +4,17 @@ describe="Install zsh and oh-my-zsh!"
|
||||||
scripts="@distro @self"
|
scripts="@distro @self"
|
||||||
|
|
||||||
super_apply() {
|
super_apply() {
|
||||||
|
[ -d /tmp/fastfetch ] || git clone https://github.com/LinusDierheimer/fastfetch /tmp/fastfetch
|
||||||
|
|
||||||
|
if ! command -v fastfetch &> /dev/null; then
|
||||||
|
cd /tmp/fastfetch
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --target fastfetch
|
||||||
|
mv fastfetch /usr/local/bin/fastfetch
|
||||||
|
fi
|
||||||
|
|
||||||
usermod $USER --shell /bin/zsh
|
usermod $USER --shell /bin/zsh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +32,7 @@ apply() {
|
||||||
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $PL_DIR
|
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $PL_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f "$HOME/.zshrc" ] && unlink $HOME/.zshrc
|
unlink $HOME/.zshrc
|
||||||
[ -e "$HOME/.zshrc" ] || ln files/.zshrc $HOME/.zshrc
|
[ -e "$HOME/.zshrc" ] || ln files/.zshrc $HOME/.zshrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
super_apply() {
|
|
||||||
xbps-install -y zsh
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
xbps-remove -y zsh
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,53 +1,22 @@
|
||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
# Raine's .zshrc
|
|
||||||
|
|
||||||
if [ "$PROFILEINC" = "1" ]; then
|
|
||||||
. ~/.profile
|
|
||||||
fi
|
|
||||||
|
|
||||||
export EDITOR=vim
|
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.local/bin"
|
|
||||||
|
|
||||||
# oh-my-zsh init
|
# paths
|
||||||
if [ -f "$HOME/.oh-my-zsh/oh-my-zsh.sh" ]; then
|
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
|
||||||
ZSH_THEME="afowler"
|
|
||||||
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting zsh-cargo-completion)
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
else
|
|
||||||
echo "oh-my-zsh not detected :("
|
|
||||||
PS1="$(whoami)@${HOSTNAME:-$(hostname)} $ "
|
|
||||||
fi
|
|
||||||
|
|
||||||
update_dotfiles() {
|
# ZSH
|
||||||
cd $HOME/.dotfiles
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
git pull
|
|
||||||
cd - &> /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
share_cdn() {
|
ZSH_THEME="afowler"
|
||||||
if ! [ -f "$1" ]; then
|
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting)
|
||||||
echo "file needs to exist"
|
source $ZSH/oh-my-zsh.sh
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
scp $1 keymaker:/usr/share/cdn/random/$2 > /dev/null
|
|
||||||
echo "https://cdn.ixvd.net/random/${2:-$(basename $1)}"
|
|
||||||
}
|
|
||||||
|
|
||||||
container() {
|
|
||||||
docker run \
|
|
||||||
-ti \
|
|
||||||
--rm \
|
|
||||||
--name tmp-$(id -u)-$(openssl rand -hex 8) \
|
|
||||||
--network ${CONTAINER_NETWORK:-internal} \
|
|
||||||
alpine \
|
|
||||||
ash
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -f "$HOME/.config/i3/shortcuts-i3.sh" ] && . ~/.config/i3/shortcuts-i3.sh
|
|
||||||
|
|
||||||
|
# ALIASES
|
||||||
|
alias open="xdg-open"
|
||||||
|
alias nobeep="sudo modprobe -r pcspkr"
|
||||||
|
alias s="title $HOST && cmatrix -rs && clear"
|
||||||
alias q="exit"
|
alias q="exit"
|
||||||
alias vim="nvim"
|
|
||||||
alias vi="nvim"
|
# COSMETICS
|
||||||
|
#fastfetch
|
||||||
|
|
||||||
|
export PATH="${PATH}:/home/${USER}/.local/bin"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
super_apply() {
|
super_apply() {
|
||||||
pacman -S --needed --noconfirm neovim
|
pacman -S --needed --noconfirm vim
|
||||||
}
|
}
|
||||||
|
|
||||||
super_undo() {
|
super_undo() {
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
super_apply() {
|
|
||||||
apt install -y neovim
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
echo "we never uninstall vim -_-"
|
|
||||||
}
|
|
|
@ -4,12 +4,11 @@ describe="Install vim and it's stuff"
|
||||||
scripts="@distro @self"
|
scripts="@distro @self"
|
||||||
|
|
||||||
apply() {
|
apply() {
|
||||||
[ -d "$HOME/.config/nvim" ] || mkdir -p "$HOME/.config/nvim"
|
[ -e "$HOME/.vimrc" ] || ln files/.vimrc $HOME/.vimrc
|
||||||
[ -e "$HOME/.config/nvim/init.vim" ] || ln files/init.vim $HOME/.config/nvim/init.vim
|
|
||||||
[ -e "$HOME/.ideavimrc" ] || ln files/.ideavimrc $HOME/.ideavimrc
|
[ -e "$HOME/.ideavimrc" ] || ln files/.ideavimrc $HOME/.ideavimrc
|
||||||
}
|
}
|
||||||
|
|
||||||
undo() {
|
undo() {
|
||||||
unlink $HOME/.config/nvim/init.vim
|
unlink $HOME/.vimrc
|
||||||
unlink $HOME/.ideavimrc
|
unlink $HOME/.ideavimrc
|
||||||
}
|
}
|
|
@ -1,7 +0,0 @@
|
||||||
super_apply() {
|
|
||||||
xbps-install -y neovim
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
echo "we never uninstall vim -_-"
|
|
||||||
}
|
|
2
crates/20-vim/files/.vimrc
Normal file
2
crates/20-vim/files/.vimrc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
set number
|
||||||
|
set relativenumber
|
|
@ -1,27 +0,0 @@
|
||||||
" vim preferences
|
|
||||||
set number
|
|
||||||
set relativenumber
|
|
||||||
syntax on
|
|
||||||
|
|
||||||
" No arrow keys
|
|
||||||
noremap <Up> <Nop>
|
|
||||||
noremap <Down> <Nop>
|
|
||||||
noremap <Left> <Nop>
|
|
||||||
noremap <Right> <Nop>
|
|
||||||
|
|
||||||
" ensure vim-plug
|
|
||||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
|
||||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
||||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#begin()
|
|
||||||
|
|
||||||
Plug 'ThePrimeagen/vim-be-good'
|
|
||||||
Plug 'machakann/vim-highlightedyank'
|
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
Plug 'wellle/targets.vim'
|
|
||||||
Plug 'vim-scripts/loremipsum'
|
|
||||||
|
|
||||||
call plug#end()
|
|
|
@ -1,7 +0,0 @@
|
||||||
super_apply() {
|
|
||||||
xbps-install -y alacritty
|
|
||||||
}
|
|
||||||
|
|
||||||
super_undo() {
|
|
||||||
xbps-remove -y alacritty
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
describe="Setup git"
|
|
||||||
scripts="@distro @self"
|
|
||||||
|
|
||||||
apply() {
|
|
||||||
git config --global user.name Strix
|
|
||||||
git config --global user.email strix@saluco.nl
|
|
||||||
}
|
|
87
dot
87
dot
|
@ -3,7 +3,7 @@
|
||||||
ask=0
|
ask=0
|
||||||
|
|
||||||
is_function() {
|
is_function() {
|
||||||
type "$1" 2>/dev/null | sed "s/$1//" | grep -qwi function
|
type "$1" 2> /dev/null | sed "s/$1//" | grep -qwi function
|
||||||
}
|
}
|
||||||
|
|
||||||
curr_distro() {
|
curr_distro() {
|
||||||
|
@ -19,71 +19,68 @@ include() {
|
||||||
func() {
|
func() {
|
||||||
if is_function $(echo "super_$2"); then
|
if is_function $(echo "super_$2"); then
|
||||||
[ "${DO_SUDO:-yes}" = "yes" ] || return 0
|
[ "${DO_SUDO:-yes}" = "yes" ] || return 0
|
||||||
ecmd=". $1 && super_$2"
|
sudo sh -c ". $1 && super_$2"
|
||||||
[ "$(id -u)" = "0" ] && sh -c "$ecmd" || sudo sh -c "$ecmd"
|
|
||||||
unset ecmd
|
|
||||||
fi
|
fi
|
||||||
is_function $2 && $2
|
is_function $2 && $2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_command() {
|
||||||
|
case $1 in
|
||||||
|
a*)
|
||||||
|
printf "apply"
|
||||||
|
;;
|
||||||
|
u*)
|
||||||
|
printf "undo"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "err: not supported" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# only run this *in crate dir*
|
# only run this *in crate dir*
|
||||||
run_crate() {
|
run_crate() {
|
||||||
enabled=1
|
|
||||||
include ./crate.sh || exit 1
|
include ./crate.sh || exit 1
|
||||||
if [ -n "$describe" ]; then
|
if [ -n "$describe" ]; then
|
||||||
echo "desc($(basename $PWD)): $describe"
|
echo "desc($(basename $PWD)): $describe"
|
||||||
fi
|
fi
|
||||||
if [ $enabled -ne 1 ]; then
|
cmd=$(get_command $1)
|
||||||
return
|
|
||||||
fi
|
|
||||||
cmd=$1
|
|
||||||
scripts=${scripts:-"@self @distro"}
|
scripts=${scripts:-"@self @distro"}
|
||||||
for s in $scripts; do
|
for s in $scripts; do
|
||||||
echo "exec($(basename $PWD)): $s/$cmd"
|
echo "exec($(basename $PWD)): $s/$cmd"
|
||||||
case $s in
|
case $s in
|
||||||
@self)
|
@self)
|
||||||
func ./crate.sh $cmd
|
func ./crate.sh $cmd
|
||||||
;;
|
;;
|
||||||
@distro)
|
@distro)
|
||||||
unset -f super_$cmd
|
unset -f super_$cmd
|
||||||
unset -f $cmd
|
unset -f $cmd
|
||||||
include ./crate.$(curr_distro).sh
|
include ./crate.$(curr_distro).sh
|
||||||
func ./crate.$(curr_distro).sh $cmd
|
func ./crate.$(curr_distro).sh $cmd
|
||||||
unset -f super_$cmd
|
unset -f super_$cmd
|
||||||
unset -f $cmd
|
unset -f $cmd
|
||||||
include ./crate.sh
|
include ./crate.sh
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
sh $s
|
sh $s
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "# details:"
|
if [ $# -eq 2 ]; then
|
||||||
echo "# user: $USER (${UID:-$(id -u)})"
|
[ -d crates/*$1 ] || exit 1
|
||||||
echo "# groups: $(groups)"
|
cd crates/*$1
|
||||||
echo "# distro: $(curr_distro)"
|
run_crate $2
|
||||||
|
cd ../..
|
||||||
cmd=$1
|
|
||||||
if [ -z "$cmd" ]; then
|
|
||||||
echo "usage: $0 <command> [...args]"
|
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
shift
|
[ $# -eq 0 ] && exit 2
|
||||||
|
for crate in $(find ./crates -mindepth 1 -maxdepth 1 -type d | sort); do
|
||||||
|
cd $crate
|
||||||
|
run_crate $1
|
||||||
|
cd ../..
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for c in ${@:-$(ls crates)}; do
|
|
||||||
[ -d crates/*$c ] || exit 1
|
|
||||||
cd crates/*$c
|
|
||||||
case $cmd in
|
|
||||||
a | apply)
|
|
||||||
run_crate apply
|
|
||||||
;;
|
|
||||||
u | undo)
|
|
||||||
run_crate undo
|
|
||||||
;;
|
|
||||||
*) exit 1 ;;
|
|
||||||
esac
|
|
||||||
cd ../..
|
|
||||||
done
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# this script is meant to be ran when .dotfiles is not present.
|
|
||||||
#
|
|
||||||
# example:
|
|
||||||
# curl https://git.saluco.nl/strix/dotfiles/raw/branch/main/remote_script.sh | sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
HOME=${HOME:-/home/${USER:-$(whomai)}}
|
|
||||||
|
|
||||||
[ -d "$HOME/.dotfiles" ] || git clone https://git.saluco.nl/strix/dotfiles $HOME/.dotfiles
|
|
||||||
cd $HOME/.dotfiles
|
|
||||||
./dot a
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Downloading newest package..."
|
|
||||||
curl -Lo /tmp/discord.deb "https://discord.com/api/download?platform=linux&format=deb"
|
|
||||||
cd /tmp
|
|
||||||
echo "Extracting package..."
|
|
||||||
xdeb discord.deb
|
|
||||||
echo "Installing package..."
|
|
||||||
sudo xbps-install -R /tmp/binpkgs discord
|
|
||||||
rm -rf /tmp/binpkgs
|
|
||||||
cd -
|
|
Loading…
Reference in a new issue