clean up directory structure

This commit is contained in:
2026-08-21 09:28:12 +02:00
parent f45bdc542d
commit edb533f3f8
14 changed files with 0 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
CPUFILE=/proc/cpuinfo
test -f $CPUFILE || exit 1
NUMPHY=`grep "physical id" $CPUFILE | sort -u | wc -l`
NUMLOG=`grep "processor" $CPUFILE | wc -l`
if [ $NUMPHY -eq 1 ]
then
echo This system has one physical CPU,
else
echo This system has $NUMPHY physical CPUs,
fi
if [ $NUMLOG -gt 1 ]
then
echo and $NUMLOG logical CPUs.
NUMCORE=`grep "core id" $CPUFILE | sort -u | wc -l`
if [ $NUMCORE -gt 1 ]
then
echo For every physical CPU there are $NUMCORE cores.
fi
else
echo and one logical CPU.
fi
echo -n The CPU is a `grep "model name" $CPUFILE | sort -u | cut -d : -f 2-`
echo " with`grep "cache size" $CPUFILE | sort -u | cut -d : -f 2-` cache"
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
export XAUTHORITY=/home/luxick/.Xauthority
export DISPLAY=:0.0
# Device that appears only in docked mode (USBDeveices, etc)
IDENTIFIER_DEVICE="/dev/disk/by-uuid/840f4c9f-bbf4-4d92-972f-8ec827bd36dc"
DOCKING_STATUS=0
# Change Wallpaper when docked/undocked
WALLPAPER_DOCKED="./docked.png"
WALLPAPER_UNDOCKED="./undocked.png"
echo "Thinkpad Dock detection started"
while [[ true ]]; do
if [ -e "$IDENTIFIER_DEVICE" ]; then
if [[ $DOCKING_STATUS = 0 ]]; then
while [[ ! $(xrandr | grep HDMI3 | grep connected) ]]; do
sleep 0.5s
done
#xrandr --output HDMI3 --primary --auto --pos 1280x0 --output LVDS1 --mode 1280x800 --pos 0x0
~/.screenlayout/dock.sh
feh --bg-scale $WALLPAPER_DOCKED
#i3-msg workspace 9:www &>/dev/null; i3-msg move workspace to output left &>/dev/null; i3-msg workspace back_and_forth &>/dev/null
#i3-msg workspace 10:mail &>/dev/null; i3-msg move workspace to output left &>/dev/null; i3-msg workspace back_and_forth &>/dev/null
DOCKING_STATUS=1
echo `date` "Thinkpad Docked"
fi
else
if [[ $DOCKING_STATUS == 1 ]]; then
~/.screenlayout/undock.sh
feh --bg-scale $WALLPAPER_UNDOCKED
DOCKING_STATUS=0
echo `date` "Thinkpad Undocked"
fi
fi
sleep 1s
done
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
# In auto mode the fan does not use the maximum speed when temerature is
# high, this script manually set fan speed to full-speed/ returns ist to
# auto mode.
start() {
echo "Starting Service"
chmod 744 /proc/acpi/ibm/fan
while :
do
CURRENTSPEED=`cat /proc/acpi/ibm/fan | grep level: | awk 'NF>1{print $NF}'`
CURRENTTMP=`cat /proc/acpi/ibm/thermal | grep -o -E '[0-9]+' | sed -n '1p'`
if [ $CURRENTTMP -gt 80 ]; then
echo "level full-speed" > /proc/acpi/ibm/fan
RETURN="$CURRENTSPEED -> disengaged"
elif [ $CURRENTTMP -lt 65 ]; then
echo "level auto" > /proc/acpi/ibm/fan
RETURN="$CURRENTSPEED -> auto"
fi
sleep 5
done
}
stop() {
echo "Stopping Service"
killall fancontrol
}
case "$1" in
start)
start &
;;
stop)
stop
;;
status)
;;
restart|reload|condrestart)
stop
start &
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Monitor and control fan speed
[Service]
Type=simple
ExecStart=/usr/bin/fancontrol start
ExecStop=/usr/bin/fancontrol stop
[Install]
WantedBy=multi-user.target
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# Set Trackpoint sensetivity and speed up
TPDEV="/sys/devices/platform/i8042/serio1"
while true
do
if [ -d "$TPDEV" ]; then
echo "Configuring Trackpoint"
echo -n 200 > $TPDEV/sensitivity # Integer 128 Sensitivity
echo -n 200 > $TPDEV/speed # Integer 97 Cursor speed
echo -n 4 > $TPDEV/inertia # Integer 6 Negative intertia
echo "Done."
exit 0
else
echo "Couldn't find trackpoint device $TPDEV"
fi
sleep 1s
done
exit 1
+12
View File
@@ -0,0 +1,12 @@
[Unit]
Description=Speed up Trackpoint
[Service]
Type=oneshot
ExecStart=/usr/bin/speed-up-trackpoint
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# Enable or diable Thinkpad Touchpad
toggle() {
STATUS=`xinput list-props 'SynPS/2 Synaptics TouchPad' | grep 139 | grep -o ".$"`
if [ $STATUS = "1" ]; then
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 0
else
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 1
fi
}
deactivate() {
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 0
}
activate() {
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 1
}
case "$1" in
toggle)
toggle
;;
disable)
deactivate
;;
enable)
activate
;;
*)
echo $"Usage: $0 {enable|disable|toggle}"
exit 1
esac
exit 0
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
current=$(xrandr | grep primary | cut -d " " -f1)
echo 'Current Primary Display:' $current
# Set primary monitor
if [ $current = 'DP-2' ]; then
target="TV"
xrandr --output HDMI-0 --primary
sink="alsa_output.pci-0000_26_00.1.hdmi-stereo-extra3"
else
target="PC"
xrandr --output DP-2 --primary
sink="alsa_output.pci-0000_28_00.4.analog-stereo"
fi
# Move audio to switched device
sinkId=$(pactl list short sinks | grep $sink | cut -f1)
pactl list short sink-inputs|while read stream; do
streamId=$(echo $stream|cut '-d ' -f1)
echo "moving stream $streamId"
pactl move-sink-input "$streamId" "$sinkId"
done
notify-send "Switched to $target" "Switched primary output and sound to $target" -i /usr/share/icons/Pop/128x128/devices/video-display.png