From d1c94d50ff2335882ae51aa39adefd62363db91a Mon Sep 17 00:00:00 2001 From: fz0x1 Date: Fri, 15 Nov 2024 11:25:55 +0100 Subject: [PATCH] 20241115 --- global/.zshrc | 42 ----------------- global/.zshrc-secrets | Bin 222 -> 331 bytes linux/.config/dunst/dunstrc | 1 + linux/.config/i3/config | 32 ++++++------- linux/.config/polybar/config.ini | 9 +++- .../polybar/rest_timer_module/config.sh | 2 + .../rest_timer_module/reset_rest_timer.sh | 5 ++ .../polybar/rest_timer_module/rest_timer.sh | 24 ++++++++++ linux/.config/solaar/config.yaml | 15 ++++++ linux/.zshenv | 43 ++++++++++++++++++ 10 files changed, 114 insertions(+), 59 deletions(-) create mode 100755 linux/.config/polybar/rest_timer_module/config.sh create mode 100755 linux/.config/polybar/rest_timer_module/reset_rest_timer.sh create mode 100755 linux/.config/polybar/rest_timer_module/rest_timer.sh create mode 100644 linux/.zshenv diff --git a/global/.zshrc b/global/.zshrc index 0af178d..d3a750a 100644 --- a/global/.zshrc +++ b/global/.zshrc @@ -125,57 +125,15 @@ alias s_ledger="cd ~/PKM/ledger/ && git commit -am \"\$(date +%Y%m%d)\" && git p ## screenshots alias scrn="screenshot.sh" -# Preferred editor for local and remote sessions -export EDITOR='nvim' - # bindkeys ## autosuggest bindkey "^]" autosuggest-accept -# envs -export DISABLE_AUTO_TITLE='true' -## fzf dracula theme -export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' ---color=dark ---color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f ---color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7' - # paths ## rust if [[ -e "$HOME/.cargo/env" ]]; then source $HOME/.cargo/env fi -## all from local/bin -export PATH=$PATH:$HOME/.local/bin -## pdtm -export PATH=$PATH:$HOME/.pdtm/go/bin -## doom emacs -export PATH=$PATH:$HOME/.config/emacs/bin -## golang -export GOPATH=$HOME/go # don't forget to change your path correctly! -export PATH=$PATH:$GOPATH/bin -export PATH=$PATH:/usr/local/go/bin -## cargo -export PATH=$PATH:$HOME/.cargo/bin -## color -export TERM=tmux-256color -## default gui browser -# export BROWSER="firefox" -## hledger -# export LEDGER_FILE=~/PKM/ledger/2024.journal - -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -export VOLTA_HOME="$HOME/.volta" -export PATH="$VOLTA_HOME/bin:$PATH" - -export DENO_INSTALL="$HOME/.deno" -export PATH="$DENO_INSTALL/bin:$PATH" - -export CUSTOM_SCRIPTS="$HOME/scripts" -export PATH="$CUSTOM_SCRIPTS/bin:$PATH" - -GPG_TTY=$(tty) -export GPG_TTY source $HOME/.zshrc-additional source $HOME/.zshrc-secrets diff --git a/global/.zshrc-secrets b/global/.zshrc-secrets index 90821bbe5ee3d187bb93faa5144a6010d0e0f7cc..4559a48f44a7536d57f67f41ab00a13ce3eb0908 100644 GIT binary patch literal 331 zcmV-R0kr-AM@dveQdv+`0Db0DdfI^IMZz$k6RcN@ky|l#k59ZDOmT5Q(ry(~Hi3;a z)?pm%{iRhmA)G7bz=mzhu~&<8zIJ=-I2WUWga8vb?}f*dg;DLEGz6pQucDYxL?L2l(&hipbe^-5 dubzPO^b~&Kqwfn@r5Y`m(7eQH(GejN&^kmtr0xI! literal 222 zcmV<403rVXM@dveQdv+`0O)(C6ZXc5pV_T;Zxh65%?jVJA#QLvC~WCt6aE<;(uCt0 zeNJfX0k72^th%>ubN61`?UVwJyJ5n7-FDg`vQZ`W-C#j71yG|D6h_kYq@umToMNgc zT@0>0rv%0npWmPZYcc}XD$v$D9RaprKq3WMj9Q`SNUMRMHz!!+Dqe YBn)-mAy%p2T!_0%mDdSw4*o#us|gWnJpcdz diff --git a/linux/.config/dunst/dunstrc b/linux/.config/dunst/dunstrc index e0bc10e..d9dd908 100644 --- a/linux/.config/dunst/dunstrc +++ b/linux/.config/dunst/dunstrc @@ -1,6 +1,7 @@ [global] font = "JetBrainsMono Nerd Font 10" separator_color= frame +markup = full [urgency_low] background = "#1d2021" diff --git a/linux/.config/i3/config b/linux/.config/i3/config index ec85f2f..eb8bd94 100644 --- a/linux/.config/i3/config +++ b/linux/.config/i3/config @@ -28,24 +28,21 @@ font pango:monospace 8 # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -#exec --no-startup-id nm-applet - -# restoring workspaces -# exec --no-startup-id "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace_1.json'" -# exec --no-startup-id "i3-msg 'workspace 2; append_layout ~/.config/i3/workspaces/workspace_2.json'" -# exec --no-startup-id "i3-msg 'workspace 3; append_layout ~/.config/i3/workspaces/workspace_3.json'" -# exec --no-startup-id "i3-msg 'workspace 4; append_layout ~/.config/i3/workspaces/workspace_4.json'" +exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.config/i3/i3lock --nofork +exec --no-startup-id xss-lock -- ~/.config/i3/i3lock --nofork # Use pactl to adjust volume in PulseAudio. # set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +# bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +# bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use wpctl to adjust volume in PipeWire +bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+ && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%- && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && $refresh_i3status # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -177,7 +174,10 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu # i3lock bindsym $mod+Shift+x exec --no-startup-id ~/.config/i3/i3lock # screen -bindsym $mod+Shift+s exec --no-startup-id ~/scripts/bin/screenshot.sh full +bindsym $mod+Control+s exec --no-startup-id ~/scripts/bin/screenshot.sh region +bindsym $mod+Control+f exec --no-startup-id ~/scripts/bin/screenshot.sh full +# bwmenu +bindsym $mod+Control+p exec --no-startup-id ~/bin/bwmenu # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode diff --git a/linux/.config/polybar/config.ini b/linux/.config/polybar/config.ini index 91fde34..2f1c8f0 100644 --- a/linux/.config/polybar/config.ini +++ b/linux/.config/polybar/config.ini @@ -83,7 +83,7 @@ font-2 = "Font Awesome 6 Free" ; font-2 = JetBrainsMono Nerd Font Mono:size=21:style=Regular;2 modules-left = i3 xwindow -modules-right = pulseaudio xkeyboard wlan systray date +modules-right = rest_timer pulseaudio xkeyboard wlan systray date cursor-click = pointer cursor-scroll = ns-resize @@ -298,6 +298,13 @@ bar-empty = ─ ; click-left = blueman-manager ; content = "bt" +[module/rest_timer] +type = custom/script +exec = ~/.config/polybar/rest_timer_module/rest_timer.sh +; interval = 1 +tail = true +click-left = ~/.config/polybar/rest_timer_module/reset_rest_timer.sh & + [settings] screenchange-reload = true pseudo-transparency = true diff --git a/linux/.config/polybar/rest_timer_module/config.sh b/linux/.config/polybar/rest_timer_module/config.sh new file mode 100755 index 0000000..a467d5e --- /dev/null +++ b/linux/.config/polybar/rest_timer_module/config.sh @@ -0,0 +1,2 @@ +TOTAL_MINUTES=40 +STATE_REST_TIMER="/tmp/state_rest_timer_polybar" diff --git a/linux/.config/polybar/rest_timer_module/reset_rest_timer.sh b/linux/.config/polybar/rest_timer_module/reset_rest_timer.sh new file mode 100755 index 0000000..a6c792f --- /dev/null +++ b/linux/.config/polybar/rest_timer_module/reset_rest_timer.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +source ~/.config/polybar/rest_timer_module/config.sh + +echo $(("$TOTAL_MINUTES" * 60)) >"$STATE_REST_TIMER" diff --git a/linux/.config/polybar/rest_timer_module/rest_timer.sh b/linux/.config/polybar/rest_timer_module/rest_timer.sh new file mode 100755 index 0000000..9dc4e31 --- /dev/null +++ b/linux/.config/polybar/rest_timer_module/rest_timer.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +source ~/.config/polybar/rest_timer_module/config.sh +if [[ ! -f "$STATE_REST_TIMER" ]]; then + echo $(("$TOTAL_MINUTES" * 60)) >"$STATE_REST_TIMER" +fi +# END_TIME=$(($(date +%s) + TIMER)) + +REMAINING=$(cat "$STATE_REST_TIMER") + +if [[ $REMAINING -le 0 ]]; then + echo "%{F#FF0000}Time to rest!%{F-}" + # rm "$STAT_REST_TIMER" + exit 0 +fi + +MINUTES=$((REMAINING / 60)) +SECONDS=$((REMAINING % 60)) +printf "%02d:%02d\n" $MINUTES $SECONDS + +REMAINING=$((REMAINING - 1)) +echo $REMAINING >"$STATE_REST_TIMER" + +sleep 1 diff --git a/linux/.config/solaar/config.yaml b/linux/.config/solaar/config.yaml index 72f13b8..afc5a2b 100644 --- a/linux/.config/solaar/config.yaml +++ b/linux/.config/solaar/config.yaml @@ -44,3 +44,18 @@ pointer_speed: 160 reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 91: 91, 93: 93, 237: 237} speed-change: 0 +- _NAME: 'MX Ergo Multi-Device Trackball ' + _absent: [hi-res-scroll, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert, thumb-scroll-mode, + onboard_profiles, report_rate, report_rate_extended, dpi, dpi_extended, backlight, backlight_level, backlight_duration_hands_out, backlight_duration_hands_in, + backlight_duration_powered, backlight-timed, led_control, led_zone_, rgb_control, rgb_zone_, brightness_control, per-key-lighting, fn-swap, disable-keyboard-keys, + crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, multiplatform, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, + adc_power_management] + _battery: 4096 + _modelId: 'MX Ergo Multi-Device Trackball ' + change-host: null + divert-keys: {82: 0, 83: 0, 86: 0, 91: 0, 93: 0, 237: 0} + lowres-scroll-mode: false + persistent-remappable-keys: null + pointer_speed: 180 + reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 91: 91, 93: 93, 237: 237} + speed-change: 0 diff --git a/linux/.zshenv b/linux/.zshenv new file mode 100644 index 0000000..af8f712 --- /dev/null +++ b/linux/.zshenv @@ -0,0 +1,43 @@ +# Preferred editor for local and remote sessions +export EDITOR='nvim' +# envs +export DISABLE_AUTO_TITLE='true' +## fzf dracula theme +export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' +--color=dark +--color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f +--color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7' +## all from local/bin +export PATH=$PATH:$HOME/.local/bin +## pdtm +export PATH=$PATH:$HOME/.pdtm/go/bin +## doom emacs +export PATH=$PATH:$HOME/.config/emacs/bin +## golang +export GOPATH=$HOME/go # don't forget to change your path correctly! +export PATH=$PATH:$GOPATH/bin +export PATH=$PATH:/usr/local/go/bin +## cargo +export PATH=$PATH:$HOME/.cargo/bin +## color +export TERM=tmux-256color +## default gui browser +# export BROWSER="firefox" +## hledger +# export LEDGER_FILE=~/PKM/ledger/2024.journal + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +export VOLTA_HOME="$HOME/.volta" +export PATH="$VOLTA_HOME/bin:$PATH" + +export DENO_INSTALL="$HOME/.deno" +export PATH="$DENO_INSTALL/bin:$PATH" + +export CUSTOM_SCRIPTS="$HOME/scripts" +export PATH="$CUSTOM_SCRIPTS/bin:$PATH" + +export USER_BIN="$HOME/bin" +export PATH="$USER_BIN:$PATH" + +GPG_TTY=$(tty) +export GPG_TTY