From 7c48d260e3e6b19d60a3cd1ed8b194913e7536dd Mon Sep 17 00:00:00 2001 From: 2ndbeam <2ndbeam@disroot.org> Date: Sat, 4 Jul 2026 19:34:42 +0300 Subject: [PATCH] very outdated but a bit less outdated than it was before --- .config/i3blocks/config | 23 +++++++++++++ .config/i3blocks/scripts/battery | 16 +++++++++ .config/i3blocks/scripts/mpd | 13 +++++++ .config/i3blocks/scripts/time | 7 ++++ .config/kitty/kitty.conf | 4 +-- .config/mpd/mpd.conf | 28 +++++++++++++++ .config/sway/config | 29 +++++++++++----- .config/wal/templates/aliveline.toml | 45 +++++++++++++++++++++++++ .config/wal/{ => templates}/mako-config | 0 .config/wofi/config | 2 +- utils/wal.sh | 6 ++-- 11 files changed, 159 insertions(+), 14 deletions(-) create mode 100644 .config/i3blocks/config create mode 100755 .config/i3blocks/scripts/battery create mode 100755 .config/i3blocks/scripts/mpd create mode 100755 .config/i3blocks/scripts/time create mode 100644 .config/mpd/mpd.conf create mode 100644 .config/wal/templates/aliveline.toml rename .config/wal/{ => templates}/mako-config (100%) diff --git a/.config/i3blocks/config b/.config/i3blocks/config new file mode 100644 index 0000000..2b5b932 --- /dev/null +++ b/.config/i3blocks/config @@ -0,0 +1,23 @@ +# i3blocks configuration file +# +# The i3blocks man page describes the usage of the binary, +# and its website describes the configuration: +# +# https://vivien.github.io/i3blocks + + +# Global properties +separator=true +separator_block_width=15 +colors_script= +command=~/.config/i3blocks/scripts/$BLOCK_NAME + +[battery] +interval=60 + +[mpd] +interval=1 + +[time] +interval=1 + diff --git a/.config/i3blocks/scripts/battery b/.config/i3blocks/scripts/battery new file mode 100755 index 0000000..ca0a339 --- /dev/null +++ b/.config/i3blocks/scripts/battery @@ -0,0 +1,16 @@ +#!/usr/bin/bash +source ~/.cache/wal/colors.sh + +charge=$(acpi -b | cut -d ' ' -f 4 | tr -d % | tr -d ,) + +if [ $charge -lt 20 ]; then + color=$color10 +elif [ $charge -lt 75 ]; then + color=$color11 +else + color=$color14 +fi + +echo ⚡ $charge% +echo ⚡ $charge% +echo $color diff --git a/.config/i3blocks/scripts/mpd b/.config/i3blocks/scripts/mpd new file mode 100755 index 0000000..8bb11ea --- /dev/null +++ b/.config/i3blocks/scripts/mpd @@ -0,0 +1,13 @@ +#!/usr/bin/bash +source ~/.cache/wal/colors.sh + +if [ "$(mpc current)" != "" ]; then + mpc -f "♪ $(mpc status "%artist% - %title% (%currenttime%/%totaltime%)" | tr -d '\n')" | sed -n 1p + mpc -f "♪ $(mpc status "%title% %currenttime%/%totaltime%" | tr -d '\n')" | sed -n 1p + echo $foreground +else + echo "♪ not playing" + echo "♪ not playing" + echo $color9 +fi + diff --git a/.config/i3blocks/scripts/time b/.config/i3blocks/scripts/time new file mode 100755 index 0000000..0f4b6ce --- /dev/null +++ b/.config/i3blocks/scripts/time @@ -0,0 +1,7 @@ +#!/usr/bin/bash +source ~/.cache/wal/colors.sh + +printf '🕛 ' +date '+%Y-%m-%d %H:%M:%S' +date '+%H:%M:%S' +echo $foreground diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index c3ab09e..9475259 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -16,5 +16,5 @@ editor nvim map kitty_mod+h previous_tab map kitty_mod+l next_tab -background_image ~/Pictures/thornythorny.png -background_image_layout centered +#background_image ~/Pictures/thornythorny.png +#background_image_layout centered diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf new file mode 100644 index 0000000..f22eda9 --- /dev/null +++ b/.config/mpd/mpd.conf @@ -0,0 +1,28 @@ +music_directory "~/Music" +db_file "~/.config/mpd/database" +state_file "~/.config/mpd/statefile" +playlist_directory "~/.config/mpd/playlists" +user "secondbeam" +group "secondbeam" + +bind_to_address "0.0.0.0" + +audio_output { + type "pulse" + name "pulse audio" +} + +audio_output { + type "fifo" + name "cava" + path "/tmp/mpd.fifo" +} + +audio_output { + type "httpd" + name "HTTP" + encoder "lame" + port "8006" + bitrate "320" + format "44100:16:2" +} diff --git a/.config/sway/config b/.config/sway/config index 3109d85..42869b1 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -16,26 +16,34 @@ font FantasqueSansMNerdFont Regular 12 include "$HOME/.cache/wal/colors-sway" +exec XDG_CURRENT_DESKTOP=sway && systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec /usr/lib/pam_kwallet_init + ### Output configuration # output * bg $wallpaper fill # Primary output -output eDP-1 { +output eDP-2 { adaptive_sync on mode 1920x1080@144Hz - pos 1920 0 + pos 0 0 +# pos 1920 0 } # Secondary output output HDMI-A-1 { mode 1920x1080@60Hz - pos 0 0 + pos 1920 0 +# pos 0 0 } +#exec easyeffects + ### Idle configuration # -#exec swayidle -w \ +exec swayidle -w \ # timeout 600 'swaylock -f -c 000000' \ -# timeout 1200 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + timeout 1200 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' #\ # before-sleep 'swaylock -f -c 000000' ### Input configuration @@ -206,8 +214,11 @@ bindsym $mod+r mode "resize" bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ # Special key to take a screenshot with grim - bindsym Print exec grim -g '1920,0 1920x1080' - | wl-copy - bindsym $mod+Shift+s exec slurp | grim -g - - | wl-copy + bindsym Print exec grim -g '0,0 1920x1080' - | wl-copy && wl-paste > ~/screenshot.png + bindsym $mod+Shift+s exec slurp | grim -g - - | wl-copy && wl-paste > ~/screenshot.png + + bindsym $mod+KP_ENTER exec easyeffects -l default + bindsym XF86Calculator exec easyeffects -l radio client.focused $color7 $color14 $color15 client.focused_inactive $color0 $color0 $color10 @@ -223,7 +234,9 @@ bar { # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. - status_command while echo "$(mpc current | tr -d '\n') / A $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f 6) / B $(brightnessctl -m | cut -d , -f 4) / $(date +'D %Y-%m-%d / T %T /')"; do sleep 1; done + #status_command while echo "$(mpc current | tr -d '\n') / A $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f 6) / B $(brightnessctl -m | cut -d , -f 4) / $(date +'D %Y-%m-%d / T %T /')"; do sleep 1; done + status_command i3blocks + #status_command 2>/tmp/i3blocks.err i3blocks -vvv | tee /tmp/i3blocks.out colors { statusline $foreground diff --git a/.config/wal/templates/aliveline.toml b/.config/wal/templates/aliveline.toml new file mode 100644 index 0000000..75a9bab --- /dev/null +++ b/.config/wal/templates/aliveline.toml @@ -0,0 +1,45 @@ +[paths] +logs = "logs" + +[colors.aliases] +background = 0xFF{background.strip} +foreground = 0xFF{color8.strip} +black = 0xFF_000000 +white = 0xFF_FFFFFF +text = 0xFF{color15.strip} +color1 = 0xFF{color1.strip} +color2 = 0xFF{color2.strip} +color3 = 0xFF{color3.strip} +color4 = 0xFF{color4.strip} +color5 = 0xFF{color5.strip} +color6 = 0xFF{color6.strip} +color7 = 0xFF{color7.strip} +color9 = 0xFF{color9.strip} +color10 = 0xFF{color10.strip} +color11 = 0xFF{color11.strip} +color12 = 0xFF{color12.strip} +color13 = 0xFF{color13.strip} +color14 = 0xFF{color14.strip} + +[colors] +background = "background" +timeline = "foreground" +text = "text" +fallback = "white" + +events = [ + {{ background = "color1" }}, + {{ background = "color2", priority = 4 }}, + {{ background = "color3" }}, + {{ background = "color4" }}, + {{ background = "color5" }}, + {{ background = "color6" }}, + {{ background = "color7" }}, + {{ background = "color9" }}, + {{ background = "color10", priority = 4 }}, + {{ background = "color11" }}, + {{ background = "color12" }}, + {{ background = "color13" }}, + {{ background = "color14" }}, + {{ background = "color15" }}, +] diff --git a/.config/wal/mako-config b/.config/wal/templates/mako-config similarity index 100% rename from .config/wal/mako-config rename to .config/wal/templates/mako-config diff --git a/.config/wofi/config b/.config/wofi/config index e8c1ba2..51e0aa4 100644 --- a/.config/wofi/config +++ b/.config/wofi/config @@ -1,5 +1,5 @@ width=100% -height=8% +height=11% location=top insensitive=true matching=fuzzy diff --git a/utils/wal.sh b/utils/wal.sh index 1e69ed7..11d4707 100755 --- a/utils/wal.sh +++ b/utils/wal.sh @@ -1,10 +1,10 @@ #!/usr/bin/bash wal --cols16 -i $1 -walogram -pywalfox update +#walogram +#pywalfox update magick thornythorny_in.png -channel RGB +level-colors "$(cat ~/.cache/wal/colors | sed -n 3p)" -background none -gravity NorthEast -extent 960x540 -gravity Center -extent 1920x1080 ~/Pictures/thornythorny.png makoctl reload -pywal-discord -t material +#pywal-discord -t material for pid in $(pidof /usr/bin/kitty); do kill -SIGUSR1 $pid