Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b7facd068 | |||
| c4c2885267 | |||
| 5bdd7499ce | |||
| 7833cc3a00 | |||
| 997244e054 |
@@ -1,2 +0,0 @@
|
|||||||
env.nu
|
|
||||||
history.txt
|
|
||||||
+3234
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export def lumen-assono-overtime-calc [startdate: datetime]: nothing -> string {
|
|
||||||
pwsh -command $'Invoke-assOrgaOvertimeCalculator ($startdate | format date '%d/%m/%Y')'
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
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)"
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export def lumen-headset-power-toggle []: nothing -> nothing {
|
|
||||||
sudo uhubctl -f -a toggle -p 1 -l 3-5
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# 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 })
|
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.bar.json",
|
||||||
|
"monitor": 0,
|
||||||
|
"font_family": "JetBrains Mono",
|
||||||
|
"theme": {
|
||||||
|
"palette": "Base16",
|
||||||
|
"name": "Ashes",
|
||||||
|
"accent": "Base0D"
|
||||||
|
},
|
||||||
|
"left_widgets": [
|
||||||
|
{
|
||||||
|
"Komorebi": {
|
||||||
|
"workspaces": {
|
||||||
|
"enable": true,
|
||||||
|
"hide_empty_workspaces": false
|
||||||
|
},
|
||||||
|
"layout": {
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
|
"focused_window": {
|
||||||
|
"enable": true,
|
||||||
|
"show_icon": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"right_widgets": [
|
||||||
|
{
|
||||||
|
"Update": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Media": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Storage": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Memory": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Network": {
|
||||||
|
"enable": true,
|
||||||
|
"show_total_data_transmitted": true,
|
||||||
|
"show_network_activity": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Date": {
|
||||||
|
"enable": true,
|
||||||
|
"format": "DayDateMonthYear"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Time": {
|
||||||
|
"enable": true,
|
||||||
|
"format": "TwentyFourHour"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Battery": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.json",
|
||||||
|
"app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json",
|
||||||
|
"window_hiding_behaviour": "Cloak",
|
||||||
|
"cross_monitor_move_behaviour": "Insert",
|
||||||
|
"default_workspace_padding": 5,
|
||||||
|
"default_container_padding": -1,
|
||||||
|
"border": true,
|
||||||
|
"border_width": 6,
|
||||||
|
"border_offset": -1,
|
||||||
|
"theme": {
|
||||||
|
"palette": "Base16",
|
||||||
|
"name": "Ashes",
|
||||||
|
"unfocused_border": "Base03",
|
||||||
|
"bar_accent": "Base0D"
|
||||||
|
},
|
||||||
|
"stackbar": {
|
||||||
|
"height": 40,
|
||||||
|
"mode": "OnStack",
|
||||||
|
"tabs": {
|
||||||
|
"width": 300,
|
||||||
|
"focused_text": "#00a542",
|
||||||
|
"unfocused_text": "#b3b3b3",
|
||||||
|
"background": "#141414"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"mouse_follows_focus": false,
|
||||||
|
"ignore_rules": [
|
||||||
|
{
|
||||||
|
"kind": "Exe",
|
||||||
|
"id": "vmconnect.exe",
|
||||||
|
"matching_strategy": "Equals"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "Exe",
|
||||||
|
"id": "KeePass.exe",
|
||||||
|
"matching_strategy": "Equals"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"object_name_change_applications": [
|
||||||
|
{
|
||||||
|
"kind": "Exe",
|
||||||
|
"id": "dopus.exe",
|
||||||
|
"matching_strategy": "Equals"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user