From 7a42301beaf8628007157e05571599ee4ea9b374 Mon Sep 17 00:00:00 2001 From: Flo Date: Wed, 2 Jul 2025 00:33:47 +0200 Subject: [PATCH] update --- .config/tmux/plugins/catppuccin-tmux | 1 + .config/tmux/plugins/tmux-continuum | 1 + .config/tmux/plugins/tmux-floax | 1 + .config/tmux/plugins/tmux-fzf | 1 + .config/tmux/plugins/tmux-fzf-url | 1 + .config/tmux/plugins/tmux-resurrect | 1 + .config/tmux/plugins/tmux-sensible | 1 + .config/tmux/plugins/tmux-sessionx | 1 + .config/tmux/plugins/tmux-thumbs | 1 + .config/tmux/plugins/tmux-yank | 1 + .config/tmux/plugins/tpm | 1 + .config/tmux/scripts/cal.sh | 132 +++++++++++++++++++++++++++ .config/tmux/tmux.conf | 73 +++++++++++++++ .config/tmux/tmux.reset.conf | 40 ++++++++ .gnupg/random_seed | Bin 600 -> 600 bytes .shell-aliases | 39 ++++++++ 16 files changed, 295 insertions(+) create mode 160000 .config/tmux/plugins/catppuccin-tmux create mode 160000 .config/tmux/plugins/tmux-continuum create mode 160000 .config/tmux/plugins/tmux-floax create mode 160000 .config/tmux/plugins/tmux-fzf create mode 160000 .config/tmux/plugins/tmux-fzf-url create mode 160000 .config/tmux/plugins/tmux-resurrect create mode 160000 .config/tmux/plugins/tmux-sensible create mode 160000 .config/tmux/plugins/tmux-sessionx create mode 160000 .config/tmux/plugins/tmux-thumbs create mode 160000 .config/tmux/plugins/tmux-yank create mode 160000 .config/tmux/plugins/tpm create mode 100644 .config/tmux/scripts/cal.sh create mode 100644 .config/tmux/tmux.conf create mode 100644 .config/tmux/tmux.reset.conf create mode 100644 .shell-aliases diff --git a/.config/tmux/plugins/catppuccin-tmux b/.config/tmux/plugins/catppuccin-tmux new file mode 160000 index 0000000..e30336b --- /dev/null +++ b/.config/tmux/plugins/catppuccin-tmux @@ -0,0 +1 @@ +Subproject commit e30336b79986e87b1f99e6bd9ec83cffd1da2017 diff --git a/.config/tmux/plugins/tmux-continuum b/.config/tmux/plugins/tmux-continuum new file mode 160000 index 0000000..0698e8f --- /dev/null +++ b/.config/tmux/plugins/tmux-continuum @@ -0,0 +1 @@ +Subproject commit 0698e8f4b17d6454c71bf5212895ec055c578da0 diff --git a/.config/tmux/plugins/tmux-floax b/.config/tmux/plugins/tmux-floax new file mode 160000 index 0000000..61c7f46 --- /dev/null +++ b/.config/tmux/plugins/tmux-floax @@ -0,0 +1 @@ +Subproject commit 61c7f466b9a4ceed56f99d403250164170d586cd diff --git a/.config/tmux/plugins/tmux-fzf b/.config/tmux/plugins/tmux-fzf new file mode 160000 index 0000000..e91c1ae --- /dev/null +++ b/.config/tmux/plugins/tmux-fzf @@ -0,0 +1 @@ +Subproject commit e91c1ae55389f2b34480ea23df77682bdd51d735 diff --git a/.config/tmux/plugins/tmux-fzf-url b/.config/tmux/plugins/tmux-fzf-url new file mode 160000 index 0000000..16381dc --- /dev/null +++ b/.config/tmux/plugins/tmux-fzf-url @@ -0,0 +1 @@ +Subproject commit 16381dce1c30fedd75fc775f887be7ea6c7cbf55 diff --git a/.config/tmux/plugins/tmux-resurrect b/.config/tmux/plugins/tmux-resurrect new file mode 160000 index 0000000..cff343c --- /dev/null +++ b/.config/tmux/plugins/tmux-resurrect @@ -0,0 +1 @@ +Subproject commit cff343cf9e81983d3da0c8562b01616f12e8d548 diff --git a/.config/tmux/plugins/tmux-sensible b/.config/tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/.config/tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/.config/tmux/plugins/tmux-sessionx b/.config/tmux/plugins/tmux-sessionx new file mode 160000 index 0000000..42c1838 --- /dev/null +++ b/.config/tmux/plugins/tmux-sessionx @@ -0,0 +1 @@ +Subproject commit 42c18389e73b80381d054dd1005b8c9a66942248 diff --git a/.config/tmux/plugins/tmux-thumbs b/.config/tmux/plugins/tmux-thumbs new file mode 160000 index 0000000..ae91d5f --- /dev/null +++ b/.config/tmux/plugins/tmux-thumbs @@ -0,0 +1 @@ +Subproject commit ae91d5f7c0d989933e86409833c46a1eca521b6a diff --git a/.config/tmux/plugins/tmux-yank b/.config/tmux/plugins/tmux-yank new file mode 160000 index 0000000..acfd36e --- /dev/null +++ b/.config/tmux/plugins/tmux-yank @@ -0,0 +1 @@ +Subproject commit acfd36e4fcba99f8310a7dfb432111c242fe7392 diff --git a/.config/tmux/plugins/tpm b/.config/tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/.config/tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/.config/tmux/scripts/cal.sh b/.config/tmux/scripts/cal.sh new file mode 100644 index 0000000..c9b62ea --- /dev/null +++ b/.config/tmux/scripts/cal.sh @@ -0,0 +1,132 @@ +#!/bin/bash + +ALERT_IF_IN_NEXT_MINUTES=10 +ALERT_POPUP_BEFORE_SECONDS=10 +NERD_FONT_FREE="󱁕 " +NERD_FONT_MEETING="󰤙" + +get_attendees() { + attendees=$( + icalBuddy \ + --includeEventProps "attendees" \ + --propertyOrder "datetime,title" \ + --noCalendarNames \ + --dateFormat "%A" \ + --includeOnlyEventsFromNowOn \ + --limitItems 1 \ + --excludeAllDayEvents \ + --separateByDate \ + --excludeEndDates \ + --bullet "" \ + --excludeCals "training,anderer" \ + eventsToday + ) +} + +parse_attendees() { + attendees_array=() + for line in $attendees; do + attendees_array+=("$line") + done + number_of_attendees=$((${#attendees_array[@]} - 3)) +} + +get_next_meeting() { + next_meeting=$(icalBuddy \ + --includeEventProps "title,datetime" \ + --propertyOrder "datetime,title" \ + --noCalendarNames \ + --dateFormat "%A" \ + --includeOnlyEventsFromNowOn \ + --limitItems 1 \ + --excludeAllDayEvents \ + --separateByDate \ + --bullet "" \ + --excludeCals "training,omerxx@gmail.com" \ + eventsToday) +} + +get_next_next_meeting() { + end_timestamp=$(date +"%Y-%m-%d ${end_time}:01 %z") + tonight=$(date +"%Y-%m-%d 23:59:00 %z") + next_next_meeting=$( + icalBuddy \ + --includeEventProps "title,datetime" \ + --propertyOrder "datetime,title" \ + --noCalendarNames \ + --dateFormat "%A" \ + --limitItems 1 \ + --excludeAllDayEvents \ + --separateByDate \ + --bullet "" \ + --excludeCals "training,omerxx@gmail.com" \ + eventsFrom:"${end_timestamp}" to:"${tonight}" + ) +} + +parse_result() { + array=() + for line in $1; do + array+=("$line") + done + time="${array[2]}" + end_time="${array[4]}" + title="${array[*]:5:30}" +} + +calculate_times() { + epoc_meeting=$(date -j -f "%T" "$time:00" +%s) + epoc_now=$(date +%s) + epoc_diff=$((epoc_meeting - epoc_now)) + minutes_till_meeting=$((epoc_diff / 60)) +} + +display_popup() { + tmux display-popup \ + -S "fg=#eba0ac" \ + -w50% \ + -h50% \ + -d '#{pane_current_path}' \ + -T meeting \ + icalBuddy \ + --propertyOrder "datetime,title" \ + --noCalendarNames \ + --formatOutput \ + --includeEventProps "title,datetime,notes,url,attendees" \ + --includeOnlyEventsFromNowOn \ + --limitItems 1 \ + --excludeAllDayEvents \ + --excludeCals "training" \ + eventsToday +} + +print_tmux_status() { + if [[ $minutes_till_meeting -lt $ALERT_IF_IN_NEXT_MINUTES && + $minutes_till_meeting -gt -60 ]]; then + echo "$NERD_FONT_MEETING \ + $time $title ($minutes_till_meeting minutes)" + else + echo "$NERD_FONT_FREE" + fi + + if [[ $epoc_diff -gt $ALERT_POPUP_BEFORE_SECONDS && epoc_diff -lt $ALERT_POPUP_BEFORE_SECONDS+10 ]]; then + display_popup + fi +} + +main() { + get_attendees + parse_attendees + get_next_meeting + parse_result "$next_meeting" + calculate_times + if [[ "$next_meeting" != "" && $number_of_attendees -lt 2 ]]; then + get_next_next_meeting + parse_result "$next_next_meeting" + calculate_times + fi + print_tmux_status + # echo "$minutes_till_meeting | $number_of_attendees" +} + +main diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..32d6d81 --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,73 @@ +source-file ~/.config/tmux/tmux.reset.conf +set-option -g default-terminal 'screen-256color' +set-option -g terminal-overrides ',xterm-256color:RGB' + +set -g prefix ^A +set -g base-index 1 # start indexing windows at 1 instead of 0 +set -g detach-on-destroy off # don't exit from tmux when closing a session +set -g escape-time 0 # zero-out escape time delay +set -g history-limit 1000000 # increase history size (from 2,000) +set -g renumber-windows on # renumber all windows when any window is closed +set -g set-clipboard on # use system clipboard +set -g status-position top # macOS / darwin style +set -g default-terminal "${TERM}" +setw -g mode-keys vi +set -g pane-active-border-style 'fg=magenta,bg=default' +set -g pane-border-style 'fg=brightblack,bg=default' + +set -g @fzf-url-fzf-options '-p 60%,30% --prompt=" " --border-label=" Open URL "' +set -g @fzf-url-history-limit '2000' + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'fcsonline/tmux-thumbs' +set -g @plugin 'sainnhe/tmux-fzf' +set -g @plugin 'wfxr/tmux-fzf-url' +set -g @plugin 'omerxx/catppuccin-tmux' # My fork that holds the meetings script bc I'm lazy af +set -g @plugin 'omerxx/tmux-sessionx' +set -g @plugin 'omerxx/tmux-floax' +set -g @floax-width '80%' +set -g @floax-height '80%' +set -g @floax-border-color 'magenta' +set -g @floax-text-color 'blue' +set -g @floax-bind 'p' +set -g @floax-change-path 'true' +set -g @sessionx-bind-zo-new-window 'ctrl-y' +set -g @sessionx-auto-accept 'off' +set -g @sessionx-custom-paths '/home/user/simone/dotfiles' +set -g @sessionx-bind 'o' +set -g @sessionx-x-path '~/dotfiles' +set -g @sessionx-window-height '85%' +set -g @sessionx-window-width '75%' +set -g @sessionx-zoxide-mode 'on' +set -g @sessionx-custom-paths-subdirectories 'false' +set -g @sessionx-filter-current 'false' +set -g @continuum-restore 'on' +set -g @resurrect-strategy-nvim 'session' +set -g @catppuccin_window_left_separator "" +set -g @catppuccin_window_right_separator " " +#set -g @catppuccin_window_right_separator "" +set -g @catppuccin_window_middle_separator " █" +#set -g @catppuccin_window_middle_separator " ▇" +set -g @catppuccin_window_number_position "right" +set -g @catppuccin_window_default_fill "number" +set -g @catppuccin_window_default_text "#W" +set -g @catppuccin_window_current_fill "number" +set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}" +set -g @catppuccin_status_modules_right "directory date_time" +set -g @catppuccin_status_modules_left "session" +set -g @catppuccin_status_left_separator " " +set -g @catppuccin_status_right_separator " " +set -g @catppuccin_status_right_separator_inverse "no" +set -g @catppuccin_status_fill "icon" +set -g @catppuccin_status_connect_separator "no" +set -g @catppuccin_directory_text "#{b:pane_current_path}" +set -g @catppuccin_meetings_text "#($HOME/.config/tmux/scripts/cal.sh)" +set -g @catppuccin_date_time_text "%H:%M" + +run '/usr/share/tmux-plugin-manager/tpm' +# NOTE: in tmux '^a I' um all plugins zu installieren + diff --git a/.config/tmux/tmux.reset.conf b/.config/tmux/tmux.reset.conf new file mode 100644 index 0000000..27783a9 --- /dev/null +++ b/.config/tmux/tmux.reset.conf @@ -0,0 +1,40 @@ +# First remove *all* keybindings +# unbind-key -a +# Now reinsert all the regular tmux keys +bind ^X lock-server +bind ^C new-window -c "$HOME" +bind ^D detach +bind * list-clients + +bind H previous-window +bind L next-window + +bind r command-prompt "rename-window %%" +bind R source-file ~/.config/tmux/tmux.conf +bind ^A last-window +bind ^W list-windows +bind w list-windows +bind z resize-pane -Z +bind ^L refresh-client +bind l refresh-client +bind | split-window +bind s split-window -v -c "#{pane_current_path}" +bind v split-window -h -c "#{pane_current_path}" +bind '"' choose-window +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R +bind -r -T prefix , resize-pane -L 20 +bind -r -T prefix . resize-pane -R 20 +bind -r -T prefix - resize-pane -D 7 +bind -r -T prefix = resize-pane -U 7 +bind : command-prompt +bind * setw synchronize-panes +bind P set pane-border-status +bind c kill-pane +bind x swap-pane -D +bind S choose-session +bind R source-file ~/.config/tmux/tmux.conf +bind K send-keys "clear"\; send-keys "Enter" +bind-key -T copy-mode-vi v send-keys -X begin-selection diff --git a/.gnupg/random_seed b/.gnupg/random_seed index 0cdf1091d59f7c74fad4bfee3552df1a4f34eb57..75cd08ece7f12cbe17be3ad9179b1f18c117dbe1 100644 GIT binary patch literal 600 zcmZ?fk#s-vxAjxOF4ge2&-QNTeKp-z)W>?|kxsADBeFL_pI!;8V%#;$^37Mnx-x;*XU6rt z_wK76`3~=sd;G0kJzWc*tZ4QU-F;_!`_3}xeX?m)zH#*6{=lw(`!#3JY4Me5 z3%gV7wPDMfjLH0Gb54AoaXjBB)Uzg{2Y?sB^WihrD1729HdaC_Bx{*~+fXMbDDVQ8_<#rE|s zZKZ|N-(?A%D7`;3@W&t4$a5P*8#l`;i?n3_aY&watGiI;+L`8>+J>{d?_Wo)m?P9F z!1f@FKV)HQ&wSY$Gt0$Gp1kp8u{?Kg%k+Jx-+6wv+b2Bf)I|2(`xeaeG&sZ^C%0co z_tC%o)}QJax75ab*}cb4NO)jmD<%xf2ZI9KMGy|GVR?`f4iD`a~n-M%0_t?___XLkHofnIjb+7 z&o{})ICY+hKj+QwNfxd#f4by~{qJqhU`=Vh?e@e(<8`4fclepi4AV(>m&$D5pHd-s S+d#wU>yed40c)n1&j0}0>ofEK literal 600 zcmbQq+cG1OVPTz*rB>{kFHA>*#b-}?{Qd25oe5qRf7S`rY2ACh|EtpeI{iD5FIjRL zugI`Eq#r$;yuv%8ujzjPt!Q)g^ze)*5f^o|-a;r&4;4N>{@n z6Ui4`0$2YBzVlrhcw~9_lr_hCbkx>eP`T*)jr(`GvQBV)|A`y(XDMfYm;WKfregQB z?9&?v^{QX@$?M78IvdXDT~Km|SxM*A*AJfNee({v z6nv=tBY&`H?eq7W