Compare commits
No commits in common. "7630ee5878d1a5432e57eb6886a9acc8287815a5" and "d8c195394751dfe21c2414dd2f1866bc398d2681" have entirely different histories.
7630ee5878
...
d8c1953947
|
@ -65,7 +65,6 @@
|
||||||
|
|
||||||
# Files containing current and max brightness values
|
# Files containing current and max brightness values
|
||||||
my $cur_file = "/sys/class/backlight/intel_backlight/brightness";
|
my $cur_file = "/sys/class/backlight/intel_backlight/brightness";
|
||||||
chmod('0644',$cur_file) unless ( -w $cur_file );
|
|
||||||
my $max_file = "/sys/class/backlight/intel_backlight/max_brightness";
|
my $max_file = "/sys/class/backlight/intel_backlight/max_brightness";
|
||||||
my $cur_log = $ENV{HOME}."/.spool/blc.current";
|
my $cur_log = $ENV{HOME}."/.spool/blc.current";
|
||||||
my $last_log = $ENV{HOME}."/.spool/blc.last";
|
my $last_log = $ENV{HOME}."/.spool/blc.last";
|
||||||
|
@ -126,12 +125,9 @@ sub logger
|
||||||
sub writef
|
sub writef
|
||||||
{
|
{
|
||||||
my $target = shift;
|
my $target = shift;
|
||||||
if (open(my $fh,'>',$cur_file)) {
|
open(my $fh,'>',$cur_file);
|
||||||
print $fh $target;
|
print $fh $target;
|
||||||
close($fh);
|
close($fh);
|
||||||
} else {
|
|
||||||
print "Failed to write to $cur_file: $!\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub increment
|
sub increment
|
||||||
|
|
|
@ -6,4 +6,4 @@ cd ${HOME}/.private-scripts/snippets
|
||||||
|
|
||||||
HEIGHT=$(swaymsg -t get_outputs | tr '\n' ' ' | sed -e 's/ */ /g' | sed -e 's/\(.*"focused": [a-z]*\),/\1\n/' | less | grep '"focused": true' | sed -e 's/.*"rect": {[^}]*"height": \([0-9]*\).*/\1/')
|
HEIGHT=$(swaymsg -t get_outputs | tr '\n' ' ' | sed -e 's/ */ /g' | sed -e 's/\(.*"focused": [a-z]*\),/\1\n/' | less | grep '"focused": true' | sed -e 's/.*"rect": {[^}]*"height": \([0-9]*\).*/\1/')
|
||||||
|
|
||||||
cat $(find ./ -type f | sed -E 's/\.\///' | ${HOME}/.local/bin/tofi --prompt-text 'Snippets: ' --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml) | wl-copy -p
|
cat $(find ./ -type f | sed -E 's/\.\///' | tofi --prompt-text 'Snippets: ' --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml) | wl-copy -p
|
||||||
|
|
Loading…
Reference in New Issue