From 87a60c4a1dad17890ec33e07ecf4490e066be8af Mon Sep 17 00:00:00 2001 From: Tuan-Dat Tran Date: Wed, 30 Oct 2024 16:39:51 +0100 Subject: [PATCH] 2024-10-30 Signed-off-by: Tuan-Dat Tran --- config/.config/alacritty/alacritty.toml | 2 +- config/.config/i3/config | 3 +- config/.local/share/ranger/bookmarks | 3 +- config/.scripts/startup.sh | 61 +++++++++++++++-------- vim/.config/nvim/lazy-lock.json | 56 ++++++++++----------- vim/.config/nvim/lua/plugins/example.lua | 6 ++- vim/.config/nvim/spell/en.utf-8.add | 16 ++++++ vim/.config/nvim/spell/en.utf-8.add.spl | Bin 2339 -> 2477 bytes 8 files changed, 95 insertions(+), 52 deletions(-) diff --git a/config/.config/alacritty/alacritty.toml b/config/.config/alacritty/alacritty.toml index ab81cd2..7fdc577 100644 --- a/config/.config/alacritty/alacritty.toml +++ b/config/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ [font] -size = 10 +size = 12 [font.bold] style = "Bold" diff --git a/config/.config/i3/config b/config/.config/i3/config index ba47c4b..ac4799f 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -123,6 +123,8 @@ bindsym XF86MonBrightnessDown exec --no-startup-id ~/.scripts/brightness.sh down bindsym XF86AudioLowerVolume exec --no-startup-id ~/.scripts/sound.sh down bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.scripts/sound.sh up bindsym XF86AudioMute exec --no-startup-id ~/.scripts/sound.sh toggle +# bindsym $mod+p exec ~/.scripts/monitor.sh next + bindsym XF86AudioPlay exec "playerctl play-pause" bindsym XF86AudioStop exec "playerctl stop" bindsym XF86AudioNext exec "playerctl next" @@ -139,7 +141,6 @@ bindsym XF86Favorites exec dunstify -r 3 "Favorites" # Application Shortcuts bindsym $mod+b exec firefox -bindsym $mod+p exec firefox --private-window https://tudattr.dev # Whole Screen bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index fe4f963..7353a15 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -1,6 +1,7 @@ -':/home/tudattr/.ssh +':/home/tudattr/Pictures/Screenshots/2016-12 a:/home/tudattr/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte s:/home/tudattr/Pictures/Screenshots u:/home/tudattr/.genesis/Documents/Uni/Studium e:/home/tudattr/.genesis/Documents/Fachschaft/Berufungskomission/Pohl/Sitzungen r:/home/tudattr/.genesis/Documents/Uni/Studium/2023_Sommersemester/ethfuzz-evaluation/eval_ityfuzz/contracts/VeriSmart-benchmarks +m:/run/media/tudattr diff --git a/config/.scripts/startup.sh b/config/.scripts/startup.sh index 8a7b9f6..b5bda3e 100755 --- a/config/.scripts/startup.sh +++ b/config/.scripts/startup.sh @@ -1,36 +1,57 @@ #!/bin/sh lower_battery_threshold=10 -KBD=""; -oldKBD=""; +KBD="" +oldKBD="" +connected_monitors="" +old_connected_monitors="" +internal_monitor="eDP" -function kb_routine { - oldKBD="$KBD"; +kb_routine() { + oldKBD="$KBD" case "$(xset -q | grep -A 0 'LED' | cut -c59-67)" in - "00000000") - KBD="Europe" ;; - "00001000") - KBD="Deutsch" ;; - *) KBD="unknown" ;; + "00000000") + KBD="Europe" + ;; + "00001000") + KBD="Deutsch" + ;; + *) KBD="unknown" ;; esac if [ "$KBD" != "$oldKBD" ]; then - dunstify -r 1 "$KBD"; + dunstify -r 1 "$KBD" fi } -function battery_routine { - capacity=$(< /sys/class/power_supply/BAT0/capacity) - if [[ $capacity -lt lower_battery_threshold ]]; then - acpi | grep -q '0: Discharging' && dunstify "Battery at $capacity%"; - sleep 60; +battery_routine() { + capacity="$(cat /sys/class/power_supply/BAT0/capacity)" + if [ "$capacity" -lt $lower_battery_threshold ]; then + acpi | grep -q '0: Discharging' && dunstify "Battery at $capacity%" + sleep 60 fi } -while : -do - kb_routine; - battery_routine; - sleep 1; +monitors() { + connected_monitors=$(xrandr | grep -c "\") + if [ "$connected_monitors" != "old_connected_monitors" ]; then + if [ "$connected_monitors" -eq 1 ]; then + # dunstify -r 1 "Swichting to single monitor" + xrandr --output $internal_monitor --auto + fi + if [ "$connected_monitors" -gt 1 ]; then + external_monitor=$(xrandr | grep "\" | grep -v $internal_monitor | cut -d" " -f1) + # dunstify -r 1 "Swichting to external monitor" + xrandr --output $internal_monitor --off --output "$external_monitor" --auto + fi + old_connected_monitors=$connected_monitors + fi +} + +while :; do + kb_routine + battery_routine + # monitors + sleep 1 done diff --git a/vim/.config/nvim/lazy-lock.json b/vim/.config/nvim/lazy-lock.json index 30df014..6b0ed26 100644 --- a/vim/.config/nvim/lazy-lock.json +++ b/vim/.config/nvim/lazy-lock.json @@ -1,58 +1,58 @@ { - "LazyVim": { "branch": "main", "commit": "d5a4ced75acadb6ae151c0d2960a531c691c88b9" }, - "SchemaStore.nvim": { "branch": "main", "commit": "08618c584e38933731a1ef210b323a7588403dd2" }, - "bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, - "catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, + "LazyVim": { "branch": "main", "commit": "7c7c196a78e936a1bc4cf28e7908e9bd96d75607" }, + "SchemaStore.nvim": { "branch": "main", "commit": "ed65feb5b8026d7c6b1981cfe9d97402342d344d" }, + "bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" }, + "catppuccin": { "branch": "main", "commit": "65bf0b16f57a3db70d6a93ac68882dd9a31d0565" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-git": { "branch": "main", "commit": "50d526dff0f6bc441b51fc269d9fdc99a50c76af" }, + "cmp-git": { "branch": "main", "commit": "ec049036e354ed8ed0215f2427112882e1ea7051" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, + "conform.nvim": { "branch": "master", "commit": "6a28c90082a67f62a323ab90d988e000a718a8c7" }, "crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, - "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, + "dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" }, "dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, - "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, - "fzf-lua": { "branch": "main", "commit": "ebb89e4e4065e31b029eee8f618e1ca660f41f35" }, - "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, - "grug-far.nvim": { "branch": "main", "commit": "b7c2b28e49d55ff71cd9bb3ad19a2021316510d8" }, - "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" }, + "gitsigns.nvim": { "branch": "main", "commit": "2d725fdd7fe4a612fa3171ca0a965f455d8dc325" }, + "grug-far.nvim": { "branch": "main", "commit": "190c03d54e8976491e6e49acb97087bf4182b079" }, + "indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" }, "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, - "mini.pairs": { "branch": "main", "commit": "919a89ed3c9f4142215a44c9fffca72fa8c8e792" }, - "mini.surround": { "branch": "main", "commit": "e1ac1ce5c7499aa4cc2ca9fb1adec9e730dd9394" }, + "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, + "mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" }, "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "noice.nvim": { "branch": "main", "commit": "86c3ab04eaddeed901a5495bc350a0235a2a11bc" }, + "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-ansible": { "branch": "main", "commit": "9c3b4a771b8c8d7b4f2171466464d978cb3846f7" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" }, - "nvim-lspconfig": { "branch": "master", "commit": "e6569c18c21be5166e4b9cc7530e828b8285c84e" }, + "nvim-ansible": { "branch": "main", "commit": "44dabdaa8a9193b7f564a8408ed6d7107705030a" }, + "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, + "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, + "nvim-lspconfig": { "branch": "master", "commit": "59a6766cbf32c7e4cf3ed685ccad7ffe1dde8c40" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, - "nvim-treesitter": { "branch": "master", "commit": "98a33cc524c85a78a1ff5a707998629b24cbf8c2" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" }, + "nvim-treesitter": { "branch": "master", "commit": "39016abc99853c3e9d70f1bec7e2fa661b9a81bf" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "onedark.vim": { "branch": "main", "commit": "390b893d361c356ac1b00778d849815f2aa44ae4" }, "outline.nvim": { "branch": "main", "commit": "6c44527837ff7ac1cd054dc365a721e881020a2e" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "e91b042b3865d2d040a0e21e0a3b13fb57f24094" }, - "rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" }, + "render-markdown.nvim": { "branch": "main", "commit": "fc05fb7c56795f191b6800799a2ec6ea325ba715" }, + "rustaceanvim": { "branch": "master", "commit": "e1f9464d9e1addeccb170eb7968471966965f5a3" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "tokyonight.nvim": { "branch": "main", "commit": "efd1417aa01af618426fe1cf507c5458090458f2" }, - "trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" }, - "ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" }, + "tokyonight.nvim": { "branch": "main", "commit": "2e1daa1d164ad8cc3e99b44ca68e990888a66038" }, + "trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, + "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, "vim-ledger": { "branch": "master", "commit": "dbc683e24bd5338b8c12540227a58b2d247e097a" }, - "vimtex": { "branch": "master", "commit": "be2c13c76eb4c72b2d036900aa17b4b8200ddfb5" }, + "vimtex": { "branch": "master", "commit": "0785fd98af20f308ce6856f75a70a4ece9abab29" }, "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }, "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" } } diff --git a/vim/.config/nvim/lua/plugins/example.lua b/vim/.config/nvim/lua/plugins/example.lua index 4ad9825..17f53d6 100644 --- a/vim/.config/nvim/lua/plugins/example.lua +++ b/vim/.config/nvim/lua/plugins/example.lua @@ -157,7 +157,11 @@ return { "nvim-lualine/lualine.nvim", event = "VeryLazy", opts = function(_, opts) - table.insert(opts.sections.lualine_x, "😄") + table.insert(opts.sections.lualine_x, { + function() + return "😄" + end, + }) end, }, diff --git a/vim/.config/nvim/spell/en.utf-8.add b/vim/.config/nvim/spell/en.utf-8.add index 48a93b7..b9f314c 100644 --- a/vim/.config/nvim/spell/en.utf-8.add +++ b/vim/.config/nvim/spell/en.utf-8.add @@ -178,3 +178,19 @@ localhost gitea RBAC netcup +proxmox +LVM +Infura +Etherscan +Hypervisor +vCPUs +ESXI +finalevent +fe +reentrancy +blockchain +perf +#eentrency +#eentrency +reentrency/! +delegatecall diff --git a/vim/.config/nvim/spell/en.utf-8.add.spl b/vim/.config/nvim/spell/en.utf-8.add.spl index b742dfe9581499ced7450939fee17101abc3dd44..5f49dc81744a67549b557c7dcc38914a0a4b3c5b 100644 GIT binary patch delta 1121 zcmY*Y%}*0i5Z{^YQX3OO)e8%T1|!B$V_TqVlvFG=Ay7dOJbBn|w{*jPz}xcCMnTV> z$m8PKaOC3282ukOcu}H>o(LBck9yFVw=u*fo%iPJH@`PC`}*9$`R=8uYP9NjUg3|X zb@l9aA17T1P($4Pz2AT2>fXi{IIs*BwCJ?y^Z+z1>&bl>IeR8=lagupVI;r9^u@I%m zP(7DoLXIj4!?GDVyV~M1f)t=Eiy^0Nz1D~*r3ITL70GO%o(OwFmh|2$m8gp4dt7jaCI=E3NXfei4_?WGglS?RR0uyGYpOk21#ZjFi2*p4zbN5Q_8GZ8 zv>XV)W^TtWiENuys)#-Eu`vWs|ED6XnUu)Xam~xrIlI zOOESpz&uo;2&0q`f=`(X@%Ec8I7pw^RKmI^j`K0J;& nqQMw-;;R~Du7Rp+7F8(KBX_wKW0?wZzQ6T9r#NGKPUGKSmPF5H delta 1022 zcmY*XPe>GD6rcBYW>+FCG{P~V#ZU+;c2`#glTB9xQBzx$>JZHC&hAdmADbCX?XU&i zx+Gs0Z&7sgS`g8}Ze2PA9>hbSLUik_{dw=3Od6Q)&wIc3d%y4ZeH+cMni}UuCxQjj zwllvKMSH*2_)P;v8L-xVzSg!ZTv`?%pzA~;U7~2R;&|c^I@)V!R=@`n7J#}{ce$cwlw8Ixgh-Q58=4L{iESk;a%~6?Xrvx0;au?|reB0@7gh)Z z&ng%!g2zQk7ZxZOGLo2m=GzxvW9=>QC5V}p2Q_(Mlg0|yc8c?A3lv44nmucA%~SWN zdO&JD5RcU)sN$t+!!2=2Yn_1z!RN#b`v7B}O4J{*SRw}_7Mt`qq($y_ZCC<>cx~>G zTfyowFZ!zlk+O5*iIzG^5En|E*|o%Ht@GMBhiYh>tic;{Fr>dk2XG?REi+NG=55E1 zF!Sh;l!q=!uq7b2C$jMiurF@Ma~aq+<3`Q${AJ1&r3?!VR)=R?YCBI_>>XQVsbH+K8|+rm8(0Vo@i^rAADUdX3D6fx%^OUBwDYi zJAKeY{T%ATG6_QGN<**g&>J~);LyFnnC*#QiL0|Y(Du^5}L>B7AP0t=C>0o4`&i1k9Vfv+EI?pw@e)Q<|RWzbRo(qOo zq)~$e;PP>ta3Ej*r