From 193d077c90adce48e219acfa0a7a8eca9b0a9469 Mon Sep 17 00:00:00 2001 From: Tiago Garcia Date: Mon, 21 Oct 2024 15:47:32 +0100 Subject: [PATCH] Updates Signed-off-by: Tiago Garcia --- .ideavimrc | 3 +++ .local/bin/toggle-notifications | 11 +++++++++++ .local/bin/totp | 4 ++-- .vimrc | 4 ++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 .local/bin/toggle-notifications diff --git a/.ideavimrc b/.ideavimrc index 2dbe382..3909d92 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -57,6 +57,9 @@ augroup SearchHighlight autocmd CmdlineChanged /,\? :nnoremap :noh augroup END +let g:highlightedyank_highlight_duration = 100 Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' +Plug 'machakann/vim-highlightedyank' + diff --git a/.local/bin/toggle-notifications b/.local/bin/toggle-notifications new file mode 100755 index 0000000..518d837 --- /dev/null +++ b/.local/bin/toggle-notifications @@ -0,0 +1,11 @@ +#!/bin/bash + +current=$(gsettings get org.gnome.desktop.notifications show-banners) + +if [ "$current" == "true" ]; then + gsettings set org.gnome.desktop.notifications show-banners false + notify-send "Desktop banner notifications disabled" +else + gsettings set org.gnome.desktop.notifications show-banners true + notify-send "Desktop banner notifications enabled" +fi diff --git a/.local/bin/totp b/.local/bin/totp index f90876c..0a6d7d4 100755 --- a/.local/bin/totp +++ b/.local/bin/totp @@ -22,7 +22,7 @@ def main(): sys.exit(1) try: with open("/root/secrets.txt", "a") as secrets_file: - secrets_file.write(f"{sys.argv[2]},{sys.argv[3]}\n") + secrets_file.write(f"{sys.argv[2]};{sys.argv[3]}\n") except PermissionError: print("Permission denied") sys.exit(1) @@ -30,7 +30,7 @@ def main(): try: with open("/root/secrets.txt", "r") as secrets_file: secrets_file_lines = secrets_file.readlines() - secrets = [(str(i+1), secrets_file_lines[i].split(",")[0], secrets_file_lines[i].split(",")[1]) for i in range(len(secrets_file_lines))] + secrets = [(str(i+1), secrets_file_lines[i].split(";")[0], secrets_file_lines[i].split(";")[1]) for i in range(len(secrets_file_lines))] if sys.argv[1] == "list": for secret in secrets: diff --git a/.vimrc b/.vimrc index 8fac130..ee38cc0 100644 --- a/.vimrc +++ b/.vimrc @@ -70,6 +70,8 @@ augroup END " autocmd VimEnter * silent !echo -ne "\e[2 q" " augroup END +let g:highlightedyank_highlight_duration = 100 + call plug#begin() Plug 'joshdick/onedark.vim' @@ -82,6 +84,8 @@ Plug 'tpope/vim-commentary' Plug 'tpope/vim-surround' +Plug 'machakann/vim-highlightedyank' + call plug#end() syntax on