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 0cdf109..75cd08e 100644 Binary files a/.gnupg/random_seed and b/.gnupg/random_seed differ diff --git a/.shell-aliases b/.shell-aliases new file mode 100644 index 0000000..821323a --- /dev/null +++ b/.shell-aliases @@ -0,0 +1,39 @@ +alias ls='ls --group-directories-first --color=auto -F' +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias cp="cp -i" # confirm before overwriting something +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +alias np='nano -w PKGBUILD' +alias more=less +alias ll='ls -lF' +alias lla='ls -laF' +alias la='ls -aF' +alias l='eza -l --icons --git -a' +alias lt='eza --tree --level=2 --long --icons --git' +alias cat=bat +alias yaourts='yaourt --color --pager -Ss' + +alias ..='cd ../' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' + +## GIT +alias ga='git add -p' +alias gadd='git add' +alias gb='git branch' +alias gba='git branch -a' +alias gc='git commit -m' +alias gca='git commit -a -m' +alias gco='git checkout' +alias gcoall='git checkout -- .' +alias gdiff='git diff' +alias glog='git log --graph --topo-order --pretty='\''%w(100,0,6)%C(yellow)%h%C(bold)%C(black)%d %C(cyan)%ar %C(green)%an%n%C(bold)%C(white)%s %N'\'' --abbrev-commit' +alias gp='git push origin HEAD' +alias gpu='git pull origin' +alias gre='git reset' +alias gst='git status' +#alias gobust='gobuster dir --wordlist ~/security/wordlists/diccnoext.txt --wildcard --url' +