mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 11:47:09 -04:00
Compare commits
6 commits
7ebe7d335c
...
7e15a6f7b1
Author | SHA1 | Date | |
---|---|---|---|
frosty | 7e15a6f7b1 | ||
frosty | 7316c70050 | ||
frosty | 4711ad2416 | ||
frosty | 4a51e02919 | ||
frosty | e8a133f89b | ||
frosty | 62fae924ef |
|
@ -27,6 +27,7 @@ export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
|
|||
|
||||
# Other program settings
|
||||
export XIDLEHOOK_SOCK="$XDG_STATE_HOME/xidlehook.sock"
|
||||
export SVDIR="$XDG_CONFIG_HOME/service"
|
||||
|
||||
# $PATH additions
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
|
|
15
.bashrc
15
.bashrc
|
@ -19,21 +19,23 @@ cd() { builtin cd "$@" && ls; }
|
|||
alias grep='grep --color=auto'
|
||||
alias wget='wget --no-hsts'
|
||||
alias vim='nvim'
|
||||
alias emacs='emacsclient -ca emacs'
|
||||
alias nnn='nnn -C'
|
||||
|
||||
# Utilities
|
||||
alias ipp='curl https://ipinfo.io/ip && echo'
|
||||
ipl() {
|
||||
if address="$(ip route get 1 2>/dev/null)"; then
|
||||
address="${address#* via * dev * src }"
|
||||
address="${address% uid *}"
|
||||
if address=$(ip route get 1 2>/dev/null); then
|
||||
address=${address#* via * dev * src }
|
||||
address=${address% uid *}
|
||||
fi
|
||||
|
||||
if [ -n "$address" ]; then
|
||||
printf '%s' "$address"
|
||||
prefix="$address"
|
||||
else
|
||||
printf 'Offline'
|
||||
prefix="Offline"
|
||||
fi
|
||||
printf '\n'
|
||||
printf '%s\n' "$prefix"
|
||||
}
|
||||
|
||||
# Shorthands
|
||||
|
@ -43,6 +45,7 @@ alias c='cd'
|
|||
alias v='nvim'
|
||||
alias g='git'
|
||||
alias ff='fastfetch'
|
||||
alias em='emacs -nw'
|
||||
|
||||
# Commands or options
|
||||
alias ll='ls -l'
|
||||
|
|
2
.config/service/.gitignore
vendored
2
.config/service/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
*/supervise
|
||||
*/down
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
[ -n "$DISPLAY" ] && exec dunst
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec mpd --no-daemon
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
[ -n "$DISPLAY" ] && exec picom
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec pipewire -c pipewire-pulse.conf
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec pipewire
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
[ -n "$DISPLAY" ] && exec redshift
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec udiskie
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec wireplumber
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
|
||||
exec xidlehook \
|
||||
--not-when-fullscreen \
|
||||
--socket "$XIDLEHOOK_SOCK" \
|
||||
--timer 600 \
|
||||
'i3lock -i "$XDG_CACHE_HOME/lock.png"' \
|
||||
'' \
|
||||
--timer 3600 \
|
||||
'loginctl suspend' \
|
||||
''
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
[ -n "$DISPLAY" ] && exec xscreensaver -nosplash
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
set -eu
|
||||
|
||||
if address="$(ip route get 1 2>/dev/null)"; then
|
||||
address="${address#* via * dev * src }"
|
||||
address="${address% uid *}"
|
||||
if address=$(ip route get 1 2>/dev/null); then
|
||||
address=${address#* via * dev * src }
|
||||
address=${address% uid *}
|
||||
fi
|
||||
|
||||
if [ -n "$address" ]; then
|
||||
|
|
15
.local/bin/sys-brightness
Executable file
15
.local/bin/sys-brightness
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
NOTIFY_ID=9990
|
||||
|
||||
amount=$1
|
||||
device=$2
|
||||
name=$3
|
||||
|
||||
brightness=$(brightnessctl -md "$device" s "$amount")
|
||||
brightness=${brightness#*,*,*,}
|
||||
brightness=${brightness%\%,*}
|
||||
|
||||
notify-send -u low -r "$NOTIFY_ID" -h int:value:"$brightness" "$name Brightness"
|
|
@ -12,7 +12,7 @@ if [ "$action" = "toggle" ]; then
|
|||
wpctl set-mute "$SINK" toggle
|
||||
else
|
||||
wpctl set-mute "$SINK" 0
|
||||
wpctl set-volume "$SINK" "$action"
|
||||
wpctl set-volume "$SINK" -l 1 "$action"
|
||||
fi
|
||||
|
||||
pkill -RTMIN+"$STATUSBAR_SIGNAL" "$STATUSBAR"
|
||||
|
|
16
.xinitrc
16
.xinitrc
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if $(xrandr --listproviders | grep 'NVIDIA'); then
|
||||
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
xrandr --auto
|
||||
xrandr --dpi 96
|
||||
|
@ -9,25 +10,14 @@ xrandr \
|
|||
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __GLX_VENDOR_LIBRARY_NAME="nvidia"
|
||||
fi
|
||||
|
||||
[ -f "$XDG_DATA_HOME/wallpaper" ] && xwallpaper --zoom "$XDG_DATA_HOME/wallpaper" &
|
||||
xrdb -merge "$HOME/.Xresources"
|
||||
|
||||
pipewire &
|
||||
pipewire-pulse &
|
||||
wireplumber &
|
||||
|
||||
dunst &
|
||||
picom &
|
||||
udiskie &
|
||||
mpd --no-daemon &
|
||||
|
||||
runsvdir "$SVDIR" &
|
||||
modbot -x &
|
||||
|
||||
while :; do
|
||||
if command -v dbus-launch >/dev/null; then
|
||||
dbus-launch --sh-syntax --exit-with-session dwm
|
||||
elif command -v dbus-run-session >/dev/null; then
|
||||
dbus-run-session dwm
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue