summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/dmapps7
-rwxr-xr-x.local/bin/dmbookm7
-rwxr-xr-x.local/bin/dmkill17
-rwxr-xr-x.local/bin/dmpass4
4 files changed, 27 insertions, 8 deletions
diff --git a/.local/bin/dmapps b/.local/bin/dmapps
index 881be19..ec7a11a 100755
--- a/.local/bin/dmapps
+++ b/.local/bin/dmapps
@@ -239,12 +239,17 @@ sub main
{
my $action;
my $prompt;
+ my $color;
+ $color = '#cc241d';
+ if (@ARGV == 1) {
+ $color = $ARGV[0];
+ }
$prompt = PROG_LIST;
if (hostname() eq "po-rbo.ln.ysosecure.com") {
$prompt .= WORK_LIST;
}
- $action = `dmenu -i -l 100 <<LIST
+ $action = `dmenu -i -l 100 -sb '$color' -shb '$color' <<LIST
$prompt
LIST`;
if (not $action) {
diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm
index e43d565..2bfeb21 100755
--- a/.local/bin/dmbookm
+++ b/.local/bin/dmbookm
@@ -40,7 +40,12 @@ sub main
my $pid;
my $prefix;
my $list;
+ my $color;
+ $color = '#cc241d';
+ if (@ARGV == 1) {
+ $color = $ARGV[0];
+ }
$prefix = '/usr';
if (HOSTNAME eq "mars") {
$prefix += '/local';
@@ -48,7 +53,7 @@ sub main
for (keys %{LIST()}) {
$list .= $_ . "\n";
}
- $choice = `printf "$list" | dmenu -i -l 100`;
+ $choice = `printf "$list" | dmenu -i -l 100 -sb '$color' -shb '$color'`;
if (not $choice) {
return;
}
diff --git a/.local/bin/dmkill b/.local/bin/dmkill
index 0ff1257..a156af8 100755
--- a/.local/bin/dmkill
+++ b/.local/bin/dmkill
@@ -11,14 +11,14 @@ use constant CONFIRM => [
sub confirm
{
- my ($pid, $proc) = @_;
+ my ($pid, $proc, $color) = @_;
my $list;
my $choice;
for (@{+CONFIRM}) {
$list .= $_ . "\n";
}
- $choice = `printf "%s" "$list" | dmenu -i -p "kill $proc ($pid)?"`;
+ $choice = `printf "%s" "$list" | dmenu -i -p "kill $proc ($pid)?" -sb '$color' -shb '$color'`;
chomp $choice;
if ($choice eq ${+CONFIRM}[1]) {
return (1);
@@ -28,7 +28,7 @@ sub confirm
sub action
{
- my ($var, $user) = @_;
+ my ($var, $user, $color) = @_;
my $pid;
my $proc;
@@ -42,7 +42,7 @@ sub action
if ($var =~ /^\s*\S+\s+\S+\s+(\S+)/) {
$proc = $1;
}
- if (confirm($pid, $proc) == 1) {
+ if (confirm($pid, $proc, $color) == 1) {
exec(KILL_PATH, '-9', $pid);
}
return;
@@ -53,10 +53,15 @@ sub main
my $choice;
my $ps;
my $user;
+ my $color;
+ $color = '#cc241d';
+ if (@ARGV == 1) {
+ $color = $ARGV[0];
+ }
$user = getpwuid($<);
- $choice = `ps -U "$user" -o pid,user,comm,time,%cpu,%mem | dmenu -i -l 100`;
- action($choice, $user);
+ $choice = `ps -U "$user" -o pid,user,comm,time,%cpu,%mem | dmenu -i -l 100 -sb '$color' -shb '$color'`;
+ action($choice, $user, $color);
return (0);
}
diff --git a/.local/bin/dmpass b/.local/bin/dmpass
index 060cf08..c0a10ba 100755
--- a/.local/bin/dmpass
+++ b/.local/bin/dmpass
@@ -3,8 +3,12 @@
full=0
if [ "$1" = "--full" ]; then
full=1
+ if [ "$2" ]; then
+ fi
+elif [ "$1"]; then
fi
+
if [ -n "$WAYLAND_DISPLAY" ]; then
dmenu=dmenu-wl
xdotool="ydotool type --file -"