Fix merge conflicts
This commit is contained in:
parent
823fa0e360
commit
00eef39441
|
@ -53,10 +53,7 @@ elif [ $1 == "fade" ]; then
|
||||||
elif [ $1 == "unfade" ]; then
|
elif [ $1 == "unfade" ]; then
|
||||||
if [ -e $HOME/.spool/sway-hidden ]; then
|
if [ -e $HOME/.spool/sway-hidden ]; then
|
||||||
kill -USR2 `cat $HOME/.spool/sway-transparency`
|
kill -USR2 `cat $HOME/.spool/sway-transparency`
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
/home/jpm/scripts/sway/displays.pl -w
|
/home/jpm/scripts/sway/displays.pl -w
|
||||||
>>>>>>> Stashed changes
|
|
||||||
fi
|
fi
|
||||||
elif [ $1 == "dim" ]; then
|
elif [ $1 == "dim" ]; then
|
||||||
echo $($HOME/scripts/thinkpad/blc.pl %) > $BLFILE
|
echo $($HOME/scripts/thinkpad/blc.pl %) > $BLFILE
|
||||||
|
|
|
@ -32,17 +32,10 @@ elif [ "$res" == "↹ Restart i3" ]; then
|
||||||
i3 restart
|
i3 restart
|
||||||
elif [ "$res" == "↻ Reload Sway" ]; then
|
elif [ "$res" == "↻ Reload Sway" ]; then
|
||||||
sway reload
|
sway reload
|
||||||
<<<<<<< Updated upstream
|
|
||||||
/home/jpm/scripts/sway/displays.pl
|
|
||||||
elif [ "$res" == "↻ Reload Waybar" ]; then
|
|
||||||
# Need to integrate with sway/displays.pl for alternative outputs
|
|
||||||
/home/jpm/scripts/sway/displays.pl -w
|
|
||||||
=======
|
|
||||||
/home/jpm/scripts/distrobox/debian12/displays.sh
|
/home/jpm/scripts/distrobox/debian12/displays.sh
|
||||||
elif [ "$res" == "↻ Reload Waybar" ]; then
|
elif [ "$res" == "↻ Reload Waybar" ]; then
|
||||||
# Need to integrate with sway/displays.pl for alternative outputs
|
# Need to integrate with sway/displays.pl for alternative outputs
|
||||||
/home/jpm/scripts/distrobox/debian12/displays.sh -w
|
/home/jpm/scripts/distrobox/debian12/displays.sh -w
|
||||||
>>>>>>> Stashed changes
|
|
||||||
elif [ "$res" == "🡙 Reboot" ]; then
|
elif [ "$res" == "🡙 Reboot" ]; then
|
||||||
rm $SSH_AUTH_SOCK
|
rm $SSH_AUTH_SOCK
|
||||||
sudo systemctl reboot -i
|
sudo systemctl reboot -i
|
||||||
|
|
|
@ -32,7 +32,6 @@ Sets a wallpaper by cropping an appropriate sized section of a larger image.\n
|
||||||
All arguments other than the below are assumed to be output names, as defined
|
All arguments other than the below are assumed to be output names, as defined
|
||||||
in my sway/displays.pl script. If no outputs are provided, all available that
|
in my sway/displays.pl script. If no outputs are provided, all available that
|
||||||
are currently enabled will be set.\n
|
are currently enabled will be set.\n
|
||||||
<<<<<<< Updated upstream
|
|
||||||
--path=<path> Path to wallpaper directory.
|
--path=<path> Path to wallpaper directory.
|
||||||
-p <path> Default: $ENV{HOME}/wallpapers\n
|
-p <path> Default: $ENV{HOME}/wallpapers\n
|
||||||
--daemon=N Configures the wallpaper to be periodically rotated for all
|
--daemon=N Configures the wallpaper to be periodically rotated for all
|
||||||
|
@ -40,26 +39,12 @@ are currently enabled will be set.\n
|
||||||
each rotation, if provided (default: 300).\n
|
each rotation, if provided (default: 300).\n
|
||||||
--nocrop Don't crop a selection from the image. Instead, pass the whole
|
--nocrop Don't crop a selection from the image. Instead, pass the whole
|
||||||
-n image to swaybg and let it handle the scaling\n
|
-n image to swaybg and let it handle the scaling\n
|
||||||
=======
|
|
||||||
--path=<path> Path to wallpaper directory.
|
|
||||||
-p <path> Default: $ENV{HOME}/wallpapers\n
|
|
||||||
--daemon=N Configures the wallpaper to be periodically rotated for all
|
|
||||||
-d N of the given outputs. N indicates the number of seconds between
|
|
||||||
each rotation, if provided (default: 300).\n
|
|
||||||
--nocrop Don't crop a selection from the image. Instead, pass the whole
|
|
||||||
-n image to swaybg and let it handle the scaling\n
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
--verbose=N Define minimum log level. Counting from 1: LOG_DEBUG, LOG_INFO,
|
--verbose=N Define minimum log level. Counting from 1: LOG_DEBUG, LOG_INFO,
|
||||||
-v N LOG_NOTICE, LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_ALERT, LOG_EMERG
|
-v N LOG_NOTICE, LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_ALERT, LOG_EMERG
|
||||||
Default: 5; If provided without a value for N then all (1).
|
Default: 5; If provided without a value for N then all (1).
|
||||||
--recursive=N Enumerate images recursively through directories in the path.
|
--recursive=N Enumerate images recursively through directories in the path.
|
||||||
<<<<<<< Updated upstream
|
|
||||||
-r N N indicates the directory depth, unlimited if no N is provided.
|
-r N N indicates the directory depth, unlimited if no N is provided.
|
||||||
--help This menu
|
--help This menu
|
||||||
=======
|
|
||||||
-r N N indicates the directory depth, unlimited if no N is provided.
|
|
||||||
--help This menu
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
-h\n
|
-h\n
|
||||||
You can send SIGUSR1 to force the daemon to reload immediately. Rotation timer
|
You can send SIGUSR1 to force the daemon to reload immediately. Rotation timer
|
||||||
will be reset.\n");
|
will be reset.\n");
|
||||||
|
@ -69,14 +54,6 @@ will be reset.\n");
|
||||||
sub new
|
sub new
|
||||||
{
|
{
|
||||||
my ($class, %args) = @_;
|
my ($class, %args) = @_;
|
||||||
<<<<<<< Updated upstream
|
|
||||||
|
|
||||||
use AnyEvent::Sway;
|
|
||||||
$args{ipc} = AnyEvent::Sway->new();
|
|
||||||
use Image::Magick;
|
|
||||||
$args{im} = Image::Magick->new();
|
|
||||||
$args{error} = ();
|
|
||||||
=======
|
|
||||||
|
|
||||||
use AnyEvent::Sway;
|
use AnyEvent::Sway;
|
||||||
$args{ipc} = AnyEvent::Sway->new();
|
$args{ipc} = AnyEvent::Sway->new();
|
||||||
|
@ -88,15 +65,9 @@ sub new
|
||||||
|
|
||||||
return bless { %args };
|
return bless { %args };
|
||||||
}
|
}
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
$args{pidfile} = "/tmp/$ENV{USER}-wallpaper.pid";
|
$args{pidfile} = "/tmp/$ENV{USER}-wallpaper.pid";
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
return bless { %args };
|
|
||||||
}
|
|
||||||
|
|
||||||
=======
|
|
||||||
if (-e $wp->{pidfile}) {
|
if (-e $wp->{pidfile}) {
|
||||||
if (-r $wp->{pidfile}) {
|
if (-r $wp->{pidfile}) {
|
||||||
if (open(my $fh, '<', $wp->{pidfile})) {
|
if (open(my $fh, '<', $wp->{pidfile})) {
|
||||||
|
@ -153,7 +124,6 @@ $SIG{KILL} = sub {
|
||||||
exit(0);
|
exit(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
# simply returns the array of hashes provided by swaymsg
|
# simply returns the array of hashes provided by swaymsg
|
||||||
sub get_outputs
|
sub get_outputs
|
||||||
{
|
{
|
||||||
|
@ -239,17 +209,10 @@ sub choose_image
|
||||||
if (-d $_) {
|
if (-d $_) {
|
||||||
$self->do_log("LOG_DEBUG", "Ignoring sub-directory $_");
|
$self->do_log("LOG_DEBUG", "Ignoring sub-directory $_");
|
||||||
next;
|
next;
|
||||||
<<<<<<< Updated upstream
|
|
||||||
}
|
}
|
||||||
if ($_ =~ m/\.(png|jpg)$/) {
|
if ($_ =~ m/\.(png|jpg)$/) {
|
||||||
push(@i,$_);
|
push(@i,$_);
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
}
|
|
||||||
if ($_ =~ m/\.(png|jpg)$/) {
|
|
||||||
push(@i,$_);
|
|
||||||
}
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $i[rand(scalar(@i))] || return undef;
|
return $i[rand(scalar(@i))] || return undef;
|
||||||
|
@ -318,21 +281,12 @@ sub do_log
|
||||||
# Journald is borked. Just don't bother logging
|
# Journald is borked. Just don't bother logging
|
||||||
return 0;
|
return 0;
|
||||||
if ($self->{daemon}) {
|
if ($self->{daemon}) {
|
||||||
<<<<<<< Updated upstream
|
|
||||||
#use Log::Journald qw(send);
|
|
||||||
#send(
|
|
||||||
#PRIORITY => ERROR->{$level},
|
|
||||||
#MESSAGE => $msg,
|
|
||||||
#PERL_PACKAGE => 'Sway Wallpapers'
|
|
||||||
#) || warn "Could not send log ($level $msg): $!";
|
|
||||||
=======
|
|
||||||
use Log::Journald qw(send);
|
use Log::Journald qw(send);
|
||||||
send(
|
send(
|
||||||
PRIORITY => ERROR->{$level},
|
PRIORITY => ERROR->{$level},
|
||||||
MESSAGE => $msg,
|
MESSAGE => $msg,
|
||||||
PERL_PACKAGE => 'Sway Wallpapers'
|
PERL_PACKAGE => 'Sway Wallpapers'
|
||||||
) || warn "Could not send log ($level $msg): $!";
|
) || warn "Could not send log ($level $msg): $!";
|
||||||
>>>>>>> Stashed changes
|
|
||||||
if ($die) {
|
if ($die) {
|
||||||
$msg = '(FATAL) ' . $msg;
|
$msg = '(FATAL) ' . $msg;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -354,10 +308,6 @@ sub run
|
||||||
$self->do_log("LOG_DEBUG", "Fetching outputs from IPC");
|
$self->do_log("LOG_DEBUG", "Fetching outputs from IPC");
|
||||||
$self->{outputs} = $self->get_outputs();
|
$self->{outputs} = $self->get_outputs();
|
||||||
# Local copy of targets so that it will re-check active every time
|
# Local copy of targets so that it will re-check active every time
|
||||||
<<<<<<< Updated upstream
|
|
||||||
print "Changing $_\n" foreach(@{$self->{targets}});
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
my @t = @{$self->{targets}} if (scalar(@{$self->{targets}}));
|
my @t = @{$self->{targets}} if (scalar(@{$self->{targets}}));
|
||||||
$self->do_log("LOG_DEBUG", "Removing inactive ouputs");
|
$self->do_log("LOG_DEBUG", "Removing inactive ouputs");
|
||||||
my $active = $self->get_active();
|
my $active = $self->get_active();
|
||||||
|
@ -368,10 +318,6 @@ sub run
|
||||||
}
|
}
|
||||||
$self->do_log("LOG_DEBUG", "Looping desired ouputs");
|
$self->do_log("LOG_DEBUG", "Looping desired ouputs");
|
||||||
foreach my $target (@t) {
|
foreach my $target (@t) {
|
||||||
<<<<<<< Updated upstream
|
|
||||||
print $target."\n";
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
$self->do_log("LOG_DEBUG", "Ensuring that desired output is active");
|
$self->do_log("LOG_DEBUG", "Ensuring that desired output is active");
|
||||||
unless (defined($active->{$target})) {
|
unless (defined($active->{$target})) {
|
||||||
$self->do_log('LOG_DEBUG', "Target $target is not an active output");
|
$self->do_log('LOG_DEBUG', "Target $target is not an active output");
|
||||||
|
@ -475,55 +421,6 @@ while (my $arg = shift(@ARGV)) {
|
||||||
die "Redundant argument '$arg'. Recursive search already set.\n" unless ($recursive == 0);
|
die "Redundant argument '$arg'. Recursive search already set.\n" unless ($recursive == 0);
|
||||||
if (scalar(@ARGV) && $ARGV[0] =~ m/^\d+$/) {
|
if (scalar(@ARGV) && $ARGV[0] =~ m/^\d+$/) {
|
||||||
$recursive = shift(@ARGV);
|
$recursive = shift(@ARGV);
|
||||||
<<<<<<< Updated upstream
|
|
||||||
} else {
|
|
||||||
$recursive = -1;
|
|
||||||
}
|
|
||||||
} elsif ($arg =~ m/^-/) {
|
|
||||||
die "Unrecognized argument: $arg\n";
|
|
||||||
} else {
|
|
||||||
print "Adding $arg to targets\n";
|
|
||||||
push(@targets,$arg);
|
|
||||||
print "Setting $_\n" foreach(@targets);
|
|
||||||
$wp->{targets} = \@targets || undef;
|
|
||||||
print "Set $_\n" foreach(@{$wp->{targets}});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-e $wp->{pidfile}) {
|
|
||||||
if (-r $wp->{pidfile}) {
|
|
||||||
if (open(my $fh, '<', $wp->{pidfile})) {
|
|
||||||
my $pid = <$fh>;
|
|
||||||
chomp($pid);
|
|
||||||
use Proc::ProcessTable;
|
|
||||||
my $pt = Proc::ProcessTable->new();
|
|
||||||
foreach my $p ( @{ $pt->table() } ) {
|
|
||||||
if ($p->{pid} eq $pid) {
|
|
||||||
my $name = $0;
|
|
||||||
$name =~ s/$ENV{PWD}//;
|
|
||||||
if ($p->{'cmndline'} =~ m#$name#) {
|
|
||||||
$wp->do_log("LOG_CRIT", "Another process is already running with PID: $pid (running and listed in $wp->{pidfile})");
|
|
||||||
# Die locally because do_log will remove pidfile that this iteration does not belong to
|
|
||||||
exit(1);
|
|
||||||
} else {
|
|
||||||
$wp->do_log("LOG_CRIT", "Found matching $pid with different cmdline: $p->{cmndline} (not $0)",1);
|
|
||||||
# PID in pidfile doesn't look like it is another wallpaper
|
|
||||||
unlink($wp->{pidfile});
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
return $p->{'pid'};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$wp->do_log("LOG_CRIT", "Pidfile $wp->{pidfile} exists, but cannot be opened. Assuming it is running already.");
|
|
||||||
# Die locally because do_log will remove pidfile that this iteration does not belong to
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$wp->do_log("LOG_CRIT", "Pidfile $wp->{pidfile} exists, but is not readable. Assuming it is running already.");
|
|
||||||
# Die locally because do_log will remove pidfile that this iteration does not belong to
|
|
||||||
exit(1);
|
|
||||||
=======
|
|
||||||
} else {
|
} else {
|
||||||
$recursive = -1;
|
$recursive = -1;
|
||||||
}
|
}
|
||||||
|
@ -531,7 +428,6 @@ if (-e $wp->{pidfile}) {
|
||||||
die "Unrecognized argument: $arg\n";
|
die "Unrecognized argument: $arg\n";
|
||||||
} else {
|
} else {
|
||||||
push(@targets,$arg);
|
push(@targets,$arg);
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ sub usage()
|
||||||
{
|
{
|
||||||
print("$0 [value] [-p|--plus] [-m|--minus] [-a x|--attribute=x] [-d N|--delay=N]
|
print("$0 [value] [-p|--plus] [-m|--minus] [-a x|--attribute=x] [-d N|--delay=N]
|
||||||
Fade the opacity of one or more windows via the Sway IPC interface.\n
|
Fade the opacity of one or more windows via the Sway IPC interface.\n
|
||||||
<<<<<<< Updated upstream
|
|
||||||
value The target opacity or offset between 0 (full transparency) and 1
|
value The target opacity or offset between 0 (full transparency) and 1
|
||||||
(fully opaque). Change will be made in increments of 0.01 with a
|
(fully opaque). Change will be made in increments of 0.01 with a
|
||||||
delay between each.\n
|
delay between each.\n
|
||||||
|
@ -28,20 +27,6 @@ value The target opacity or offset between 0 (full transparency) and 1
|
||||||
--delay=N Change the delay in ms between each percentage point change in
|
--delay=N Change the delay in ms between each percentage point change in
|
||||||
-d N opacity. Default: 20\n
|
-d N opacity. Default: 20\n
|
||||||
--help This menu
|
--help This menu
|
||||||
=======
|
|
||||||
value The target opacity or offset between 0 (full transparency) and 1
|
|
||||||
(fully opaque). Change will be made in increments of 0.01 with a
|
|
||||||
delay between each.\n
|
|
||||||
--attribute=x Attribute of window(s) to fade.
|
|
||||||
-a x Default: [title="*"]\n
|
|
||||||
--plus Increases opacity by increment instead of setting it directly
|
|
||||||
-p to that increment.\n
|
|
||||||
--minus Decreases opacity by increment instead of setting it directly
|
|
||||||
-m to that increment.\n
|
|
||||||
--delay=N Change the delay in ms between each percentage point change in
|
|
||||||
-d N opacity. Default: 20\n
|
|
||||||
--help This menu
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
-h\n");
|
-h\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,15 +23,9 @@ elif [ "$1" == 'upgrade' ]; then
|
||||||
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
||||||
let COUNT--
|
let COUNT--
|
||||||
echo $COUNT > /home/jpm/.spool/apt-upgradeable
|
echo $COUNT > /home/jpm/.spool/apt-upgradeable
|
||||||
<<<<<<< Updated upstream
|
|
||||||
if [ -e /var/run/reboot-required ]; then
|
if [ -e /var/run/reboot-required ]; then
|
||||||
grep -B1 -A4 upgrade /var/log/apt/history.log | tail -n 6 | swaynag --config=${HOME}/.dotfiles/sway/swaynag --edge=bottom --message="New packages require restart" --button="Restart Now" "sudo systemctl reboot" --dismiss-button="Later" --detailed-message --detailed-button "Show/Hide Upgrade Details"
|
grep -B1 -A4 upgrade /var/log/apt/history.log | tail -n 6 | swaynag --config=${HOME}/.dotfiles/sway/swaynag --edge=bottom --message="New packages require restart" --button="Restart Now" "sudo systemctl reboot" --dismiss-button="Later" --detailed-message --detailed-button "Show/Hide Upgrade Details"
|
||||||
fi
|
fi
|
||||||
=======
|
|
||||||
if [ -e /var/run/reboot-required ]; then
|
|
||||||
grep -B1 -A4 upgrade /var/log/apt/history.log | tail -n 6 | swaynag --config=${HOME}/.dotfiles/sway/swaynag --edge=bottom --message="New packages require restart" --button="Restart Now" "sudo systemctl reboot" --dismiss-button="Later" --detailed-message --detailed-button "Show/Hide Upgrade Details"
|
|
||||||
fi
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
elif [ "$1" == 'update' ]; then
|
elif [ "$1" == 'update' ]; then
|
||||||
sudo apt update >/dev/null 2>/dev/null
|
sudo apt update >/dev/null 2>/dev/null
|
||||||
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
||||||
|
|
|
@ -6,11 +6,7 @@ swaymsg -t get_tree |
|
||||||
sed -e 's/^\(.*\) [—-] .*$/\1/'|
|
sed -e 's/^\(.*\) [—-] .*$/\1/'|
|
||||||
sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' |
|
sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' |
|
||||||
wofi -s $HOME/.dotfiles/wofi/style.css -c \
|
wofi -s $HOME/.dotfiles/wofi/style.css -c \
|
||||||
<<<<<<< Updated upstream
|
|
||||||
$HOME/.dotfiles/wofi/sidebar -d | {
|
$HOME/.dotfiles/wofi/sidebar -d | {
|
||||||
=======
|
|
||||||
$HOME/.dotfiles/wofi/sidebar -d | {
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
read -r
|
read -r
|
||||||
id=`echo $REPLY | rev | cut -d' ' -f1 | rev`
|
id=`echo $REPLY | rev | cut -d' ' -f1 | rev`
|
||||||
swaymsg "[con_id=$id]" focus
|
swaymsg "[con_id=$id]" focus
|
||||||
|
|
Loading…
Reference in New Issue