new configs
This commit is contained in:
parent
933c5e3dac
commit
bd3c3c16ba
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
source ~/.dotfiles/nfrc.sh
|
source ~/.dotfiles/nfrc.sh
|
||||||
|
|
||||||
action=$(printf "Connect exit node\nDisconnect" | rofi -dmenu -p "Tailscale")
|
cmd="rofi --dmenu -p"
|
||||||
|
|
||||||
|
action=$(printf "Connect exit node\nDisconnect" | $cmd "Tailscale")
|
||||||
|
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
"Connect exit node")
|
"Connect exit node")
|
||||||
echo connecting...
|
echo connecting...
|
||||||
endpoint=$(tailscale status | grep "exit node" | awk '{print $2}' | rofi -dmenu -p "Select exit node")
|
endpoint=$(tailscale status | grep "exit node" | awk '{print $2}' | $cmd "Select exit node")
|
||||||
tailscale set --exit-node="$endpoint"
|
tailscale set --exit-node="$endpoint"
|
||||||
tailscale up
|
tailscale up
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -43,10 +43,15 @@ exec --no-startup-id dex --autostart --environment i3
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||||
|
# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-fancy-rapid 10 10
|
||||||
|
#
|
||||||
|
# cat .config/nitrogen/bg-saved.cfg | rg 'file=(.*)' -or '$1' | xargs i3lock -i
|
||||||
|
# exec --no-startup-id xss-lock --transfer-sleep-lock -- cat ~/.config/nitrogen/bg-saved.cfg | rg 'file=(.*)' -or '$1' | xargs i3lock --nofork -i
|
||||||
|
|
||||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||||
exec --no-startup-id nm-applet
|
exec --no-startup-id nm-applet
|
||||||
|
exec --no-startup-id pasystray
|
||||||
exec --no-startup-id nitrogen --restore
|
exec --no-startup-id nitrogen --restore
|
||||||
exec --no-startup-id picom
|
exec --no-startup-id picom
|
||||||
|
|
||||||
|
@ -172,6 +177,11 @@ bindsym $mod+Shift+r restart
|
||||||
# exit i3 (logs you out of your X session)
|
# exit i3 (logs you out of your X session)
|
||||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
|
# bindsym $mod+Shift+s exec --no-startup-id "slop | xargs -I % shotgun -g % | pst | xclip -selection clipboard -i"
|
||||||
|
bindsym Print exec --no-startup-id "maim | ~/bin/pst | xclip -selection clipboard && notify-send 'Screenshot created' || notify-send 'Screenshoter failed'"
|
||||||
|
bindsym $mod+Shift+s exec --no-startup-id "slop | xargs -I % maim -g % | ~/bin/pst | xclip -selection clipboard && notify-send 'Screenshot created' || notify-send 'Screenshoter failed'"
|
||||||
|
# bindsym Print exec --no-startup-id notify-send eee
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# resize window (you can also use the mouse for that)
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
# These bindings trigger as soon as you enter the resize mode
|
# These bindings trigger as soon as you enter the resize mode
|
||||||
|
|
|
@ -18,9 +18,13 @@ interval=30
|
||||||
command=~/.dotfiles/bin/battery 1
|
command=~/.dotfiles/bin/battery 1
|
||||||
interval=30
|
interval=30
|
||||||
|
|
||||||
|
#[volume]
|
||||||
|
#command=~/.config/i3blocks/volume-pipewire
|
||||||
|
#interval=1
|
||||||
|
|
||||||
[tailscale]
|
[tailscale]
|
||||||
command=~/.config/i3blocks/tscale #echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1')
|
command=~/.config/i3blocks/tscale #echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1')
|
||||||
interval=30
|
interval=5
|
||||||
|
|
||||||
[wthr]
|
[wthr]
|
||||||
color=#c0c0c0
|
color=#c0c0c0
|
||||||
|
|
|
@ -1,10 +1,27 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
exitnode=$(tailscale status --json | jq .ExitNodeStatus)
|
|
||||||
enstatus="enode: off"
|
|
||||||
[ "$exitnode" = "null" ] || enstatus="enode: on"
|
|
||||||
echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1') $enstatus
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1) ~/.dotfiles/bin/rofi-tscale ;;
|
1) ~/.dotfiles/bin/rofi-tscale ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
text=" "
|
||||||
|
|
||||||
|
exitnode=$(tailscale status --json | jq .ExitNodeStatus)
|
||||||
|
enstatus=""
|
||||||
|
tsip=$(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1')
|
||||||
|
[ "$exitnode" = "null" ] && {
|
||||||
|
[ -z "$tsip" ] && {
|
||||||
|
text="$text offline"
|
||||||
|
color='#707070'
|
||||||
|
} || {
|
||||||
|
text="$text $tsip"
|
||||||
|
COLOR='#8080ff'
|
||||||
|
}
|
||||||
|
} || {
|
||||||
|
enstatus=$(echo $exitnode | jq .TailscaleIPs.[0] | sed 's/"//g' | cut -d'/' -f1)
|
||||||
|
text="$text exit: $enstatus"
|
||||||
|
COLOR='#80ff80'
|
||||||
|
}
|
||||||
|
echo $text
|
||||||
|
echo $text
|
||||||
|
echo $COLOR
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# This project is libre, and licenced under the terms of the
|
||||||
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENCE, version 3.1,
|
||||||
|
# as published by dtf on July 2019. See the LICENSE file or
|
||||||
|
# https://ph.dtf.wtf/w/wtfpl/#version-3-1 for more details.
|
||||||
|
|
||||||
|
# Displays the default device, volume, and mute status for i3blocks
|
||||||
|
# Required pkgs (voidlinux) are:
|
||||||
|
# pipewire
|
||||||
|
# pamixer
|
||||||
|
# pulseaudio-utils
|
||||||
|
|
||||||
|
AUDIO_HIGH_SYMBOL=' '
|
||||||
|
|
||||||
|
AUDIO_MED_HIGH_THRESH=70
|
||||||
|
AUDIO_MED_HIGH_SYMBOL=' '
|
||||||
|
|
||||||
|
AUDIO_MED_THRESH=50
|
||||||
|
AUDIO_MED_SYMBOL=' '
|
||||||
|
|
||||||
|
AUDIO_LOW_THRESH=0
|
||||||
|
AUDIO_LOW_SYMBOL=' '
|
||||||
|
|
||||||
|
AUDIO_MUTED_SYMBOL=' '
|
||||||
|
|
||||||
|
AUDIO_INTERVAL=1
|
||||||
|
|
||||||
|
DEFAULT_COLOR="#00FF00"
|
||||||
|
#DEFAULT_COLOR="#FFFFFF"
|
||||||
|
MUTED_COLOR="#FF0000"
|
||||||
|
#MUTED_COLOR="#a0a0a0"
|
||||||
|
|
||||||
|
LONG_FORMAT=3
|
||||||
|
SHORT_FORMAT=0
|
||||||
|
USE_PERCENT=1
|
||||||
|
USE_ALSA_NAME=0
|
||||||
|
USE_DESCRIPTION=1
|
||||||
|
|
||||||
|
while getopts F:f:pdH:M:L:X:T:t:C:c:i:h opt; do
|
||||||
|
case "$opt" in
|
||||||
|
F) LONG_FORMAT="$OPTARG" ;;
|
||||||
|
f) SHORT_FORMAT="$OPTARG" ;;
|
||||||
|
p) USE_PERCENT=0 ;;
|
||||||
|
d) USE_DESCRIPTION=1 ;;
|
||||||
|
H) AUDIO_HIGH_SYMBOL="$OPTARG" ;;
|
||||||
|
M) AUDIO_MED_SYMBOL="$OPTARG" ;;
|
||||||
|
L) AUDIO_LOW_SYMBOL="$OPTARG" ;;
|
||||||
|
X) AUDIO_MUTED_SYMBOL="$OPTARG" ;;
|
||||||
|
T) AUDIO_MED_THRESH="$OPTARG" ;;
|
||||||
|
t) AUDIO_LOW_THRESH="$OPTARG" ;;
|
||||||
|
C) DEFAULT_COLOR="$OPTARG" ;;
|
||||||
|
c) MUTED_COLOR="$OPTARG" ;;
|
||||||
|
i) AUDIO_INTERVAL="$OPTARG" ;;
|
||||||
|
h) printf "help" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
function move_sinks_to_new_default {
|
||||||
|
DEFAULT_SINK=$1
|
||||||
|
pactl info | grep 'Default Sink' | while read SINK; do
|
||||||
|
pactl set-default-sink $SINK
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_format {
|
||||||
|
[[ $USE_PERCENT == 0 ]] && PERCENT=""
|
||||||
|
case "$1" in
|
||||||
|
1) echo "$SYMBOL$VOL$PERCENT [$NAME]" ;;
|
||||||
|
2) echo "$SYMBOL$VOL$PERCENT [$INDEX]";;
|
||||||
|
3) echo "$SYMBOL$VOL$PERCENT" ;;
|
||||||
|
*) echo "$SYMBOL$VOL$PERCENT [$INDEX:$NAME]" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_block {
|
||||||
|
for name in NAME; do
|
||||||
|
read $name
|
||||||
|
done < <(pactl info | grep 'Default Sink:')
|
||||||
|
NAME=$(echo "$NAME" | awk '{print $3}')
|
||||||
|
DESCRIPTION=$(pactl list sinks | grep -B2 -A1 "$NAME$" | grep Description | cut -f2- -d\ )
|
||||||
|
INDEX=$(pactl list sinks | grep -B2 -A1 "$NAME$" | grep Sink | cut -f2 -d\#)
|
||||||
|
|
||||||
|
if [[ $USE_DESCRIPTION == 1 ]]; then
|
||||||
|
NAME="$DESCRIPTION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ $USE_PERCENT == 1 ]] && VOL="$(pamixer --get-volume-human)" || VOL=$(pamixer --get-volume)
|
||||||
|
|
||||||
|
MUTED=$(pamixer --get-mute)
|
||||||
|
|
||||||
|
if [[ $MUTED =~ "false" ]] ; then
|
||||||
|
SYMBOL=$AUDIO_HIGH_SYMBOL
|
||||||
|
[[ ${VOL/\%/} -le $AUDIO_MED_HIGH_THRESH ]] && SYMBOL=$AUDIO_MED_HIGH_SYMBOL
|
||||||
|
[[ ${VOL/\%/} -le $AUDIO_MED_THRESH ]] && SYMBOL=$AUDIO_MED_SYMBOL
|
||||||
|
[[ ${VOL/\%/} -le $AUDIO_LOW_THRESH ]] && SYMBOL=$AUDIO_LOW_SYMBOL
|
||||||
|
COLOR=$DEFAULT_COLOR
|
||||||
|
else
|
||||||
|
SYMBOL=$AUDIO_MUTED_SYMBOL
|
||||||
|
COLOR=$MUTED_COLOR
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $SUBSCRIBE == 1 ]] ; then
|
||||||
|
print_format "$LONG_FORMAT"
|
||||||
|
echo "$COLOR"
|
||||||
|
else
|
||||||
|
print_format "$LONG_FORMAT"
|
||||||
|
print_format "$SHORT_FORMAT"
|
||||||
|
echo "$COLOR"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
print_block
|
|
@ -1,5 +1,15 @@
|
||||||
font_family IosevkaTerm NF
|
# font_family IosevkaTerm NF
|
||||||
font_size 18.0
|
font_size 18.0
|
||||||
|
|
||||||
background_opacity 0.8
|
background_opacity 0.8
|
||||||
background_blur 1
|
background_blur 1
|
||||||
|
|
||||||
|
window_margin_width 10
|
||||||
|
|
||||||
|
|
||||||
|
# BEGIN_KITTY_FONTS
|
||||||
|
font_family family="IosevkaTerm Nerd Font Mono"
|
||||||
|
bold_font auto
|
||||||
|
italic_font auto
|
||||||
|
bold_italic_font auto
|
||||||
|
# END_KITTY_FONTS
|
Loading…
Reference in New Issue