Update 2024-03-15 07:49 OpenBSD/amd64-x13
This commit is contained in:
parent
4d643506db
commit
b50347b2e7
@ -207,6 +207,7 @@ XFontSel*Font: lucidasanstypewriter-14
|
||||
Zutty.altScroll: true
|
||||
Zutty.boldColors: false
|
||||
Zutty.font: SourceCodePro-Medium
|
||||
Zutty.dwfont: SourceCodePro-Medium
|
||||
Zutty.fontsize: 18
|
||||
Zutty.fontpath: /home/sdk/.fonts
|
||||
Zutty.bg: #001010
|
||||
|
@ -1,69 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
#
|
||||
# ONLY OpenBSD modules included with the default installation are permitted!
|
||||
#
|
||||
use HTTP::Tiny;
|
||||
use Net::Ping;
|
||||
use Time::HiRes;
|
||||
|
||||
# Configuration hash (editable)
|
||||
my %config = (
|
||||
'timeout' => 0.20, # How long to wait before giving up on server response, in seconds
|
||||
'debug' => 1, # Debug output?
|
||||
'top' => 3, # How many entries to return?
|
||||
'protocol' => 'tcp', # tcp, udp, icmp, et al
|
||||
'port' => 'http', # (used in getservbyname sub)
|
||||
);
|
||||
|
||||
# hash to store servers and response times to protocol/port requests
|
||||
my %serverstats;
|
||||
|
||||
# create HTTP::Tiny instance
|
||||
my $http = HTTP::Tiny->new;
|
||||
|
||||
# Get a list of all current OpenBSD FTP servers
|
||||
my $response = $http->get('http://ftp.eu.openbsd.org/pub/OpenBSD/ftplist');
|
||||
die "Failed!\n" unless $response->{success};
|
||||
|
||||
# Iterate through server list and get TCP/80 response time in ms
|
||||
foreach my $line (split("\n", $response->{content})) {
|
||||
if ($line !~ /(cdn)/) {
|
||||
if ($line =~ /(http:\/\/)(.+?)(\/\S+)/) {
|
||||
my $response = &httping($2);
|
||||
$serverstats{$1.$2.$3} = $response if ($response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Sort & print servers by response time in ms
|
||||
my $i = 0;
|
||||
foreach my $key (sort {$serverstats{$a} <=> $serverstats{$b} } keys %serverstats) {
|
||||
$i++;
|
||||
print "$key\n";
|
||||
last if $i eq $config{'top'};
|
||||
}
|
||||
|
||||
#
|
||||
# Ping TCP/80 and return response time or 0 if unresponsive + some diagnostic output
|
||||
#
|
||||
|
||||
sub httping ($) {
|
||||
my $host = shift;
|
||||
my $ping = Net::Ping->new($config{'protocol'});
|
||||
$ping->hires();
|
||||
$ping->{port_num} = getservbyname($config{'port'}, $config{'protocol'});
|
||||
print ("Trying $host... ") if $config{'debug'};
|
||||
my ($retval, $duration, $ip) = $ping->ping($host, $config{'timeout'});
|
||||
$ping->close();
|
||||
$duration = int($duration * 1000);
|
||||
|
||||
if ($retval) {
|
||||
print ("$duration ms\n") if $config{'debug'};
|
||||
return $duration;
|
||||
} else {
|
||||
print ("unresponsive\n") if $config{'debug'};;
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
. /home/sdk/.dbus_address
|
||||
# . /home/sdk/.dbus_address
|
||||
. /home/sdk/.bin/_config
|
||||
|
||||
DISPLAY=:0
|
||||
MSG="Drink some water!"
|
||||
NOTIFY_CMD_OPTS="-s 5"
|
||||
NOTIFY_CMD "$MSG"
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true;
|
||||
do
|
||||
PORT=$(pkg_info -mz | fzf -e --sync --bind start:last)
|
||||
[ ! -z $PORT ] \
|
||||
&& doas pkg_delete -c "$PORT"
|
||||
[ -z $PORT ] \
|
||||
&& exit 0
|
||||
done
|
||||
pkg_delete -ac
|
@ -14,8 +14,8 @@ GAP=$(( RESH / 12 ))
|
||||
H=$(( RESH - 2 * GAP ))
|
||||
V=$(( RESV - 2 * GAP ))
|
||||
|
||||
COLUMNS=144
|
||||
ROWS=29
|
||||
COLUMNS=198
|
||||
ROWS=46
|
||||
|
||||
# set the quirk in .config/spectrwm/spectrwm.conf
|
||||
# quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
|
||||
|
@ -8,7 +8,7 @@ local unique_instance = require "unique_instance"
|
||||
unique_instance.open_links_in_new_window = true
|
||||
|
||||
-- Set the number of web processes to use. A value of 0 means 'no limit'.
|
||||
luakit.process_limit = 1
|
||||
-- luakit.process_limit = 1
|
||||
|
||||
-- Load library of useful functions for luakit
|
||||
local lousy = require "lousy"
|
||||
|
@ -11,15 +11,17 @@
|
||||
# +--------------------------------------------------
|
||||
|
||||
border_width = 2
|
||||
color_focus = rgb:00/80/80
|
||||
tile_gap = 5
|
||||
region_padding = 5
|
||||
|
||||
color_focus = rgb:B9/39/34
|
||||
color_unfocus = rgb:33/33/33
|
||||
|
||||
color_focus_maximized = rgb:00/80/80
|
||||
color_focus_maximized_free = rgb:00/80/80
|
||||
color_focus_free = rgb:00/80/80
|
||||
color_unfocus = rgb:00/00/00
|
||||
color_unfocus_free = rgb:55/35/00
|
||||
tile_gap = -2
|
||||
region_padding = 0
|
||||
disable_border = 0
|
||||
disable_border = 1
|
||||
maximize_hide_bar = 0
|
||||
|
||||
# +--------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user