1
0

16 Commits

Author SHA1 Message Date
46fed03268 Fixed Table behaviour and applied more compact theme 2026-04-16 21:43:13 +02:00
8571495a53 Changed default editor to nvim 2026-04-14 12:38:23 +02:00
814305c82d Fixed SSH Agent env variable 2026-02-18 16:16:05 +01:00
6f3131bedc Uncomment Carapace test 2026-02-18 13:34:44 +01:00
65fed10281 Added Carapace init to config.nu 2026-02-17 11:59:24 +01:00
38555114b1 Replace system Editor with helix 2026-02-16 01:46:19 +01:00
0d27c52f6e Added carapace 2026-02-14 16:14:59 +01:00
2f43f25649 Fixed Hub for jlab-usb-power-toggle 2026-02-13 13:48:08 +01:00
de4aafdd80 Changed EDITOR and VISUAL variables to nvim 2025-10-11 13:25:28 +02:00
482c639b30 Added jlab-usb-power-toggle 2025-09-09 20:42:48 +02:00
1a651bb023 Merge branch 'nushell' of https://git.luminiferous.eu/Luminiferous/dotfiles into nushell 2025-08-12 16:16:21 +02:00
e2fe842098 Refactored lumen-assono-backup-nexttape to work for new tape scheme 2025-08-12 16:14:16 +02:00
65ec0c8bf8 Fixed kwin-get-class countdown timer when starting on 0 2025-08-02 11:43:58 +02:00
6793e4e0ae Set SSH Bitwarden env var to only trigger on non Windows Systems 2025-07-30 19:26:08 +02:00
ac8fc8529b Merge branch 'nushell' of https://git.luminiferous.eu/Luminiferous/dotfiles into nushell 2025-07-30 17:22:43 +02:00
e6b082f38c Changed to fully Functional Scripting for most scripts 2025-07-30 17:21:40 +02:00
5 changed files with 67 additions and 55 deletions

View File

@@ -1,53 +1,46 @@
export def lumen-assono-backup-nexttape [dateinput: datetime]: nothing -> nothing { export def lumen-assono-backup-nexttape [dateinput: datetime]: nothing -> nothing {
print 'Next Required Tape:' print 'Next Required Tape:'
print $'($dateinput | get-backup-string)' print $'($dateinput | get-backup-string 0)'
print '' print ''
print 'Tapes after that:' print 'Tapes after that:'
1..9 | each {|i| 1..11 | each {|i|
print $'($i): (($dateinput + ((7 * $i) | into duration -u day)) | get-backup-string)' print ($dateinput | get-backup-string $i)
} | ignore } | ignore
} }
def get-backup-string []: datetime -> string { def get-backup-string [index]: datetime -> string {
let backupDay = $in - ($in | format date '%w' | into duration -u day) + 6day let firstDayMonth = $'01-((($in | format date '%m' | into int) + $index) mod 12 + 1)($in | format date '-%y')' | into datetime --format '%d-%m-%y'
let saturdayOfMonth = $backupDay | get-week-of-month let firstDayMonth = if ($firstDayMonth < $in) {
let monthOfQuarter = $backupDay | get-month-of-quarter $'($firstDayMonth | format date '%d-%m-')(($firstDayMonth | format date '%y' | into int) + 1)' | into datetime --format '%d-%m-%y'
let quarter = $backupDay | get-quarter } else {
let year = $backupDay | get-year $firstDayMonth
if ($saturdayOfMonth == 1) { }
if ($monthOfQuarter == 1) { let backupDay = $firstDayMonth - ($firstDayMonth | format date '%w' | into duration -u day) + 6day
if ($quarter == 1) { let monthOfQuarter = $backupDay | get-month-of-quarter
$'TapeLTO5-Y(($year | into string | str substring 3..))' let quarter = $backupDay | get-quarter
} else { let year = $backupDay | get-year
$'TapeLTO5-Q($quarter)'
}
} else {
$'TapeLTO5-M($monthOfQuarter)'
}
} else {
$'TapeLTO5-W($saturdayOfMonth)'
}
}
def get-week-of-month []: datetime -> int { if ($monthOfQuarter == 1) {
let firstDay = ($in - ($in | format date '%d' | into duration -u day) + 1day) if ($quarter == 1) {
let $firstSpecificDay = $firstDay + (((($in | format date '%w' | into int) + 7 - ($firstDay | format date '%w' | into int)) mod 7) | into duration -u day) $"($backupDay): TapeLTO5-Y(($year - 1| into string | str substring 3..))"
((($in - $firstSpecificDay) | into int | into datetime | format date '%d' | into int) / 7 | math floor) + 1 } else {
} $"($backupDay): TapeLTO5-Q($quarter - 1)"
}
} else {
$"($backupDay): TapeLTO5-M($monthOfQuarter - 1)"
}
}
def get-month-of-quarter []: datetime -> int { def get-month-of-quarter []: datetime -> int {
mut month = $in | format date '%m' | into int let month = ($in | format date '%m' | into int) + 3
while ($month > 3) { ($month..($month - 3)..1) | last
$month -= 3
}
$month
} }
def get-quarter []: datetime -> int { def get-quarter []: datetime -> int {
(($in | format date '%m') | into int) / 3 | math ceil (($in | format date '%m') | into int) / 3 | math ceil
} }
def get-year []: datetime -> int { def get-year []: datetime -> int {
$in | format date '%Y' $in | format date '%Y' | into int
} }

View File

@@ -0,0 +1,3 @@
export def lumen-jlab-usb-power-toggle []: nothing -> nothing {
sudo uhubctl -a toggle -p 1 -l 3-5
}

View File

@@ -1,9 +1,11 @@
export def lumen-kwin-get-class [waittimesec: int]: nothing -> string { export def lumen-kwin-get-class [waittimesec: int]: nothing -> string {
mut timer = $waittimesec if ($waittimesec == 0) {
while ($timer > 0) { qdbus6 org.kde.KWin /KWin queryWindowInfo
$timer | print } else {
$timer -= 1 for $i in $waittimesec..1 {
sleep 1sec $i | print
sleep 1sec
}
qdbus6 org.kde.KWin /KWin queryWindowInfo
} }
qdbus6 org.kde.KWin /KWin queryWindowInfo
} }

View File

@@ -1,14 +1,14 @@
export def lumen-search-content [searchstr: string]: any -> table { export def lumen-search-content [searchstr: string]: any -> table {
let $tmp = $in let $tmp = (if ($in != null) {
mut $path = pwd $in
if ($tmp != null) { } else {
$path = $tmp pwd
} })
cd $path cd $tmp
ls -a **/* | par-each {|i| ls -a **/* | par-each {|i|
{file: $i.name, {file: $i.name,
content: (if (($i | get type) == file ) { content: (if (($i | get type) == file ) {
try {open $i.name --raw | find $searchstr} catch {|err| {}} try {open $i.name --raw | find $searchstr} catch {{}}
}) })
} }
} | compact content -e } | compact content -e

View File

@@ -17,7 +17,21 @@
# You can remove these comments if you want or leave # You can remove these comments if you want or leave
# them for future reference. # them for future reference.
$env.EDITOR = 'nvim'
$env.VISUAL = 'nvim'
$env.config.show_banner = false $env.config.show_banner = false
$env.EDITOR = 'hx' $env.config.table.trim.methodology = 'truncating'
$env.VISUAL = 'hx' $env.config.table.trim.truncating_suffix = ' >>'
$env.SSH_AUTH_SOCK = '/home/lumen/.bitwarden-ssh-agent.sock' $env.config.table.mode = 'frameless'
if ((sys host).name !~ '.*Windows.*') {
$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 })