some changes (sort out later)
This commit is contained in:
parent
ed32d2548b
commit
899f42fb88
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
make jsfw
|
||||
VERBOSE=1 make jsfw
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
BIN
lappy/background.jpg
Normal file
BIN
lappy/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 KiB |
@ -3,6 +3,7 @@
|
||||
, pkgs
|
||||
# shell scripts stuff
|
||||
, makeWrapper
|
||||
, kbd # for chvt
|
||||
, xclip
|
||||
, rbw
|
||||
}:
|
||||
@ -14,14 +15,14 @@ stdenv.mkDerivation rec {
|
||||
src = ./utils;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ xclip rbw ];
|
||||
buildInputs = [ xclip kbd rbw ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
for i in $(ls $src/); do
|
||||
cp $src/$i $out/bin
|
||||
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ xclip rbw ]}
|
||||
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ xclip kbd rbw ]}
|
||||
done
|
||||
'';
|
||||
}
|
||||
|
7
lappy/builds/utils/blackhole
Executable file
7
lappy/builds/utils/blackhole
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo echo ""
|
||||
chvt 6
|
||||
sleep 2
|
||||
sudo stty -echo -F /dev/tty6
|
||||
sudo /run/current-system/sw/bin/jsfw server 24800 /home/usr/dots/lappy/jsfw.json >/dev/null
|
43
lappy/builds/utils/khalmacs
Executable file
43
lappy/builds/utils/khalmacs
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
print_help() {
|
||||
echo "
|
||||
this is khalmacs.
|
||||
|
||||
builtin-options:
|
||||
- regular
|
||||
- late
|
||||
"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
"regular")
|
||||
khal new -g school -a home $2 07:40 08:27 AP Computer Science
|
||||
khal new -g school -a home $2 08:34 09:19 Chemistry I H
|
||||
khal new -g school -a home $2 09:29 10:14 AP Precalculus
|
||||
khal new -g school -a home $2 10:21 11:06 AP European History
|
||||
khal new -g school -a home $2 11:06 11:08 Flex Check time
|
||||
khal new -g school -a home $2 11:15 12:05 Wind Ensemble H
|
||||
khal new -g school -a home $2 12:12 12:37 SAIL
|
||||
khal new -g school -a home $2 12:37 13:02 Lunch
|
||||
khal new -g school -a home $2 13:09 13:54 English II H
|
||||
khal new -g school -a home $2 14:01 14:47 Spanish III H
|
||||
;;
|
||||
"late")
|
||||
khal new -g school -a home $2 08:25 09:08 AP Computer Science
|
||||
khal new -g school -a home $2 09:15 09:56 Chemistry I H
|
||||
khal new -g school -a home $2 10:06 10:47 AP Precalculus
|
||||
khal new -g school -a home $2 10:54 11:33 AP European History
|
||||
khal new -g school -a home $2 11:33 11:35 Flex Check time
|
||||
khal new -g school -a home $2 11:41 12:22 Wind Ensemble H
|
||||
khal new -g school -a home $2 12:29 13:10 Lunch
|
||||
khal new -g school -a home $2 13:17 13:58 English II H
|
||||
khal new -g school -a home $2 14:05 14:47 Spanish III H
|
||||
;;
|
||||
*)
|
||||
print_help
|
||||
;;
|
||||
"help")
|
||||
print_help
|
||||
;;
|
||||
esac
|
@ -8,13 +8,61 @@ else
|
||||
enable -f /lib/bash/sleep sleep
|
||||
fi
|
||||
|
||||
schedule_needs_update="yes"
|
||||
|
||||
get_schedule_info () {
|
||||
if [ "$schedule_needs_update" = "yes" ]; then
|
||||
output=$(
|
||||
khal at now --format '{title}|{end-time}|{categories}' | \
|
||||
awk -F'|' '{if($3 == "school") { print $1 "|" $2 }}'
|
||||
)
|
||||
|
||||
if [ -z "$output" ]; then
|
||||
schedule_needs_update="no"
|
||||
schedule_status=""
|
||||
return
|
||||
fi
|
||||
|
||||
class_name=${output%%|*}
|
||||
schedule_time=${output##*|}
|
||||
schedule_time_hours=${schedule_time%%:*}
|
||||
schedule_time_minutes=${schedule_time##*:}
|
||||
schedule_time_unix=$(date --date "$schedule_time" "+%s")
|
||||
|
||||
schedule_needs_update="no"
|
||||
fi
|
||||
|
||||
printf -v current_time '%(%s)T' -1
|
||||
difference=$(($schedule_time_unix - $current_time))
|
||||
if [ "$difference" -lt 0 ]; then
|
||||
schedule_needs_update="yes"
|
||||
get_schedule_info
|
||||
fi
|
||||
until_end=$(($difference / 60))
|
||||
|
||||
if [ "$until_end" -le 5 ]; then
|
||||
until_end_seconds=$(($difference % 60))
|
||||
schedule_status=$(printf "%02d:%02d left in %s/" "$until_end" "$until_end_seconds" "$class_name")
|
||||
else
|
||||
schedule_status=$(printf "%d minutes left in %s/" "$until_end" "$class_name")
|
||||
fi
|
||||
}
|
||||
|
||||
get_cmus_info () {
|
||||
if [ /dev/shm/status/cmus -nt /dev/shm/status/modified ]; then
|
||||
cmus_status=$(</dev/shm/status/cmus)
|
||||
cmus_status="$(</dev/shm/status/cmus)/"
|
||||
touch /dev/shm/status/modified
|
||||
fi
|
||||
}
|
||||
|
||||
get_battery_info () {
|
||||
battery_status=$(</sys/class/power_supply/BAT0/capacity)
|
||||
}
|
||||
|
||||
get_time_info () {
|
||||
printf -v date_status '%(%d(%a)-%m(%b)-%y)T %(%H)T:%(%M)T:%(%S)T/' -1
|
||||
}
|
||||
|
||||
while true; do
|
||||
# use /dev/shm to minimize the amount of i/o on disk
|
||||
if [ ! -d /dev/shm/status ]; then
|
||||
@ -22,10 +70,11 @@ while true; do
|
||||
touch /dev/shm/status/modified
|
||||
fi
|
||||
|
||||
battery=$(</sys/class/power_supply/BAT0/capacity)
|
||||
printf -v date '%(%H)T:%(%M)T' -1
|
||||
get_time_info
|
||||
get_battery_info
|
||||
get_cmus_info
|
||||
get_schedule_info
|
||||
|
||||
printf "%s/%s/%s\n" "$cmus_status" "$date" "$battery"
|
||||
printf "%s%s%s%s\n" "$schedule_status" "$cmus_status" "$date_status" "$battery_status"
|
||||
sleep 1
|
||||
done | dwm-setstatus
|
||||
|
@ -57,6 +57,9 @@
|
||||
mkdir -p /home/usr/.config/sx
|
||||
${pkgs.coreutils}/bin/ln -sf /home/usr/dots/lappy/config/sx/sxrc /home/usr/.config/sx/sxrc
|
||||
|
||||
mkdir -p /home/usr/.config/todoman
|
||||
${pkgs.coreutils}/bin/ln -sf /home/usr/dots/lappy/config/todoman/config.py /home/usr/.config/todoman/config.py
|
||||
|
||||
mkdir -p /home/usr/.config/vdirsyncer
|
||||
${pkgs.coreutils}/bin/ln -sf /home/usr/dots/lappy/config/vdirsyncer/config /home/usr/.config/vdirsyncer/config
|
||||
'';
|
||||
|
0
lappy/config/sx/thinclient
Normal file
0
lappy/config/sx/thinclient
Normal file
5
lappy/config/todoman/config.py
Normal file
5
lappy/config/todoman/config.py
Normal file
@ -0,0 +1,5 @@
|
||||
path = "~/pim/calendar/personal/*"
|
||||
date_format = "%m-%d-%Y"
|
||||
time_format = "%H:%M"
|
||||
default_due = 0
|
||||
default_list = "edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"
|
@ -70,6 +70,7 @@
|
||||
neomutt
|
||||
isync
|
||||
msmtp
|
||||
todoman
|
||||
|
||||
# utilities
|
||||
htop
|
||||
@ -92,6 +93,11 @@
|
||||
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
systemd.services."getty@tty6" = {
|
||||
overrideStrategy = "asDropin";
|
||||
serviceConfig.ExecStart = ["" "@${pkgs.coreutils}/bin/cat"];
|
||||
};
|
||||
|
||||
# make sshd a `systemctl start sshd` command away
|
||||
services.openssh.enable = true;
|
||||
systemd.services.sshd.wantedBy = lib.mkForce [];
|
||||
|
@ -3,7 +3,22 @@
|
||||
{
|
||||
"tag": "keyboard",
|
||||
"filter": {
|
||||
"name": "AT Translated Set 2 Keyboard"
|
||||
"vendor": "0001",
|
||||
"product": "0001"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "mouse",
|
||||
"filter": {
|
||||
"vendor": "0002",
|
||||
"product": "000e",
|
||||
"name": "ETPS/2 Elantech Touchpad"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "mousebuttons",
|
||||
"filter": {
|
||||
"name": "ETPS/2 Elantech TrackPoint"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user