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>
clean_emacs
TuDatTr 2023-04-10 10:05:35 +02:00
parent b5b511404b
commit d5483d49ad
7 changed files with 83 additions and 29 deletions

View File

@ -12,7 +12,7 @@ let dark_theme = {
empty: blue empty: blue
# Closures can be used to choose colors for specific values. # Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure. # 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 int: white
filesize: {|e| filesize: {|e|
if $e == 0b { if $e == 0b {
@ -22,7 +22,7 @@ let dark_theme = {
} else { 'blue' } } else { 'blue' }
} }
duration: white duration: white
date: { (date now) - $in | date: { || (date now) - $in |
if $in < 1hr { if $in < 1hr {
'red3b' 'red3b'
} else if $in < 6hr { } else if $in < 6hr {
@ -93,7 +93,7 @@ let light_theme = {
empty: blue empty: blue
# Closures can be used to choose colors for specific values. # Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure. # 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 int: dark_gray
filesize: {|e| filesize: {|e|
if $e == 0b { if $e == 0b {
@ -103,7 +103,7 @@ let light_theme = {
} else { 'blue_bold' } } else { 'blue_bold' }
} }
duration: dark_gray duration: dark_gray
date: { (date now) - $in | date: { || (date now) - $in |
if $in < 1hr { if $in < 1hr {
'red3b' 'red3b'
} else if $in < 6hr { } else if $in < 6hr {
@ -283,22 +283,22 @@ let-env config = {
show_banner: false 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. 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: { #hooks: {
pre_prompt: [{ # pre_prompt: [{ ||
null # replace with source code to run before the prompt is shown # null # replace with source code to run before the prompt is shown
}] # }]
pre_execution: [{ # pre_execution: [{ ||
null # replace with source code to run before the repl input is run # null # replace with source code to run before the repl input is run
}] # }]
env_change: { # env_change: { ||
PWD: [{|before, after| # PWD: [{|before, after|
null # replace with source code to run if the PWD environment is different since the last repl input # null # replace with source code to run if the PWD environment is different since the last repl input
}] # }]
} # }
display_output: { # display_output: { ||
if (term size).columns >= 100 { table -e } else { table } # if (term size).columns >= 100 { table -e } else { table }
} # }
} #}
menus: [ menus: [
# Configuration for default nushell menus # Configuration for default nushell menus
# Note the lack of source parameter # Note the lack of source parameter

View File

@ -25,15 +25,15 @@ def create_right_prompt [] {
} }
# Use nushell functions to define your right and left prompt # Use nushell functions to define your right and left prompt
let-env PROMPT_COMMAND = { create_left_prompt } let-env PROMPT_COMMAND = { || create_left_prompt }
let-env PROMPT_COMMAND_RIGHT = { create_right_prompt } let-env PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
# The prompt indicators are environmental variables that represent # The prompt indicators are environmental variables that represent
# the state of the prompt # the state of the prompt
let-env PROMPT_INDICATOR = { "〉" } let-env PROMPT_INDICATOR = { || "〉" }
let-env PROMPT_INDICATOR_VI_INSERT = { ": " } let-env PROMPT_INDICATOR_VI_INSERT = { || ": " }
let-env PROMPT_INDICATOR_VI_NORMAL = { "〉" } let-env PROMPT_INDICATOR_VI_NORMAL = { || "〉" }
let-env PROMPT_MULTILINE_INDICATOR = { "::: " } let-env PROMPT_MULTILINE_INDICATOR = { || "::: " }
# Specifies how environment variables are: # Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string) # - converted from a string to a value on Nushell startup (from_string)

View File

@ -15,6 +15,8 @@ keybinds {
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt j" "Alt Down" { MoveFocus "Down"; } bind "Alt j" "Alt Down" { MoveFocus "Down"; }
bind "Alt k" "Alt Up" { MoveFocus "Up"; } bind "Alt k" "Alt Up" { MoveFocus "Up"; }
bind "Alt n" { NewPane; }
bind "Alt t" { NewTab; }
bind "Alt =" "Alt +" { Resize "Increase"; } bind "Alt =" "Alt +" { Resize "Increase"; }
bind "Alt -" { Resize "Decrease"; } bind "Alt -" { Resize "Decrease"; }

View File

@ -9,7 +9,7 @@ t:/home/tuan/Templates
w:/home/tuan/workspace_l/home_lab/wiki 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 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 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 e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
s:/home/tuan/Pictures/Screenshots s:/home/tuan/Pictures/Screenshots
v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible

View 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;
}

View File

@ -24,7 +24,7 @@ Host git.uni-due.de
IdentityFile /mnt/veracrypt1/git IdentityFile /mnt/veracrypt1/git
# Homeserver # Homeserver
Host mikrotik Host madrigal
HostName 192.168.70.1 HostName 192.168.70.1
Port 2200 Port 2200
User tudattr User tudattr
@ -209,3 +209,10 @@ Host ncs-aws-iperf3
Port 22 Port 22
User ec2-user User ec2-user
IdentityFile /mnt/veracrypt1/aws_ncs.pem IdentityFile /mnt/veracrypt1/aws_ncs.pem
Host ami
Hostname 3.72.156.214
Port 22
User ubuntu
IdentityFile /mnt/veracrypt1/work/aws-rizk.pem

View File

@ -66,7 +66,45 @@
(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}
#+filetags: project") #+filetags: project")
:unnarrowed t) :unnarrowed t)
("p" "paper" plain "* Authors ("i" "ieee paper" plain "
#+title: %^{title}
#+OPTIONS: toc:nil author:nil
#+LaTeX_CLASS: paper
# LaTeX_HEADER: \\documentclass[12pt,a4paper,conference,final,twoside]{IEEEtran}
#+LaTeX_HEADER: \\title{%^{title}}
#+LaTeX_HEADER: \\author{\\IEEEauthorblockN{Tuan-Dat Tran\\\\\\small(3030462)}\\\\\\IEEEauthorblockA{University of Duisburg-Essen\\\\tuan-dat.tran@stud.uni-due.de}}
#+LaTeX_HEADER: \\usepackage[utf8]{inputenc}
#+LaTeX_HEADER: \\usepackage[T1]{fontenc}
#+LaTeX_HEADER: \\usepackage{lmodern}
#+LaTeX_HEADER: \\usepackage[english]{babel}
#+LaTeX_HEADER: \\usepackage[backend=biber,doi=true,url=true,block=ragged,maxnames=6]{biblatex}
#+LaTeX_HEADER: \\renewcommand*{\\bibfont}{\\footnotesize}
#+LaTeX_HEADER: \\pagestyle{plain}
#+LaTeX_HEADER: \\usepackage{siunitx}
#+LaTeX_HEADER: \\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
#+LaTeX_HEADER: \\usepackage{cleveref}
#+LaTeX_HEADER: \\usepackage{graphicx}
#+LaTeX_HEADER: \\graphicspath{{./images/}}
#+LaTeX_HEADER: \\usepackage{csquotes}
#+LaTeX_HEADER: \\MakeOuterQuote{\"}
#+LaTeX_HEADER: \\usepackage{balance}
#+LaTeX_HEADER: \\clubpenalty10000
#+LaTeX_HEADER: \\widowpenalty10000
#+LaTeX_HEADER: \\usepackage{listings}
#+LaTeX_HEADER: \\definecolor{lstgreen}{rgb}{0,0.6,0}
#+LaTeX_HEADER: \\lstset{language=C,%basicstyle=\\scriptsize\\sourcecodepro,%basicstyle=\\scriptsize\\ttfamily,basicstyle=\\linespread{1.1}\\scriptsize\\ttfamily,commentstyle=\\color{lstgreen},keywordstyle=\\color{blue},keywordstyle=[2]\\color{SlateBlue},keywordstyle=[3]\\color{DarkCyan},keywordstyle=[4]\\color{violet},%ndkeywordstyle=\\color{violet},emphstyle=\\bfseries\\color{DarkGray},identifierstyle=\\color{black},commentstyle=\\color{purple}\\ttfamily,stringstyle=\\color{gray}\\ttfamily,%numbers=left,numbers=left,numberstyle=\\tiny,columns=fullflexible,keepspaces=true,showstringspaces=false,captionpos=b,%xleftmargin=\\parindent,%framexleftmargin=\\parindent,%xleftmargin=2cm,%linewidth=\\textwidth,%xleftmargin=2cm,xleftmargin=2em,%xleftmargin=3pt,xrightmargin=3pt,%aboveskip=\\bigskipamount,%belowskip=\\bigskipamount,%fancyvrb=true,frame=single,%frame=L,escapechar=@,}
#+LaTeX_HEADER: \\lstdefinestyle{plain}{ numbers=none,frame=none,xleftmargin=1pt,xrightmargin=1pt,}
#+LaTeX_HEADER: \\crefname{lstlisting}{listing}{listing}
#+LaTeX_HEADER: \\Crefname{lstlisting}{Listing}{Listings}
#+LaTeX_HEADER: \\usepackage{blindtext}
#+LaTeX_HEADER: \\newcommand\\blindsection{{\\color{gray}\\subsection{Some bind text}\\blindtext}}
%?
" :target
(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}
#+filetags: paper")
:unnarrowed t)
("p" "paper notes" plain "* Authors
- %? - %?
* Index Terms * Index Terms