aboutsummaryrefslogtreecommitdiffstats
path: root/basics
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2021-06-12 23:35:05 +0800
committerPeter Son Struschka <me@peter-struschka.com>2021-06-12 23:35:05 +0800
commit4d63577b487a8bf877401312f22142094e2d4584 (patch)
treea35596a5ccda6537b05da0a04a775a85bdc25b06 /basics
parenta99b14adcece0b4f42849b5ba229a49d1b17c50d (diff)
downloaddotfiles-4d63577b487a8bf877401312f22142094e2d4584.tar.gz
dotfiles-4d63577b487a8bf877401312f22142094e2d4584.tar.bz2
dotfiles-4d63577b487a8bf877401312f22142094e2d4584.tar.lz
dotfiles-4d63577b487a8bf877401312f22142094e2d4584.tar.xz
dotfiles-4d63577b487a8bf877401312f22142094e2d4584.tar.zst
dotfiles-4d63577b487a8bf877401312f22142094e2d4584.zip
all: zsh prompt update, general script updates
Diffstat (limited to 'basics')
-rw-r--r--basics/.config/alacritty/alacritty.yml22
-rw-r--r--basics/.config/bat/config2
-rw-r--r--basics/.config/npm/npmrc9
-rwxr-xr-xbasics/.local/bin/dim-screen.sh65
-rwxr-xr-xbasics/.local/bin/setup-widescreen2
5 files changed, 72 insertions, 28 deletions
diff --git a/basics/.config/alacritty/alacritty.yml b/basics/.config/alacritty/alacritty.yml
index f127df7..c1a25f9 100644
--- a/basics/.config/alacritty/alacritty.yml
+++ b/basics/.config/alacritty/alacritty.yml
@@ -48,7 +48,7 @@ window:
# - Windowed
# - Maximized
# - Fullscreen
- startup_mode: Maximized
+ startup_mode: Maximized
# Window terminal applications to change Alacritty's window title.
dynamic_title: true
@@ -275,26 +275,6 @@ mouse:
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: false
- url:
- # URL launcher
- #
- # This program is executed when clicking on a text which is recognized as a URL.
- # The URL is always added to the command as the last parameter.
- #
- # When set to `None`, URL launching will be disabled completely.
- #
- # Default:
- # - (macOS) open
- # - (Linux) xdg-open
- # - (Windows) explorer
- #launcher: xdg-open
-
- # URL modifiers
- #
- # These are the modifiers that need to be held down for opening URLs when clicking
- # on them. The available modifiers are documented in the key binding section.
- modifiers: None
-
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
diff --git a/basics/.config/bat/config b/basics/.config/bat/config
index c4144ab..0d16ce8 100644
--- a/basics/.config/bat/config
+++ b/basics/.config/bat/config
@@ -4,7 +4,7 @@
# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
# for a list of all available themes
---theme="ansi-dark"
+--theme="gruvbox-dark"
# Enable this to use italic text on the terminal. This is not supported on all
# terminal emulators (like tmux, by default):
diff --git a/basics/.config/npm/npmrc b/basics/.config/npm/npmrc
index d072ac3..413eecb 100644
--- a/basics/.config/npm/npmrc
+++ b/basics/.config/npm/npmrc
@@ -1,8 +1,7 @@
-prefix=${XDG_DATA_HOME}/npm
-cache=${XDG_CACHE_HOME}/npm
-tmp=${XDG_RUNTIME_DIR}/npm
-init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
-
+cache=/home/peter/.cache/npm
+tmp=/run/user/1000/npm
+init-module=/home/peter/.config/npm/config/npm-init.js
sign-git-tag=false
+strict-ssl=false
diff --git a/basics/.local/bin/dim-screen.sh b/basics/.local/bin/dim-screen.sh
new file mode 100755
index 0000000..d983aee
--- /dev/null
+++ b/basics/.local/bin/dim-screen.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Example notifier script -- lowers screen brightness, then waits to be killed
+# and restores previous brightness on exit.
+
+## CONFIGURATION ##############################################################
+
+# Brightness will be lowered to this value.
+min_brightness=0
+
+# If your video driver works with xbacklight, set -time and -steps for fading
+# to $min_brightness here. Setting steps to 1 disables fading.
+fade_time=200
+fade_steps=20
+
+# If you have a driver without RandR backlight property (e.g. radeon), set this
+# to use the sysfs interface and create a .conf file in /etc/tmpfiles.d/
+# containing the following line to make the sysfs file writable for group
+# "users":
+#
+# m /sys/class/backlight/acpi_video0/brightness 0664 root users - -
+#
+#sysfs_path=/sys/class/backlight/acpi_video0/brightness
+
+# Time to sleep (in seconds) between increments when using sysfs. If unset or
+# empty, fading is disabled.
+fade_step_time=0.05
+
+###############################################################################
+
+get_brightness() {
+ if [[ -z $sysfs_path ]]; then
+ xbacklight -get
+ else
+ cat $sysfs_path
+ fi
+}
+
+set_brightness() {
+ if [[ -z $sysfs_path ]]; then
+ xbacklight -steps 1 -set $1
+ else
+ echo $1 > $sysfs_path
+ fi
+}
+
+fade_brightness() {
+ if [[ -z $sysfs_path ]]; then
+ xbacklight -time $fade_time -steps $fade_steps -set $1
+ elif [[ -z $fade_step_time ]]; then
+ set_brightness $1
+ else
+ local level
+ for level in $(eval echo {$(get_brightness)..$1}); do
+ set_brightness $level
+ sleep $fade_step_time
+ done
+ fi
+}
+
+trap 'exit 0' TERM INT
+trap "set_brightness $(get_brightness); kill %%" EXIT
+fade_brightness $min_brightness
+sleep 2147483647 &
+wait
diff --git a/basics/.local/bin/setup-widescreen b/basics/.local/bin/setup-widescreen
index 0082ff9..b81013a 100755
--- a/basics/.local/bin/setup-widescreen
+++ b/basics/.local/bin/setup-widescreen
@@ -6,5 +6,5 @@ xrandr --newmode "3440x1440_30.00" 196.25 3440 3600 3952 4464 1440 1443 1453
xrandr --addmode HDMI1 3440x1440_30.00
-xrandr --output HDMI1 --mode 3440x1440_30.00 --primary --left-of eDP1
+xrandr --output HDMI1 --mode 3440x1440_30.00 --primary --right-of eDP1