Compare commits
No commits in common. "5072042a0ffd86db4669f7b8e633f7031bb30b1c" and "ae5df119bf56020d71acd511f78d84ef0060cf9a" have entirely different histories.
5072042a0f
...
ae5df119bf
@ -29,11 +29,9 @@ U+E0B2 \xee\x82\xb2 Leftwards black arrowhead (U+2B82 \xe2\xae\x82 )
|
|||||||
U+E0B3 \xee\x82\xb3 Leftwards arrowhead (U+2B83 \xe2\xae\x83 )\n\
|
U+E0B3 \xee\x82\xb3 Leftwards arrowhead (U+2B83 \xe2\xae\x83 )\n\
|
||||||
"
|
"
|
||||||
|
|
||||||
echo -e "Ligature support:\n\
|
echo -e "Ligatures:\n\
|
||||||
-> -----> ----------> <---------- <----- <-\n\
|
-> -----> => =====>
|
||||||
=> =====> ==========> <========== <===== <=\n\
|
== != <= >=
|
||||||
+++++\n\
|
|
||||||
>= <= !=\n\
|
|
||||||
"
|
"
|
||||||
|
|
||||||
echo -e "Default \e[39mDefault\e[0m"
|
echo -e "Default \e[39mDefault\e[0m"
|
||||||
|
@ -52,11 +52,6 @@ done
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
swaybg --mode fill --image ~/.config/wallpaper.jpg &
|
swaybg --mode fill --image ~/.config/wallpaper.jpg &
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
# Lock when idle
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
swayidle -w timeout 600 swaylock &
|
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Redirect STDIN to STDOUT and pass along to tags script
|
# Redirect STDIN to STDOUT and pass along to tags script
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
|
@ -4,7 +4,6 @@ echo $XDG_RUNTIME_DIR used for Wayland session
|
|||||||
export WLR_LIBINPUT_NO_DEVICES=1
|
export WLR_LIBINPUT_NO_DEVICES=1
|
||||||
# export DWLTAGS_SHOW_MON=1
|
# export DWLTAGS_SHOW_MON=1
|
||||||
export PATH=~/bin:$PATH
|
export PATH=~/bin:$PATH
|
||||||
# export DWL_LOG_VERBOSE=1
|
|
||||||
|
|
||||||
echo "Session: in $XDG_RUNTIME_DIR" >> $DWL_LOG_FILE
|
echo "Session: in $XDG_RUNTIME_DIR" >> $DWL_LOG_FILE
|
||||||
env
|
env
|
||||||
|
44
dwltags.pl
44
dwltags.pl
@ -9,9 +9,6 @@ use Getopt::Long;
|
|||||||
|
|
||||||
my $info = {};
|
my $info = {};
|
||||||
my $tags_file = $ENV{'DWL_TAGS_FILE'};
|
my $tags_file = $ENV{'DWL_TAGS_FILE'};
|
||||||
my $dwl_log_h = FileHandle->new(">> " . $ENV{'DWL_LOG_FILE'});
|
|
||||||
die "Could not open $ENV{'DWL_LOG_FILE'} to append" unless (defined $dwl_log_h);
|
|
||||||
$dwl_log_h->autoflush();
|
|
||||||
|
|
||||||
my @mons = map { /^([\w-]+)/; $1 } grep { /^([\w-]+)/ } `wlr-randr`;
|
my @mons = map { /^([\w-]+)/; $1 } grep { /^([\w-]+)/ } `wlr-randr`;
|
||||||
|
|
||||||
@ -21,22 +18,18 @@ GetOptions("file=s" => \$tags_file)
|
|||||||
# Color scheme is only used in ANSI mode
|
# Color scheme is only used in ANSI mode
|
||||||
# <class>_f/_g: class is used in JSON mode to be used in style.css for styling
|
# <class>_f/_g: class is used in JSON mode to be used in style.css for styling
|
||||||
my $colorscheme = {
|
my $colorscheme = {
|
||||||
'occ_f' => '#ffffff',
|
'norm_f' => '#ffffff',
|
||||||
'occ_b' => '#111111',
|
'norm_b' => '#111111',
|
||||||
'occsel_f' => '#ffffff',
|
'sel_f' => '#ffffff',
|
||||||
'occsel_b' => '#aa4444',
|
'sel_b' => '#aa4444',
|
||||||
'unocc_f' => '#ffffff',
|
|
||||||
'unocc_b' => '#888888',
|
|
||||||
'unoccsel_f' => '#ffffff',
|
|
||||||
'unoccsel_b' => '#aa8888',
|
|
||||||
'mon_f' => '#000000',
|
'mon_f' => '#000000',
|
||||||
'mon_b' => '#777777',
|
'mon_b' => '#777777',
|
||||||
'lay_f' => '#111111',
|
'lay_f' => '#111111',
|
||||||
'lay_b' => '#77aaaa',
|
'lay_b' => '#77aaaa',
|
||||||
'title_f' => '#ffcccc',
|
'title_f' => '#ffcccc',
|
||||||
'title_b' => '#111111'
|
'title_b' => '#111111'
|
||||||
# 'occ_f' => 'white',
|
# 'norm_f' => 'white',
|
||||||
# 'occ_b' => 'black',
|
# 'norm_b' => 'black',
|
||||||
# 'sel_f' => 'black',
|
# 'sel_f' => 'black',
|
||||||
# 'sel_b' => 'red',
|
# 'sel_b' => 'red',
|
||||||
# 'mon_f' => 'black',
|
# 'mon_f' => 'black',
|
||||||
@ -53,7 +46,7 @@ for my $mon (@mons) {
|
|||||||
print_tags({
|
print_tags({
|
||||||
'selmon' => '1',
|
'selmon' => '1',
|
||||||
'mon' => $mon,
|
'mon' => $mon,
|
||||||
'tags' => '0 1',
|
'tags' => '1 1',
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'layout' => '[]='
|
'layout' => '[]='
|
||||||
}, $tags_file . "." . $mon);
|
}, $tags_file . "." . $mon);
|
||||||
@ -63,9 +56,7 @@ while (<>) {
|
|||||||
my $line = $_;
|
my $line = $_;
|
||||||
chomp $line;
|
chomp $line;
|
||||||
|
|
||||||
if (exists $ENV{'DWL_LOG_VERBOSE'}) {
|
# print_log("DWLTAGS [VV] : $line");
|
||||||
print_log("DWLTAGS [VV] : $line");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (my ($mon, $key, $val) = $line =~ /^(\S+)\s+(\S+)\s(.*)$/) {
|
if (my ($mon, $key, $val) = $line =~ /^(\S+)\s+(\S+)\s(.*)$/) {
|
||||||
$info->{$key} = $val;
|
$info->{$key} = $val;
|
||||||
@ -91,15 +82,14 @@ sub print_tags {
|
|||||||
if (my ($tuse, $tsel) = $info->{'tags'} =~ /(\d+)\s+(\d+)/) {
|
if (my ($tuse, $tsel) = $info->{'tags'} =~ /(\d+)\s+(\d+)/) {
|
||||||
my $tags = "";
|
my $tags = "";
|
||||||
|
|
||||||
for (my $i = 0; $i < ($numtags-1); $i++) {
|
for (my $i = 0; $i < $numtags; $i++) {
|
||||||
my $sel = "unocc";
|
my $sel = "norm";
|
||||||
if (($tuse & (1 << $i))) {
|
if (($tuse & (1 << $i))) {
|
||||||
$sel = "occ";
|
if ($tsel & (1 << $i)) {
|
||||||
|
$sel = "sel";
|
||||||
|
}
|
||||||
|
$tags .= getformatted($sel, " ". ($i+1) . " ");
|
||||||
}
|
}
|
||||||
if ($tsel & (1 << $i)) {
|
|
||||||
$sel .= "sel";
|
|
||||||
}
|
|
||||||
$tags .= getformatted($sel, " ". ($i+1) . " ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exists $ENV{'DWLTAGS_SHOW_MON'}) {
|
if (exists $ENV{'DWLTAGS_SHOW_MON'}) {
|
||||||
@ -147,7 +137,9 @@ sub dzen_colored {
|
|||||||
|
|
||||||
sub print_log {
|
sub print_log {
|
||||||
my ($line) = @_;
|
my ($line) = @_;
|
||||||
if (defined $dwl_log_h) {
|
my $fh = FileHandle->new(">> " . $ENV{'DWL_LOG_FILE'});
|
||||||
print $dwl_log_h $line . "\n";
|
if (defined $fh) {
|
||||||
|
print $fh $line . "\n";
|
||||||
|
$fh->close;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user