From f939a3d5bdc36de34ea1a1e96c1e74ea1ffd8299 Mon Sep 17 00:00:00 2001 From: Stuce Date: Sun, 19 Oct 2025 15:18:28 +0200 Subject: [PATCH] . --- config/i3status-rust/desktop-config.toml | 39 ++++++++++++++++++++++ config/i3status-rust/laptop-config.toml | 42 ++++++++++++++++++++++++ config/mako/config | 1 + home/.bashrc | 13 ++++++++ scripts/background | 26 +++++++++++++++ scripts/fzfub.sh | 25 ++++++++++++++ scripts/meteo | 4 +++ 7 files changed, 150 insertions(+) create mode 100644 config/i3status-rust/desktop-config.toml create mode 100644 config/i3status-rust/laptop-config.toml create mode 100644 config/mako/config create mode 100644 home/.bashrc create mode 100755 scripts/background create mode 100755 scripts/fzfub.sh create mode 100755 scripts/meteo diff --git a/config/i3status-rust/desktop-config.toml b/config/i3status-rust/desktop-config.toml new file mode 100644 index 0000000..08a1ac8 --- /dev/null +++ b/config/i3status-rust/desktop-config.toml @@ -0,0 +1,39 @@ +[[block]] +block = "net" +format = " $icon {$signal_strength $ssid|Wired connection}" +interval = 10 + +[[block]] +block = "disk_space" +interval = 300 + +[[block]] +block = "memory" +format = " $icon $mem_used_percents" +interval = 30 + +[[block]] +block = "cpu" + +[[block]] +block = "sound" +max_vol = 150 +show_volume_when_muted = true + +[[block]] +block = "sound" +device_kind = "source" +max_vol = 150 +show_volume_when_muted = true + +[[block]] +block = "time" +format = " $timestamp.datetime(f:' %d/%m %R') " +interval = 60 + +[icons] +icons = "material-nf" + +[theme] +theme = "ctp-mocha" + diff --git a/config/i3status-rust/laptop-config.toml b/config/i3status-rust/laptop-config.toml new file mode 100644 index 0000000..4c5abd7 --- /dev/null +++ b/config/i3status-rust/laptop-config.toml @@ -0,0 +1,42 @@ +[[block]] +block = "battery" +interval = 30 + +[[block]] +block = "net" +format = " $icon {$signal_strength $ssid|Wired connection}" +interval = 10 + +[[block]] +block = "disk_space" +interval = 300 + +[[block]] +block = "memory" +format = " $icon $mem_used_percents" +interval = 30 + +[[block]] +block = "cpu" + +[[block]] +block = "sound" +max_vol = 150 +show_volume_when_muted = true + +[[block]] +block = "sound" +device_kind = "source" +max_vol = 150 +show_volume_when_muted = true + +[[block]] +block = "time" +format = " $timestamp.datetime(f:' %d/%m %R') " +interval = 60 + +[icons] +icons = "material-nf" + +[theme] +theme = "ctp-mocha" diff --git a/config/mako/config b/config/mako/config new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/config/mako/config @@ -0,0 +1 @@ + diff --git a/home/.bashrc b/home/.bashrc new file mode 100644 index 0000000..5a49aa2 --- /dev/null +++ b/home/.bashrc @@ -0,0 +1,13 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +PS1='[\u@\h \W]\$ ' + +export EDITOR=nvim +export PATH=/opt/or1k_toolchain/bin:$PATH diff --git a/scripts/background b/scripts/background new file mode 100755 index 0000000..4aa25fb --- /dev/null +++ b/scripts/background @@ -0,0 +1,26 @@ +#!/bin/sh +BACKGROUND_DIR="$HOME/dotfiles/backgrounds/" +case "$(uname -a)" in +*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;; +*) UEBERZUG_TMP_DIR="/tmp" ;; +esac + +cleanup() { + ueberzugpp cmd -s "$SOCKET" -a exit +} +trap cleanup HUP INT QUIT TERM EXIT + +UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)" +ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file "$UB_PID_FILE" +UB_PID=$(cat "$UB_PID_FILE") + +export SOCKET="$UEBERZUG_TMP_DIR"/ueberzugpp-"$UB_PID".socket + +# run fzf with preview +WALLPAPER=$(find $BACKGROUND_DIR -type f | fzf --reverse --preview="ueberzugpp cmd -s $SOCKET -i fzfpreview -a add \ + -x \$FZF_PREVIEW_LEFT -y \$FZF_PREVIEW_TOP \ + --max-width \$FZF_PREVIEW_COLUMNS --max-height \$FZF_PREVIEW_LINES \ + -f {}") + +hyprctl hyprpaper reload ,"$WALLPAPER" +ueberzugpp cmd -s "$SOCKET" -a exit diff --git a/scripts/fzfub.sh b/scripts/fzfub.sh new file mode 100755 index 0000000..5f849dd --- /dev/null +++ b/scripts/fzfub.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$(uname -a)" in +*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;; +*) UEBERZUG_TMP_DIR="/tmp" ;; +esac + +cleanup() { + ueberzugpp cmd -s "$SOCKET" -a exit +} +trap cleanup HUP INT QUIT TERM EXIT + +UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)" +ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file "$UB_PID_FILE" +UB_PID=$(cat "$UB_PID_FILE") + +export SOCKET="$UEBERZUG_TMP_DIR"/ueberzugpp-"$UB_PID".socket + +# run fzf with preview +fzf --reverse --preview="ueberzugpp cmd -s $SOCKET -i fzfpreview -a add \ + -x \$FZF_PREVIEW_LEFT -y \$FZF_PREVIEW_TOP \ + --max-width \$FZF_PREVIEW_COLUMNS --max-height \$FZF_PREVIEW_LINES \ + -f {}" + +ueberzugpp cmd -s "$SOCKET" -a exit diff --git a/scripts/meteo b/scripts/meteo new file mode 100755 index 0000000..e1436ab --- /dev/null +++ b/scripts/meteo @@ -0,0 +1,4 @@ +#!/bin/bash +locations="Vicques\nLausanne\nBern" +selected=$(echo -e $locations | fzf) +curl wttr.in/$selected