From 10f1982c23f28014820c3fe7272418f0e5e22a50 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 11:43:02 -0600 Subject: [PATCH] Removed unused startup scripts --- .../airootfs/etc/skel/.update_dpi_settings | 68 ------------------- .../airootfs/etc/skel/.update_hostname | 16 ----- 2 files changed, 84 deletions(-) delete mode 100755 .linux_items/include/airootfs/etc/skel/.update_dpi_settings delete mode 100755 .linux_items/include/airootfs/etc/skel/.update_hostname diff --git a/.linux_items/include/airootfs/etc/skel/.update_dpi_settings b/.linux_items/include/airootfs/etc/skel/.update_dpi_settings deleted file mode 100755 index 2287508c..00000000 --- a/.linux_items/include/airootfs/etc/skel/.update_dpi_settings +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/env bash -# -## Calculate DPI and adjust display settings if necesary - -REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$' -REGEX_URXVT='(URxvt.geometry:\s+).*' - -# Get screen data -xrandr_str="$(xrandr | grep mm | head -1)" -width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")" -height_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\2/")" -width_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\3/")" -height_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\4/")" - -# Convert to in -width_in="$(echo "${width_mm} * 0.03937" | bc)" -height_in="$(echo "${height_mm} * 0.03937" | bc)" - -# Calculate diagonals -diag_px="$(echo "sqrt(${width_px}^2 + ${height_px}^2)" | bc)" -diag_in="$(echo "sqrt(${width_in}^2 + ${height_in}^2)" | bc)" - -# Calculate DPI -dpi="$(echo "${diag_px} / ${diag_in}" | bc 2>/dev/null || True)" -dpi="${dpi:-0}" - -# Calculate URxvt default window size -width_urxvt="$(echo "${width_px} * 112/1280" | bc)" -height_urxvt="$(echo "${height_px} * 33/720" | bc)" -offset_urxvt="24" - -# Update settings if necessary -if [[ "${dpi}" -ge 192 ]]; then - # Conky - sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc" - sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc" - sed -i 's/gap_x 20/gap_x 40/' "${HOME}/.conkyrc" - sed -i 's/gap_y 24/gap_y 48/' "${HOME}/.conkyrc" - - # Fonts - sed -i 's/!Xft.dpi: 192/Xft.dpi: 192/' "${HOME}/.Xresources" - - # GDK - export GDK_SCALE=2 - export GDK_DPI_SCALE=0.5 - - # i3 - sed -i -r 's/(height\s+) 26/\1 52/' "${HOME}/.config/i3/config" - - # Tint2 - sed -i 's/panel_size = 100% 30/panel_size = 100% 60/' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/Inconsolata 10/Inconsolata 20/g' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/Inconsolata 12/Inconsolata 24/g' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/systray_icon_size = 24/systray_icon_size = 48/' \ - "${HOME}/.config/tint2/tint2rc" - - # URxvt - width_urxvt="$(echo "${width_urxvt} / 2" | bc)" - height_urxvt="$(echo "${height_urxvt} / 2" | bc)" - offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)" -fi - -# Update URxvt (Always) -urxvt_geometry="${width_urxvt}x${height_urxvt}+${offset_urxvt}+${offset_urxvt}" -sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources" diff --git a/.linux_items/include/airootfs/etc/skel/.update_hostname b/.linux_items/include/airootfs/etc/skel/.update_hostname deleted file mode 100755 index 3c1bd7c2..00000000 --- a/.linux_items/include/airootfs/etc/skel/.update_hostname +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -IP="$(ip a show scope global \ - | grep inet \ - | head -1 \ - | sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')" -HOSTNAME="$(dig +noall +answer +short -x "$IP" \ - | head -1 \ - | sed 's/\.$//')" - -# Set hostname and renew DHCP lease -sudo hostnamectl set-hostname "${HOSTNAME}" -sudo dhclient -r -sleep 1 -sudo dhclient -