diff options
| Commit | 41bdf08f4c5a23b43c18b3e6d8e4ffd15ffdac17 (patch) | |
|---|---|---|
| Author | 2025-08-20 05:38:38 +0300 | |
| Committer | 2025-08-20 05:38:38 +0300 | |
| Files | dfc0ab9d8ec784061d74625f45b71aa6162883a9 /src/blog | |
| syndamia.com-41bdf08f4c5a23b43c18b3e6d8e4ffd15ffdac17.tar syndamia.com-41bdf08f4c5a23b43c18b3e6d8e4ffd15ffdac17.tar.gz syndamia.com-41bdf08f4c5a23b43c18b3e6d8e4ffd15ffdac17.zip | ||
| Parent | dd1159d8a053817b9f89902d6ddff4fce1675894 (diff) | |
fix: Correct code blocks
3 files changed, 17 insertions, 18 deletions
| -rw-r--r-- | src/blog/bash-is-weird/index.du | 2 | ||||
| -rw-r--r-- | src/blog/thinkpad-x270-my-favorite-machine/index.du | 21 | ||||
| -rw-r--r-- | src/blog/thinkpad-x270-my-favorite-machine/thinkfan.yaml | 12 |
diff --git a/src/blog/bash-is-weird/index.du b/src/blog/bash-is-weird/index.du index 3fe56cb..8bb9632 100644 --- a/src/blog/bash-is-weird/index.du +++ b/src/blog/bash-is-weird/index.du @@ -30,7 +30,7 @@ It has 3 things which really bothered me: Side note: obviously, the original expected behaviour can happen if we use some quotes: ```bash - myvar=("$(echo A B C)") +myvar=("$(echo A B C)") 2. On the second line, `[myvar]` *[becomes]* an integer and then we do an arithmetic operation on it, nothing wrong here. `[\${parameter:offset:length}]` returns the substring from `[parameter]` from `[offset]` with size `[length]`, but we're giving it a "number", so it should either throw some sort of error or return something default, like 0. diff --git a/src/blog/thinkpad-x270-my-favorite-machine/index.du b/src/blog/thinkpad-x270-my-favorite-machine/index.du index 978d8b4..0c268ee 100644 --- a/src/blog/thinkpad-x270-my-favorite-machine/index.du +++ b/src/blog/thinkpad-x270-my-favorite-machine/index.du @@ -76,19 +76,18 @@ The only negative is that, since it's 1080p, my battery life decreased by 30-60 Oddly enough though, if I set the refresh rate at 58.86 (or something else that's lower than 60.00, but this is the lowest I was able to go) the display seemed to use less power and I got that battery life back. Here are the exact Linux commands I used (make sure you don't have any external displays connected): -:code_bash +```bash # find your display name, mine was eDP-1; I got this from StackExchange somewhere I think displayname="$(xrandr | grep connected | grep -v disconnected | cut -f 1 -d ' ')" # get the exact needed display parameters for 1920x1080 resolution at 58.90 hertz refresh rate displayparams=$(cvt 1920 1080 58.90 | tail -n 1 | cut -f 2- -d ' ') modename=$(echo $displayparams | cut -f 1 -d ' ') - +\ # create and "select" the new display mode for our screen xrandr --newmode $displayparams xrandr --addmode $displayname $modename xrandr --output $displayname --mode $modename - From now on, my opinion will refer to the X270 with the upgraded display. ### CPU and RAM @@ -187,20 +186,8 @@ During the summer my left hand stars sweating a little bit more, which can be qu Of course, as already mentioned, we have drivers for everything, so I installed [url https://github.com/vmatare/thinkfan thinkfan]. With it, I configured the fan to spin up on those lower temperatures and left the automatic configuration intact when we start getting warmer: -:code -sensors: - - tpacpi: /proc/acpi/ibm/thermal - indices: [0] - -fans: - - tpacpi: /proc/acpi/ibm/fan - -levels: - - [0, 0, 35] - - [1, 35, 38] - - [3, 38, 53] - - ["level auto", 53, 255] - +```yaml +'include ./thinkfan.yaml This may shorten the fan lifespan, since it will be running more, but for me it's worth it. diff --git a/src/blog/thinkpad-x270-my-favorite-machine/thinkfan.yaml b/src/blog/thinkpad-x270-my-favorite-machine/thinkfan.yaml new file mode 100644 index 0000000..f4e9ca7 --- /dev/null +++ b/src/blog/thinkpad-x270-my-favorite-machine/thinkfan.yaml @@ -0,0 +1,12 @@ +sensors: + - tpacpi: /proc/acpi/ibm/thermal + indices: [0] + +fans: + - tpacpi: /proc/acpi/ibm/fan + +levels: + - [0, 0, 35] + - [1, 35, 38] + - [3, 38, 53] + - ["level auto", 53, 255] |