1
0

33 Commits

Author SHA1 Message Date
Luminiferous 731188fa52 Added cargo bin to path 2026-06-14 22:06:21 +02:00
Luminiferous ee3d625e66 Fixed typo in declaration 2026-06-10 22:15:15 +02:00
Luminiferous e2fd0adcc0 Rebuild Headset Power Toggle for new KVM 2026-06-08 21:19:52 +02:00
Luminiferous e67cc5b90c Added .local/bin to $env.PATH 2026-05-10 14:50:28 +02:00
Luminiferous b00cf98f97 Fixed Bitwarden SSH Socket 2026-05-09 21:31:40 +02:00
Luminiferous 275787b689 Update Bitwarden SSH Socket for the Bitwarden Flatpak Version 2026-05-09 21:20:45 +02:00
Luminiferous 46fed03268 Fixed Table behaviour and applied more compact theme 2026-04-16 21:43:13 +02:00
Luminiferous 8571495a53 Changed default editor to nvim 2026-04-14 12:38:23 +02:00
Luminiferous 814305c82d Fixed SSH Agent env variable 2026-02-18 16:16:05 +01:00
Luminiferous 6f3131bedc Uncomment Carapace test 2026-02-18 13:34:44 +01:00
Luminiferous 65fed10281 Added Carapace init to config.nu 2026-02-17 11:59:24 +01:00
Luminiferous 38555114b1 Replace system Editor with helix 2026-02-16 01:46:19 +01:00
Luminiferous 0d27c52f6e Added carapace 2026-02-14 16:14:59 +01:00
Luminiferous 2f43f25649 Fixed Hub for jlab-usb-power-toggle 2026-02-13 13:48:08 +01:00
Luminiferous de4aafdd80 Changed EDITOR and VISUAL variables to nvim 2025-10-11 13:25:28 +02:00
Luminiferous 482c639b30 Added jlab-usb-power-toggle 2025-09-09 20:42:48 +02:00
Luminiferous 1a651bb023 Merge branch 'nushell' of https://git.luminiferous.eu/Luminiferous/dotfiles into nushell 2025-08-12 16:16:21 +02:00
Luminiferous e2fe842098 Refactored lumen-assono-backup-nexttape to work for new tape scheme 2025-08-12 16:14:16 +02:00
Luminiferous 65ec0c8bf8 Fixed kwin-get-class countdown timer when starting on 0 2025-08-02 11:43:58 +02:00
Luminiferous 6793e4e0ae Set SSH Bitwarden env var to only trigger on non Windows Systems 2025-07-30 19:26:08 +02:00
Luminiferous ac8fc8529b Merge branch 'nushell' of https://git.luminiferous.eu/Luminiferous/dotfiles into nushell 2025-07-30 17:22:43 +02:00
Luminiferous e6b082f38c Changed to fully Functional Scripting for most scripts 2025-07-30 17:21:40 +02:00
Luminiferous 614a57652f Added Bitwarden SSH Agent to nushells env 2025-06-21 14:43:30 +02:00
Luminiferous 80a119972f Finished assono-backup-nexttape 2025-06-11 17:37:16 +02:00
Luminiferous 05d3aaa8dd Added backup-nexttape Work in Progress 2025-06-10 16:55:20 +02:00
Luminiferous 9afb3328ba Fixed Parameters 2025-06-10 16:55:03 +02:00
Luminiferous e866e94303 Added assono-overtime-calc 2025-06-10 11:30:44 +02:00
Luminiferous 283b4f0e56 Added kwin-get-class 2025-06-10 11:30:43 +02:00
Luminiferous 01035f61bd Moved Modules into their own files 2025-06-10 11:30:43 +02:00
Luminiferous 1f697ecc23 Added lumen-assono-worktime-calc 2025-06-10 11:30:43 +02:00
Luminiferous 4703c6c492 Allows lumen-search-content to Get a Path piped in 2025-06-10 11:30:43 +02:00
Luminiferous a9aa507b4c Added VISUAL and EDITOR envs 2025-06-10 11:30:43 +02:00
Luminiferous f2cb448b37 Added config.nu 2025-06-03 16:00:46 +02:00
11 changed files with 163 additions and 145 deletions
+2
View File
@@ -0,0 +1,2 @@
env.nu
history.txt
-5
View File
@@ -1,5 +0,0 @@
# Disable global autocomplete
skip_global_compinit=1
# Set ZFS Directory
ZDOTDIR=~/.config/zsh
-43
View File
@@ -1,43 +0,0 @@
# History
export HISTFILE=$XDG_CACHE_HOME/zsh/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
# Bitwarden ssh agent
export SSH_AUTH_SOCK=/home/lumen/.bitwarden-ssh-agent.sock
# Editors
export EDITOR="nvim"
export VISUAL="nvim"
# Disable Global autocomplete
export skip_global_compinit=1
# Autocomplete
source $ZDOTDIR/modules/completion.zsh
# Allow CTRL+Arrow move
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
# Prompt
prompt_builder() {
local EXITCODE=$?
if [ $UID = 0 ] && [ $EXITCODE = 0 ]; then
PROMPT=$'%F{red}%~ %B%F{red}#%F{red}>%f%b '
RPROMPT='%F{white}%? %F{red}%n'
elif [ $UID = 0 ]; then
PROMPT=$'%F{red}%~ %B%F{red}#%F{red}>%f%b '
RPROMPT=$'%F{red}%? %F{red}%n'
elif [ $UID != 0 ] && [ $EXITCODE = 0 ]; then
PROMPT=$'%F{white}%~ %B%F{blue}>%f%b '
RPROMPT='%F{white}%? %F{white}%n'
else
PROMPT=$'%F{white}%~ %B%F{blue}>%f%b '
RPROMPT=$'%F{red}%? %F{white}%n'
fi
}
precmd_functions+=(prompt_builder)
+46
View File
@@ -0,0 +1,46 @@
export def lumen-assono-backup-nexttape [dateinput: datetime]: nothing -> nothing {
print 'Next Required Tape:'
print $'($dateinput | get-backup-string 0)'
print ''
print 'Tapes after that:'
1..11 | each {|i|
print ($dateinput | get-backup-string $i)
} | ignore
}
def get-backup-string [index]: datetime -> string {
let firstDayMonth = $'01-((($in | format date '%m' | into int) + $index) mod 12 + 1)($in | format date '-%y')' | into datetime --format '%d-%m-%y'
let firstDayMonth = if ($firstDayMonth < $in) {
$'($firstDayMonth | format date '%d-%m-')(($firstDayMonth | format date '%y' | into int) + 1)' | into datetime --format '%d-%m-%y'
} else {
$firstDayMonth
}
let backupDay = $firstDayMonth - ($firstDayMonth | format date '%w' | into duration -u day) + 6day
let monthOfQuarter = $backupDay | get-month-of-quarter
let quarter = $backupDay | get-quarter
let year = $backupDay | get-year
if ($monthOfQuarter == 1) {
if ($quarter == 1) {
$"($backupDay): TapeLTO5-Y(($year - 1| into string | str substring 3..))"
} else {
$"($backupDay): TapeLTO5-Q($quarter - 1)"
}
} else {
$"($backupDay): TapeLTO5-M($monthOfQuarter - 1)"
}
}
def get-month-of-quarter []: datetime -> int {
let month = ($in | format date '%m' | into int) + 3
($month..($month - 3)..1) | last
}
def get-quarter []: datetime -> int {
(($in | format date '%m') | into int) / 3 | math ceil
}
def get-year []: datetime -> int {
$in | format date '%Y' | into int
}
+3
View File
@@ -0,0 +1,3 @@
export def lumen-assono-overtime-calc [startdate: datetime]: nothing -> string {
pwsh -command $'Invoke-assOrgaOvertimeCalculator ($startdate | format date '%d/%m/%Y')'
}
+41
View File
@@ -0,0 +1,41 @@
export def lumen-assono-worktime-calc [datestr: string]: nothing -> string {
let $datestr = $datestr | str replace ' +' ' '
mut $dateArray = []
let $rawDateArray = $datestr | split row ' '
if (($rawDateArray | length) mod 2 == 1) {
mut $spliceCounter = true
for $i in $rawDateArray {
if ($spliceCounter) {
$dateArray = $dateArray | append $i
}
$spliceCounter = not $spliceCounter
}
} else {
$dateArray = $rawDateArray
}
if (($dateArray | length) mod 2 == 1) {
error make {msg: 'Uneven Times given!'}
}
mut $dateArrayOutput = []
mut $dateArrayOutputBuilderCounter = true
for $i in $dateArray {
$dateArrayOutput = $dateArrayOutput | append ($i | date from-human | format date '%H:%M')
if ($dateArrayOutputBuilderCounter) {
$dateArrayOutput = $dateArrayOutput | append '-'
} else {
$dateArrayOutput = $dateArrayOutput | append '|'
}
$dateArrayOutputBuilderCounter = not $dateArrayOutputBuilderCounter
}
let $dateArrayOutput = ($dateArrayOutput | drop 1) | str join ' '
# $dateArray[0]
mut $hours = 0min
while (($dateArray | length) > 0) {
$hours += ($dateArray | get 1 | into datetime) - ($dateArray | get 0 | into datetime)
$dateArray = $dateArray | skip 2
}
$"($dateArrayOutput)\n($hours | into string)"
}
+3
View File
@@ -0,0 +1,3 @@
export def lumen-headset-power-toggle []: nothing -> nothing {
sudo uhubctl -f -a toggle -p 1 -l 3-5
}
+11
View File
@@ -0,0 +1,11 @@
export def lumen-kwin-get-class [waittimesec: int]: nothing -> string {
if ($waittimesec == 0) {
qdbus6 org.kde.KWin /KWin queryWindowInfo
} else {
for $i in $waittimesec..1 {
$i | print
sleep 1sec
}
qdbus6 org.kde.KWin /KWin queryWindowInfo
}
}
+15
View File
@@ -0,0 +1,15 @@
export def lumen-search-content [searchstr: string]: any -> table {
let $tmp = (if ($in != null) {
$in
} else {
pwd
})
cd $tmp
ls -a **/* | par-each {|i|
{file: $i.name,
content: (if (($i | get type) == file ) {
try {open $i.name --raw | find $searchstr} catch {{}}
})
}
} | compact content -e
}
+42
View File
@@ -0,0 +1,42 @@
# config.nu
#
# Installed by:
# version = "0.104.1"
#
# This file is used to override default Nushell settings, define
# (or import) custom commands, or run any other startup tasks.
# See https://www.nushell.sh/book/configuration.html
#
# This file is loaded after env.nu and before login.nu
#
# You can open this file in your default editor using:
# config nu
#
# See `help config nu` for more options
#
# You can remove these comments if you want or leave
# them for future reference.
$env.EDITOR = 'nvim'
$env.VISUAL = 'nvim'
use std/util 'path add'
path add '~/.local/bin'
path add '~/.cargo/bin'
$env.config.show_banner = false
$env.config.table.trim.methodology = 'truncating'
$env.config.table.trim.truncating_suffix = ' >>'
$env.config.table.mode = 'frameless'
if ((sys host).name !~ '.*Windows.*') {
$env.SSH_AUTH_SOCK = $'($env.HOME)/.var/app/com.bitwarden.desktop/data/.bitwarden-ssh-agent.sock'
# $env.SSH_AUTH_SOCK = $'($env.HOME)/.bitwarden-ssh-agent.sock'
}
try {
carapace _carapace nushell | let carapace_nu
mkdir $'($nu.cache-dir)'
$carapace_nu | save --force $'($nu.cache-dir)/carapace.nu'
} catch {}
source (if ($'($nu.cache-dir)/carapace.nu' | path exists) {($'($nu.cache-dir)/carapace.nu')} else { null })
-97
View File
@@ -1,97 +0,0 @@
# +---------+
# | General |
# +---------+
# Load more completions
fpath=($ZSH/plugins/completions $fpath)
# Should be called before compinit
zmodload zsh/complist
# Use hjlk in menu selection (during completion)
# Doesn't work well with interactive mode
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect '^xg' clear-screen
bindkey -M menuselect '^xi' vi-insert # Insert
bindkey -M menuselect '^xh' accept-and-hold # Hold
bindkey -M menuselect '^xn' accept-and-infer-next-history # Next
bindkey -M menuselect '^xu' undo # Undo
autoload -U compinit; compinit -d $XDG_CACHE_HOME/zsh/.zcompdump
_comp_options+=(globdots) # With hidden files
# Only work with the Zsh function vman
# See $DOTFILES/zsh/scripts.zsh
compdef vman="man"
# +---------+
# | Options |
# +---------+
# setopt GLOB_COMPLETE # Show autocompletion menu with globs
setopt MENU_COMPLETE # Automatically highlight first element of completion menu
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
# +---------+
# | zstyles |
# +---------+
# Ztyle pattern
# :completion:<function>:<completer>:<command>:<argument>:<tag>
# Define completers
zstyle ':completion:*' completer _extensions _complete _approximate
# Use cache for commands using cache
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
# Complete the alias when _expand_alias is used as a function
zstyle ':completion:*' complete true
zle -C alias-expension complete-word _generic
bindkey '^Xa' alias-expension
zstyle ':completion:alias-expension:*' completer _expand_alias
# Use cache for commands which use it
# Allow you to select in a menu
zstyle ':completion:*' menu select
# Autocomplete options for cd instead of directory stack
zstyle ':completion:*' complete-options true
zstyle ':completion:*' file-sort modification
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D %d --%f'
zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f'
zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f'
# zstyle ':completion:*:default' list-prompt '%S%M matches%s'
# Colors for files and directory
zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS}
# Only display some tags for the command cd
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
# zstyle ':completion:*:complete:git:argument-1:' tag-order !aliases
# Required for completion to be in good groups (named after the tags)
zstyle ':completion:*' group-name ''
zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
# See ZSHCOMPWID "completion matching control"
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' keep-prefix true
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
## For kubernetes
#source $DOTFILES/zsh/plugins/kubectl-completion/_kubectl
#zstyle ':completion:*:*:kubectl:*' list-grouped false