summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2025-07-07 10:46:28 +0200
committerJoe <rbo@gmx.us>2025-07-07 10:46:28 +0200
commit2a432dacede9080583b4e8a91d3eb736fe636629 (patch)
treee19adda6b360de3a11ac3e43bb4d726a1e491124
parentup (diff)
downloaddotfiles-bsd-2a432dacede9080583b4e8a91d3eb736fe636629.tar.gz
dotfiles-bsd-2a432dacede9080583b4e8a91d3eb736fe636629.tar.bz2
dotfiles-bsd-2a432dacede9080583b4e8a91d3eb736fe636629.tar.xz
dotfiles-bsd-2a432dacede9080583b4e8a91d3eb736fe636629.tar.zst
dotfiles-bsd-2a432dacede9080583b4e8a91d3eb736fe636629.zip
up
-rw-r--r--.config/zsh/alias.zsh2
-rwxr-xr-x.local/bin/dmbookm3
-rwxr-xr-x.local/bin/mixer-set86
3 files changed, 57 insertions, 34 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index 4cd4099..4b01038 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -220,7 +220,7 @@ update() {
yay
;;
po-rbo)
- doas apt update && doas apt dist-upgrade
+ doas apt update; doas apt dist-upgrade
nix-channel --update
nix-env -u
# git -C $HOME/.local/packs/neovim checkout master
diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm
index 22a9e52..dcd0e36 100755
--- a/.local/bin/dmbookm
+++ b/.local/bin/dmbookm
@@ -37,6 +37,9 @@ use constant LIST => {
nua_aether => 'https://aether.int.ysosecure.com/ui',
nua_gaia => 'https://gaia.int.ysosecure.com/',
nua_certsrv => 'https://orca1.int.ysosecure.com/certsrv',
+ nua_sentry => 'https://sentry.nuabee.fr/',
+ nua_leek => 'https://leek.int.ysosecure.com/',
+ nua_otc => 'https://auth.otc.t-systems.com/',
};
sub main
diff --git a/.local/bin/mixer-set b/.local/bin/mixer-set
index c5911bb..9963c91 100755
--- a/.local/bin/mixer-set
+++ b/.local/bin/mixer-set
@@ -4,6 +4,7 @@ use strict;
use warnings;
use Term::ANSIColor;
use Capture::Tiny qw(capture);
+use Sys::Hostname qw(hostname);
sub main {
my $argc = $#ARGV + 1;
@@ -21,23 +22,41 @@ sub main {
print "Too many arguments, only one needed\n";
exit 2;
}
+ my $host = hostname();
my $curr_vol = 0;
my $curr_vol_cmd = "/usr/sbin/mixer vol | /usr/bin/awk -F ':' '{print \$2}'";
+ if ($host eq "po-rbo.ln.ysosecure.com") {
+ $curr_vol_cmd = "/usr/bin/pactl get-sink-volume \@DEFAULT_SINK\@ | /usr/bin/awk '{print \$5}'";
+ }
+ my $ns = '/usr/local/bin/notify-send';
+ if (hostname() eq "po-rbo.ln.ysosecure.com") {
+ $ns = '/usr/bin/notify-send';
+ }
if ($ARGV[0] eq "lower" || $ARGV[0] eq "raise") {
if ($ARGV[0] eq "lower") {
- capture {
- system('/usr/sbin/mixer', 'vol', '-5');
- };
+ if ($host eq "po-rbo.ln.ysosecure.com") {
+ system('/usr/bin/pactl', 'set-sink-volume', '@DEFAULT_SINK@', '-5%');
+ }
+ else {
+ capture {
+ system('/usr/sbin/mixer', 'vol', '-5');
+ };
+ }
}
else {
- capture {
- system('/usr/sbin/mixer', 'vol', '+5');
- };
+ if ($host eq "po-rbo.ln.ysosecure.com") {
+ system('/usr/bin/pactl', 'set-sink-volume', '@DEFAULT_SINK@', '+5%');
+ }
+ else {
+ capture {
+ system('/usr/sbin/mixer', 'vol', '+5');
+ };
+ }
}
$curr_vol = `$curr_vol_cmd`;
chomp $curr_vol;
system(
- '/usr/local/bin/notify-send',
+ $ns,
'-h',
'int:value:' . $curr_vol,
'-u',
@@ -45,7 +64,7 @@ sub main {
'-t',
'1000',
'mixer-set',
- '墳 Volume'
+ ' volume'
);
system('kill -68 $(pidof dwmblocks)');
exit;
@@ -58,21 +77,26 @@ sub main {
open(my $fh, '>:encoding(UTF-8)', $tmp_file);
print $fh $curr_vol;
close($fh);
- capture {
- system(
- '/usr/sbin/mixer',
- 'vol',
- '0'
- );
- };
+ if ($host eq "po-rbo.ln.ysosecure.com") {
+ system('/usr/bin/pactl', 'set-sink-volume', '@DEFAULT_SINK@', '0%');
+ }
+ else {
+ capture {
+ system(
+ '/usr/sbin/mixer',
+ 'vol',
+ '0'
+ );
+ };
+ }
system(
- '/usr/local/bin/notify-send',
+ $ns,
'-u',
'low',
'-t',
'1750',
'mixer-set',
- '婢 Volume muted'
+ ' muted'
);
system('kill -68 $(pidof dwmblocks)');
}
@@ -80,25 +104,21 @@ sub main {
open(my $fh, '<:encoding(UTF-8)', $tmp_file);
$curr_vol = <$fh>;
close($fh);
- capture {
- system(
- '/usr/sbin/mixer',
- 'vol',
- $curr_vol
- );
- };
- my $icon;
- if ($curr_vol <= 33) {
- $icon = '奄 ';
- }
- elsif ($curr_vol <= 66) {
- $icon = '奔 ';
+ if ($host eq "po-rbo.ln.ysosecure.com") {
+ chomp $curr_vol;
+ system('/usr/bin/pactl', 'set-sink-volume', '@DEFAULT_SINK@', $curr_vol);
}
else {
- $icon = '墳 ';
+ capture {
+ system(
+ '/usr/sbin/mixer',
+ 'vol',
+ $curr_vol
+ );
+ };
}
system(
- '/usr/local/bin/notify-send',
+ $ns,
'-h',
'int:value:' . $curr_vol,
'-u',
@@ -106,7 +126,7 @@ sub main {
'-t',
'1750',
'mixer-set',
- $icon . ' Volume restored'
+ ' restored'
);
system('kill -68 $(pidof dwmblocks)');
}