--- /dev/null
+--restrict-filenames
noremap! <Esc>[23~ <Nop>
noremap <Esc>M :cn<cr>zz<C-g>
noremap <Esc>L :cp<cr>zz<C-g>
-noremap <Esc>f "myiw:grep<Space>-Ew<Space>'<C-r>m'<Space>`git ls-files`
+" dnf install vim-fugitive
+noremap <Esc>f "myiw:Ggrep<Space>-Ew<Space>'<C-r>m'<Space>
+noremap <Esc>F "myiw:grep<Space>-Ew<Space>'<C-r>m'<Space>`git ls-files`
noremap <Esc>g "myiw:grep<Space>-rEw<Space>'<C-r>m'<Space>.
noremap <C-]> <C-]>zz<C-g>
noremap <C-t> <C-t>zz<C-g>
--- /dev/null
+#! /usr/bin/perl
+use strict;
+use warnings;
+my $psu=system($ENV{"HOME"}."/bin/psu")==0;
+local *F;
+open F,"/usr/bin/top -b -n2 -d1|" or die;
+my $top=0;
+while (<F>) {
+ /^top / && $top++;
+ /^$/ && $top++;
+ next if $top!=5;
+ /^(?:\s*\S+){8}\s*(\S+)\s*\S+\s*([^:\s]*):/ or next;
+ next if $1<90; # CPU %
+ next if $2<($psu?30:1); # minutes it has run
+ tr/'//d;
+ system "DISPLAY=:0 xmessage -timeout 30 -default okay -center '$_' 2>/dev/null";
+ exit 0;
+}
+close F or die;
--- /dev/null
+#! /bin/sh
+if [ -z "$*" ];then
+ echo >&2 "No PID"
+elif [ "$1" = "-p" ];then
+ shift
+ exec chrt -i -p 0 "$@"
+else
+ exec chrt -i 0 "$@"
+fi
#! /bin/bash
-acpi|&grep -Eq 'Battery 0: Not charging|Battery 0: Charging|No support for device type: power_supply' || exit 1
-grpcurl -v -plaintext -d '{"get_status":{}}' 192.168.1.1:9000 SpaceX.API.Device.Device/Handle &>/dev/null || exit 1
+/usr/bin/acpi|&grep -Eq 'Battery 0: Not charging|Battery 0: Charging|No support for device type: power_supply' || exit 1
+/usr/bin/grpcurl -v -plaintext -d '{"get_status":{}}' 192.168.1.1:9000 SpaceX.API.Device.Device/Handle &>/dev/null || exit 1
exit 0