Skip to content

Commit e02f371

Browse files
committed
Merge branch 'master' of github.com:AgenttiX/linux-scripts
2 parents 01c1656 + a2d3d78 commit e02f371

File tree

6 files changed

+36
-11
lines changed

6 files changed

+36
-11
lines changed

apt/install_software.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ fi
1515
echo "Installing apt packages."
1616
apt update
1717
APT_PACKAGES=(
18-
"apt-transport-https" "autojump" "autossh" "bleachbit" "bluetooth" "build-essential" "ca-certificates"
18+
"apt-transport-https" "autojump" "autossh" "bleachbit" "bluetooth"
19+
"boinc" "boinc-client-opencl" "build-essential" "ca-certificates"
1920
"cifs-utils" "clamtk" "clinfo" "cloc" "clpeak" "cmake" "curl" "cutecom"
2021
"docker-ce" "docker-ce-cli" "containerd.io" "docker-buildx-plugin" "docker-compose-plugin"
2122
"exfatprogs" "filelight" "filezilla" "freerdp2-wayland"
2223
"gcc-multilib" "g++-multilib" "gdisk" "gfortran" "gimp" "git" "git-delta" "git-gui" "gparted" "gpg-agent" "htop"
2324
"inkscape" "kde-config-flatpak" "keepassxc" "ktorrent" "libenchant-2-voikko"
2425
"libreoffice" "libreoffice-help-fi" "libreoffice-voikko"
25-
"links" "lm-sensors" "mosh" "mumble" "network-manager-openvpn" "openssh-server" "optipng"
26+
"links" "lm-sensors" "mosh" "mumble" "network-manager-openvpn" "obs-studio" "openssh-server" "optipng"
2627
"pipewire-audio" "pocl-opencl-icd" "powertop"
2728
"python3-dev" "python3-setuptools" "python3-venv" "python3-wheel"
2829
"remmina" "remmina-plugin-kwallet" "s-tui" "screen" "signal-desktop" "stress" "synaptic" "tmispell-voikko"
@@ -31,9 +32,12 @@ APT_PACKAGES=(
3132
if [ "$(hostnamectl chassis)" = "laptop" ]; then
3233
APT_PACKAGES+=("tlp" "touchegg")
3334
fi
34-
if grep -wq "GenuineIntel" /proc/cpuinfo; then
35+
if grep -q "Intel" /proc/cpuinfo; then
3536
APT_PACKAGES+=("intel-media-va-driver" "intel-microcode" "intel-opencl-icd")
3637
fi
38+
if command -v nvidia-smi &> /dev/null; then
39+
APT_PACKAGES+=("boinc-client-nvidia-cuda")
40+
fi
3741
apt install "${APT_PACKAGES[@]}"
3842

3943
echo "Installing Snap packages."

backup/rsync_exclude.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
.local/share/fish/generated_completions/
2323
.local/share/Steam/appcache
2424
.local/share/Steam/compatibilitytools.d
25+
.local/share/Steam/config/htmlcache
2526
.local/share/Steam/steamapps
2627
.local/share/Steam/ubuntu12_32
2728
.local/share/Steam/ubuntu12_64

drivers/thinkpad_t480/thinkpad_t480.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ if [ -d "${HOME}/Git/throttled" ] {
5555
cd "${HOME}/Git/throttled"
5656
}
5757
sudo ./install.sh
58+
# Todo: add Throttled config here
5859

5960
cd "${WORKDIR}"
6061

physics/install_dev.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ apt update
1010
# Boost is required for AdaptiveCPP
1111
# https://github.com/AdaptiveCpp/AdaptiveCpp
1212
# These seem to be also required for its cmake compilation: libedit-dev, libclang-rt-dev
13-
# libedit-dev seems to be required for cmake compilation of AdaptiveCPP
1413
apt install build-essential clang cmake hdf5-tools \
1514
libboost-dev libboost-context-dev libboost-fiber-dev libboost-test-dev \
16-
libedit-dev libgomp1 libhdf5-mpi-dev libomp-dev lld mpi-default-dev ninja-build pkg-config
15+
libclang-rt-dev libedit-dev libgomp1 libhdf5-mpi-dev libomp-dev lld mpi-default-dev ninja-build pkg-config
1716

1817
# These should perhaps be added to the list above: hipcc
1918

zsh/custom/clusters.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ cluster-info() {
3636
}
3737

3838
# CSC Summer School 2025 on LUMI
39-
if [ -d "/scratch/project_462000956/${USER}/summerschool" ]; then
40-
alias summerschool="cd /scratch/project_462000956/${USER}/summerschool; clear"
41-
fi
39+
# if [ -d "/scratch/project_462000956/${USER}/summerschool" ]; then
40+
# alias summerschool="cd /scratch/project_462000956/${USER}/summerschool; clear"
41+
# fi

zsh/custom/image.zsh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,36 @@ resize_image() {
2222
fi
2323

2424
# Calculate the new dimensions while preserving the aspect ratio
25-
new_larger_dimension=512
26-
new_smaller_dimension=$((512 * smaller_dimension / larger_dimension))
25+
new_larger_dimension=140
26+
new_smaller_dimension=$((140 * smaller_dimension / larger_dimension))
2727
if [ "${dimensions[1]}" -ge "${dimensions[2]}" ]; then
2828
dimensions2="${new_larger_dimension}x${new_smaller_dimension}"
2929
else
3030
dimensions2="${new_smaller_dimension}x${new_larger_dimension}"
3131
fi
3232

3333
# Resize the image using ImageMagick
34-
convert "$input_image" -resize "$dimensions2" -format png "$output_image"
34+
convert "$input_image" -resize "$dimensions2" -format bmp "$output_image"
3535

3636
echo "Image resized and converted to PNG: $output_image"
3737
}
38+
39+
resize_image_stick() {
40+
if [ $# -ne 2 ]; then
41+
echo "Usage: resize_image input_image output_image"
42+
return 1
43+
fi
44+
input_image="$1"
45+
output_image="$2"
46+
dimensions=($(identify -format "%w %h" "$input_image"))
47+
48+
width="${dimensions[1]}"
49+
height="${dimensions[2]}"
50+
new_width=140
51+
new_height=$((new_width * width / height + 1))
52+
53+
echo ${height} ${width}
54+
echo ${new_height} ${new_width}
55+
convert "${input_image}" -rotate 90 -resize "${new_width}x${new_height}" -format bmp "${output_image}"
56+
echo "Image resized and converted for Timo's light stick: ${output_image}"
57+
}

0 commit comments

Comments
 (0)