diff options
Diffstat (limited to 'dotfiles')
-rw-r--r-- | dotfiles/.config/mpv/input.conf | 1 | ||||
-rw-r--r-- | dotfiles/.config/sway/desktopslav | 1 | ||||
-rw-r--r-- | dotfiles/.config/swaylock/config | 3 | ||||
-rwxr-xr-x | dotfiles/.local/bin/barweather | 2 | ||||
-rwxr-xr-x | dotfiles/.local/bin/cstart | 64 | ||||
-rwxr-xr-x | dotfiles/.local/bin/pacupgrade | 7 | ||||
-rwxr-xr-x | dotfiles/.local/bin/weath | 4 |
7 files changed, 77 insertions, 5 deletions
diff --git a/dotfiles/.config/mpv/input.conf b/dotfiles/.config/mpv/input.conf index 56455c4..6e789ac 100644 --- a/dotfiles/.config/mpv/input.conf +++ b/dotfiles/.config/mpv/input.conf @@ -209,3 +209,4 @@ a cycle audio A cycle audio down c script-message osc-chapterlist 3; show-text "${osd-ass-cc/0}{\\an9}${osd-ass-cc/1}${chapter}" +C script-message osc-playlist 3; diff --git a/dotfiles/.config/sway/desktopslav b/dotfiles/.config/sway/desktopslav index 1c76233..df96ccd 100644 --- a/dotfiles/.config/sway/desktopslav +++ b/dotfiles/.config/sway/desktopslav @@ -4,6 +4,7 @@ # Outputs output "HDMI-A-2" background ~/.config/wall2.png fill +output "HDMI-A-1" background ~/.config/wall1.png fill output "HDMI-A-1" pos 0 0 output "HDMI-A-2" pos 1920 0 diff --git a/dotfiles/.config/swaylock/config b/dotfiles/.config/swaylock/config index 4f36d70..2082a1f 100644 --- a/dotfiles/.config/swaylock/config +++ b/dotfiles/.config/swaylock/config @@ -22,10 +22,11 @@ text-ver-color=#e5e9f0 text-wrong-color=#1d2021 text-clear-color=#1d2021 -fade-in=1 +fade-in=.3 clock indicator screenshots datestr=%a, %F +effect-pixelate=8 effect-blur=12x3 layout-bg-color=#000000bb diff --git a/dotfiles/.local/bin/barweather b/dotfiles/.local/bin/barweather index 1fd2c6c..3fc7f42 100755 --- a/dotfiles/.local/bin/barweather +++ b/dotfiles/.local/bin/barweather @@ -1,7 +1,7 @@ #!/bin/sh cachefile="$HOME/.cache/weather" -location="Saint Petersburg" +location="Saint-Petersburg" update_freq=1800 obsolete_after=10800 diff --git a/dotfiles/.local/bin/cstart b/dotfiles/.local/bin/cstart new file mode 100755 index 0000000..1ff4580 --- /dev/null +++ b/dotfiles/.local/bin/cstart @@ -0,0 +1,64 @@ +#!/bin/sh + +# Yaroslav de la Peña Smirnov 2021 +# Script for starting a new C project with the following layout: +# ├── include +# ├── src +# ├── Makefile +# └── README.md + +if [ -z "$1" ]; then + echo "Specify the name of the project" 1>&2 + exit 1 +fi + +projname="$1" +projupper="$(printf "%s" "$projname" | tr '[a-z]' '[A-Z]')" + +printf "CFLAGS?=-std=gnu99 -O2 -Wall +CC?=gcc +RM:=rm -rf + +SRC_DIR:=src +OBJ_DIR:=obj +INC_DIRS=\$(addprefix -iquote,include) +LIBS:= + +%s_SOURCES:=\$(wildcard \$(SRC_DIR)/*.c) +%s_OBJECTS:=\$(%s_SOURCES:%%.c=\$(OBJ_DIR)/%%.o) +BUILD_DIR:=build + +all: \$(BUILD_DIR) %s + +%s: \$(%s_OBJECTS) + \$(CC) \$(LIBS) \$(LDFLAGS) -o \$(BUILD_DIR)/\$@ \$^ + +\$(OBJ_DIR)/%%.o: %%.c + \$(CC) -c \$(CFLAGS) -I\$(INCLUDE_DIR) \$(INC_DIRS) -o \$@ \$< + +\$(BUILD_DIR): + mkdir -p \$(BUILD_DIR) + mkdir -p \$(OBJ_DIR)/src + +debug: CFLAGS := -O0 -g -DDEBUG +debug: all + +clean: + \$(RM) \$(%s_OBJECTS) + \$(RM) \$(BUILD_DIR)/* + +.PHONY: clean all debug test + +.PRECIOUS: \$(OBJ_DIR)/%%.o +" \ + $projupper \ + $projupper \ + $projupper \ + $projname \ + $projname \ + $projupper \ + $projupper \ + >> Makefile + +mkdir -p src include +printf "# %s\n" $projname >> README.md diff --git a/dotfiles/.local/bin/pacupgrade b/dotfiles/.local/bin/pacupgrade index aa00575..564bb5b 100755 --- a/dotfiles/.local/bin/pacupgrade +++ b/dotfiles/.local/bin/pacupgrade @@ -11,7 +11,12 @@ fi touch ~/.cache/pacupdatelive killall -41 waybar -sudo pacman -Syu +if [ "$1" = "-a" ]; then + yay -Syu +else + sudo pacman -Syu +fi + rm -f ~/.cache/pacupdatelive killall -41 waybar diff --git a/dotfiles/.local/bin/weath b/dotfiles/.local/bin/weath index d644bfb..5d588bb 100755 --- a/dotfiles/.local/bin/weath +++ b/dotfiles/.local/bin/weath @@ -1,7 +1,7 @@ #!/bin/sh -location="Saint Petersburg" +location="Saint-Petersburg" [ -n "$1" ] && location=$1 -curl wttr.in/"$location" +curl "wttr.in/$location" |