Skip to content

Commit

Permalink
Install chrony, hwclock
Browse files Browse the repository at this point in the history
  • Loading branch information
wizawu committed Mar 19, 2024
1 parent 4baab35 commit db390b6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
36 changes: 17 additions & 19 deletions bin/ns
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,28 @@
sudo chattr -i /etc/resolv.conf
cat /etc/resolv.conf

servers='
hosts='
10.212.132.64
10.212.132.65
1.2.4.8
8.8.8.8
1.1.1.1
'

if [ "$1" = "-a" ]; then
for host in $servers; do
grep -q $host /etc/resolv.conf && continue || echo
echo -n "append $host, y/n/q: "
read -n 1
echo
if [ "$REPLY" = q ]; then
break
elif [ "$REPLY" = y ]; then
ns_list="$ns_list $host"
echo "nameserver $host" | sudo tee -a /etc/resolv.conf
fi
done
test -z "$ns_list" || fping -c1 -q -t100 $ns_list
fi
for host in $hosts; do
grep -q $host /etc/resolv.conf && continue || echo
echo -n "append $host, y/n/e/q: "
read -n 1
echo
if [ "$REPLY" = q ]; then
break
elif [ "$REPLY" = e ]; then
sudo vi /etc/resolv.conf
break
elif [ "$REPLY" = y ]; then
tail="$tail $host"
echo "nameserver $host" | sudo tee -a /etc/resolv.conf
fi
done

if [ "$1" = "-e" ]; then
sudo vi /etc/resolv.conf
fi
test -z "$tail" || fping -c1 -q -t100 $tail
4 changes: 2 additions & 2 deletions bin/x
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ if [[ "$1" = "-r" ]]; then
xmodmap -e "keycode 9 = Escape asciitilde grave"
fi
xinput set-prop 'pointer:MOSART Semi. 2.4G Keyboard Mouse' 'libinput Accel Profile Enabled' 0 1
xinput set-prop 'pointer:MOSART Semi. 2.4G Keyboard Mouse' 'libinput Accel Speed' 0.${2:-2}
xinput set-prop 'pointer:MOSART Semi. 2.4G Keyboard Mouse' 'libinput Accel Speed' -0.${2:-1}
xinput set-prop 'pointer:Razer Razer Viper 8KHz' 'libinput Accel Profile Enabled' 0 1
xinput set-prop 'pointer:Razer Razer Viper 8KHz' 'libinput Accel Speed' -0.${2:-14}
xinput set-prop 'pointer:Razer Razer Viper 8KHz' 'libinput Accel Speed' -0.${2:-2}
hsetroot -full /usr/share/awesome/themes/default/background.png -sharpen 8
exit
fi
Expand Down
1 change: 1 addition & 0 deletions install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
with_items:
- curl
- getconf
- hwclock
- ipcs
- losetup
- lscpu
Expand Down
1 change: 1 addition & 0 deletions tasks/command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- ack-grep
- apt-file
- autossh
- chrony
- cmake
- cmatrix
- cpulimit
Expand Down

0 comments on commit db390b6

Please sign in to comment.