Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2022-11-27 08:08:04 -05:00
parent 7613b2206b
commit 8d6eae277c
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
5 changed files with 39 additions and 19 deletions

17
.bashrc
View File

@ -43,7 +43,7 @@ cpusage() {
}
# Update and upgrade system
update() { $PRIV sh -c "$UPDATE"; }
update() { sh -c "$UPDATE"; }
# Im too lazy to type
copy() {
@ -203,3 +203,18 @@ cnplot() {
cpplot() {
ssh crescent "${1:-/opt/gnuplot/power/gnuplot.sh}; cat /opt/gnuplot/power/${1:-$(date -u -I)}.svg" > ${1:-$(date -u -I)}.svg
}
reconf-sys () {
$PRIV su - -c 'guix pull --branch=master; guix system reconfigure /etc/config.scm'
}
reconf-home () {
guix pull --branch=master
guix home reconfigure ~/.config/guix/home.scm
}
PATH="/home/cobra/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/cobra/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/cobra/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/cobra/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/cobra/perl5"; export PERL_MM_OPT;

View File

@ -22,7 +22,6 @@
"supertuxkart"
"minetest"
"xonotic"
"the-butterfly-effect"
"mpv"
"imagemagick"
"rsync"
@ -41,7 +40,7 @@
"gcc-toolchain"
"icedove"
"irssi"
; "monero-gui"
"monero-gui"
"pamixer"
"slurp"
"grim"
@ -66,5 +65,16 @@
"mpv-mpris"
"playerctl"
"vlc"
"reptyr"
"unzip"
"ffmpeg"
"handbrake"
"kicad"
"ripit"
"perl"
"bind:utils"
"netcat"
"tmate"
"torsocks"
))
)))

View File

@ -175,7 +175,7 @@ for_window [app_id="float"] floating enable;
exec autotiling
exec swayidle -w timeout 240 '~/.local/bin/lock' before-sleep '~/.local/bin/lock'
bindswitch --reload --locked lid:on exec ~/.local/bin/lock
bindswitch --reload --locked lid:on exec sudo ~/.local/bin/__suspend
bar {
swaybar_command waybar

View File

@ -1,21 +1,21 @@
#!/usr/bin/env bash
if [[ "$SXMO_WM" ]]; then
UPDATE="apk update && apk upgrade -aiv && apk fix"
PRIV=doas
UPDATE="$PRIV sh -c 'apk update && apk upgrade -aiv && apk fix'"
COPY_COMMAND="wl-copy"
PASTE_COMMAND="wl-paste"
WIFI=wlan0
PRIV=doas
elif [[ -d /gnu ]]; then
UPDATE="su - -c 'guix pull --branch=master && guix system reconfigure /etc/config.scm && guix package -u'"
PRIV=sudo
UPDATE="$PRIV su - -c 'guix pull --branch=master && guix system reconfigure /etc/config.scm && guix package -u'; guix pull --branch=master && guix home reconfigure ~/.config/guix/home.scm && guix package -u"
COPY_COMMAND="wl-copy"
PASTE_COMMAND="wl-paste"
WIFI=wlp2s0
PRIV=sudo
else
UPDATE="apt update && apt upgrade && apt autoremove"
PRIV=sudo
UPDATE="$PRIV sh -c 'apt update && apt upgrade && apt autoremove'"
COPY_COMMAND="xclip -i -selection clipboard"
PASTE_COMMAND="xclip -o -selection clipboard"
WIFI=wlp2s0
PRIV=sudo
fi

View File

@ -1,14 +1,9 @@
#!/usr/bin/env bash
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
if [[ $(playerctl status) != "Playing" ]]; then
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
fi
swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
SCREENOFF=$!
if [[ $(playerctl status) == "Playing" ]]; then
PLAYER=play
else
PLAYER=pause
fi
playerctl pause
swaylock -eFkl -i ~/.config/sway/background.png --font "Fira Code"
playerctl $PLAYER
kill $SUSPEND $SCREENOFF