Added git roam template for ieee papers
Added script for battery logging Adjusted nushell/starship config for nushell v0.78.0 Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -12,7 +12,7 @@ let dark_theme = {
|
||||
empty: blue
|
||||
# Closures can be used to choose colors for specific values.
|
||||
# The value (in this case, a bool) is piped into the closure.
|
||||
bool: { if $in { 'light_cyan' } else { 'light_gray' } }
|
||||
bool: { || if $in { 'light_cyan' } else { 'light_gray' } }
|
||||
int: white
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
@@ -22,7 +22,7 @@ let dark_theme = {
|
||||
} else { 'blue' }
|
||||
}
|
||||
duration: white
|
||||
date: { (date now) - $in |
|
||||
date: { || (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
@@ -93,7 +93,7 @@ let light_theme = {
|
||||
empty: blue
|
||||
# Closures can be used to choose colors for specific values.
|
||||
# The value (in this case, a bool) is piped into the closure.
|
||||
bool: { if $in { 'dark_cyan' } else { 'dark_gray' } }
|
||||
bool: { || if $in { 'dark_cyan' } else { 'dark_gray' } }
|
||||
int: dark_gray
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
@@ -103,7 +103,7 @@ let light_theme = {
|
||||
} else { 'blue_bold' }
|
||||
}
|
||||
duration: dark_gray
|
||||
date: { (date now) - $in |
|
||||
date: { || (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
@@ -283,22 +283,22 @@ let-env config = {
|
||||
show_banner: false
|
||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||
|
||||
hooks: {
|
||||
pre_prompt: [{
|
||||
null # replace with source code to run before the prompt is shown
|
||||
}]
|
||||
pre_execution: [{
|
||||
null # replace with source code to run before the repl input is run
|
||||
}]
|
||||
env_change: {
|
||||
PWD: [{|before, after|
|
||||
null # replace with source code to run if the PWD environment is different since the last repl input
|
||||
}]
|
||||
}
|
||||
display_output: {
|
||||
if (term size).columns >= 100 { table -e } else { table }
|
||||
}
|
||||
}
|
||||
#hooks: {
|
||||
# pre_prompt: [{ ||
|
||||
# null # replace with source code to run before the prompt is shown
|
||||
# }]
|
||||
# pre_execution: [{ ||
|
||||
# null # replace with source code to run before the repl input is run
|
||||
# }]
|
||||
# env_change: { ||
|
||||
# PWD: [{|before, after|
|
||||
# null # replace with source code to run if the PWD environment is different since the last repl input
|
||||
# }]
|
||||
# }
|
||||
# display_output: { ||
|
||||
# if (term size).columns >= 100 { table -e } else { table }
|
||||
# }
|
||||
#}
|
||||
menus: [
|
||||
# Configuration for default nushell menus
|
||||
# Note the lack of source parameter
|
||||
|
||||
@@ -25,15 +25,15 @@ def create_right_prompt [] {
|
||||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
let-env PROMPT_COMMAND = { create_left_prompt }
|
||||
let-env PROMPT_COMMAND_RIGHT = { create_right_prompt }
|
||||
let-env PROMPT_COMMAND = { || create_left_prompt }
|
||||
let-env PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||
|
||||
# The prompt indicators are environmental variables that represent
|
||||
# the state of the prompt
|
||||
let-env PROMPT_INDICATOR = { "〉" }
|
||||
let-env PROMPT_INDICATOR_VI_INSERT = { ": " }
|
||||
let-env PROMPT_INDICATOR_VI_NORMAL = { "〉" }
|
||||
let-env PROMPT_MULTILINE_INDICATOR = { "::: " }
|
||||
let-env PROMPT_INDICATOR = { || "〉" }
|
||||
let-env PROMPT_INDICATOR_VI_INSERT = { || ": " }
|
||||
let-env PROMPT_INDICATOR_VI_NORMAL = { || "〉" }
|
||||
let-env PROMPT_MULTILINE_INDICATOR = { || "::: " }
|
||||
|
||||
# Specifies how environment variables are:
|
||||
# - converted from a string to a value on Nushell startup (from_string)
|
||||
|
||||
@@ -15,6 +15,8 @@ keybinds {
|
||||
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt t" { NewTab; }
|
||||
bind "Alt =" "Alt +" { Resize "Increase"; }
|
||||
bind "Alt -" { Resize "Decrease"; }
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ t:/home/tuan/Templates
|
||||
w:/home/tuan/workspace_l/home_lab/wiki
|
||||
k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor
|
||||
q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps
|
||||
':/home/tuan/Pictures/Wallpaper
|
||||
':/home/tuan/workspace_l/Docker/learn-nomad-getting-started/jobs
|
||||
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
||||
s:/home/tuan/Pictures/Screenshots
|
||||
v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible
|
||||
|
||||
7
config/.scripts/battery_stats.nu
Executable file
7
config/.scripts/battery_stats.nu
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let filename = (date now | date format "%s")
|
||||
while 1 == 1 {
|
||||
(sudo tlp-stat -b | grep Charge | split column '=' | str trim ) | insert a (date now | date format "%s") | reject column1 | rename Charge Timestamp | to csv -n | str replace " \\[%\\]" "" |save -a $"$filename".csv;
|
||||
sleep 50ms;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ Host git.uni-due.de
|
||||
IdentityFile /mnt/veracrypt1/git
|
||||
|
||||
# Homeserver
|
||||
Host mikrotik
|
||||
Host madrigal
|
||||
HostName 192.168.70.1
|
||||
Port 2200
|
||||
User tudattr
|
||||
@@ -209,3 +209,10 @@ Host ncs-aws-iperf3
|
||||
Port 22
|
||||
User ec2-user
|
||||
IdentityFile /mnt/veracrypt1/aws_ncs.pem
|
||||
|
||||
Host ami
|
||||
Hostname 3.72.156.214
|
||||
Port 22
|
||||
User ubuntu
|
||||
IdentityFile /mnt/veracrypt1/work/aws-rizk.pem
|
||||
|
||||
|
||||
Reference in New Issue
Block a user