more stuff
parent
4fc466d13b
commit
6299a52566
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
export BORG_REPO="frumar.local:/data/yorick/backup"
|
||||||
|
export BORG_PASSCOMMAND="pass sysadmin/jarvis-borg"
|
||||||
|
borg create "::home-{hostname}-{user}-{now}" $HOME --exclude-from ~/dotfiles/misc/.borgignore -x --compression=zstd -v
|
||||||
|
~/dotfiles/bin/borgbackup.sh prune --prefix "home-{hostname}-{user}" --keep-daily=4 --keep-weekly=4 --keep-monthly=6 --keep-yearly=2 --list --stats
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
echo "undocking..." | systemd-cat -t dotfiles -p info
|
||||||
|
# if [ -e /sys/bus/pci/devices/0000\:04\:00.0/remove ]; then
|
||||||
|
# echo 1 | sudo tee /sys/bus/pci/devices/0000\:04\:00.0/remove
|
||||||
|
# echo "removed pci bridge"
|
||||||
|
# sleep 2s
|
||||||
|
# else
|
||||||
|
# echo "No pci device found, ignoring"
|
||||||
|
# fi
|
||||||
|
systemd-inhibit --what=handle-lid-switch sleep 45s & disown
|
||||||
|
swaymsg output '*' disable
|
||||||
|
swaymsg output eDP-1 enable
|
||||||
|
exit 0
|
|
@ -0,0 +1 @@
|
||||||
|
light
|
|
@ -0,0 +1,86 @@
|
||||||
|
{
|
||||||
|
"layer": "top", // Waybar at top layer
|
||||||
|
// "position": "bottom", // Waybar at the bottom of your screen
|
||||||
|
"height": 26, // Waybar height
|
||||||
|
// "width": 1280, // Waybar width
|
||||||
|
// Choose the order of the modules
|
||||||
|
"modules-left": ["sway/workspaces", "sway/mode", "custom/spotify"],
|
||||||
|
"modules-center": ["sway/window"],
|
||||||
|
"modules-right": ["pulseaudio", "network", "disk", "battery", "clock", "tray"],
|
||||||
|
// Modules configuration
|
||||||
|
"sway/workspaces": {
|
||||||
|
"all-outputs": false,
|
||||||
|
"format": "{icon} {name}",
|
||||||
|
"format-icons": {
|
||||||
|
"1": "",
|
||||||
|
"2": "#",
|
||||||
|
"3": "",
|
||||||
|
"4": "",
|
||||||
|
"5": "",
|
||||||
|
"6": "",
|
||||||
|
"7": "",
|
||||||
|
"urgent": "",
|
||||||
|
"focused": "",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sway/mode": {
|
||||||
|
"format": "<span style=\"italic\">{}</span>"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
// "icon-size": 21,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "{load}% "
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "{}% "
|
||||||
|
},
|
||||||
|
"disk": {
|
||||||
|
"format": "{free} "
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
// "format-good": "", // An empty format will hide the module
|
||||||
|
// "format-full": "",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
//"interface": "wlp58s0", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "{essid} ",
|
||||||
|
"format-ethernet": "{ifname} ",
|
||||||
|
"format-disconnected": "Disconnected ⚠"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"scroll-step": 5,
|
||||||
|
"format": "{volume}% {icon}",
|
||||||
|
"format-bluetooth": "{volume}% {icon}",
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphones": "",
|
||||||
|
"handsfree": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/spotify": {
|
||||||
|
"format": " {}",
|
||||||
|
"escape": true,
|
||||||
|
"max-length": 40,
|
||||||
|
"on-click": "playerctl play-pause",
|
||||||
|
"exec": "$HOME/dotfiles/bin/spotify_meta.sh 2> /dev/null" // Script in resources folder
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: rgba(43, 48, 59, 0.5);
|
||||||
|
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background: transparent;
|
||||||
|
color: white;
|
||||||
|
border-bottom: 3px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background: #64727D;
|
||||||
|
border-bottom: 3px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background: #64727D;
|
||||||
|
border-bottom: 3px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #disk, #pulseaudio, #custom-spotify, #tray, #mode {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #64727D;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging {
|
||||||
|
color: white;
|
||||||
|
background-color: #26A65B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning:not(.charging) {
|
||||||
|
background: #f53c3c;
|
||||||
|
color: white;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu, #disk {
|
||||||
|
background: #2ecc71;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background: #9b59b6;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
background: #f53c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background: #f1c40f;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background: #90b1b1;
|
||||||
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify {
|
||||||
|
background: #66cc99;
|
||||||
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
function __nr_apply
|
||||||
|
set -l out $argv[1]
|
||||||
|
set -l man (nix-store -q -b man $out 2>&1)
|
||||||
|
echo "Adding $out ..."
|
||||||
|
|
||||||
|
if [ -d "$man/share/man" ]
|
||||||
|
set -a MANPATH "$man/share/man"
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ -d "$out/share/man" ]
|
||||||
|
set -a MANPATH "$out/share/man"
|
||||||
|
end
|
||||||
|
|
||||||
|
set -a PATH "$out/bin"
|
||||||
|
|
||||||
|
if [ -f "$out/nix-support/propagated-user-env-packages" ]
|
||||||
|
for f in (cat "$out/nix-support/propagated-user-env-packages")
|
||||||
|
__nr_apply $f
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Defined in /tmp/fish.OJ1yiT/nr.fish @ line 2
|
||||||
|
function :u
|
||||||
|
if ! set -q __NR_OLD_PATH
|
||||||
|
set -g __NR_OLD_PATH $PATH
|
||||||
|
set -g __NR_OLD_MANPATH $MANPATH
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ (count $argv) -eq 0 ]
|
||||||
|
set -xg PATH $__NR_OLD_PATH
|
||||||
|
set -xg MANPATH $__NR_OLD_MANPATH
|
||||||
|
end
|
||||||
|
|
||||||
|
for arg in $argv
|
||||||
|
set -l out (nix-instantiate --eval --json --expr '
|
||||||
|
let
|
||||||
|
tryImport = f: with builtins; let v = import f; in if isFunction v && (any (a: a) (attrValues (functionArgs v))) then v {} else v;
|
||||||
|
isImportable = path: with builtins; if pathExists "${path}/" then pathExists "${path}/default.nix" else pathExists "${path}";
|
||||||
|
|
||||||
|
pathBits = with builtins; map ({ prefix, path }:
|
||||||
|
if prefix == "" then
|
||||||
|
let
|
||||||
|
contents = readDir path;
|
||||||
|
names = builtins.filter (a: contents.${a} == "directory" && isImportable "${path}/${a}") (attrNames contents);
|
||||||
|
in
|
||||||
|
foldl\' (prev: val: prev // { ${val} = tryImport "${path}/${val}"; }) {} names
|
||||||
|
else
|
||||||
|
if isImportable path then
|
||||||
|
{ ${prefix} = tryImport path; }
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
) nixPath;
|
||||||
|
|
||||||
|
out = builtins.foldl\' (old: new: old // new) {} pathBits;
|
||||||
|
in with out; builtins.toPath ('"$arg"').outPath' | jq -r .)
|
||||||
|
[ -e $out ] || nix-store -r $out > /dev/null
|
||||||
|
__nr_apply $out
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue