From 6725f1f41a6ed1add4e0ad787264f83a669e6e98 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Wed, 11 Mar 2020 17:22:29 +0100 Subject: [PATCH] Changes with .scripts dir - change name of 'passworder' to 'rofi-keepasxc' - move 'rofi-keepassxc' to other repo - delete useless scripts - modify 'updot' script to not adding 'rofi-keepassxc' and useless scripts to this repo - modify sxhkd configs because of reason change name of 'passworder' --- .gitmodules | 3 +++ botfiles/.config/sxhkd/sxhkdrc | 2 +- botfiles/.config/sxhkd/sxhkdrc.laptop | 2 +- botfiles/.config/sxhkd/sxhkdrc.pc | 4 +++- botfiles/.scripts/get-local-wificard-ip.sh | 1 - botfiles/.scripts/lockscreen.sh | 0 botfiles/.scripts/passworder.sh | 17 ----------------- botfiles/.scripts/rofi-keepassxc | 1 + botfiles/.scripts/scr | 6 ------ botfiles/.scripts/showcolors | 9 --------- updot | 8 +++++--- 11 files changed, 14 insertions(+), 39 deletions(-) create mode 100644 .gitmodules delete mode 100755 botfiles/.scripts/get-local-wificard-ip.sh mode change 100644 => 100755 botfiles/.scripts/lockscreen.sh delete mode 100755 botfiles/.scripts/passworder.sh create mode 160000 botfiles/.scripts/rofi-keepassxc delete mode 100644 botfiles/.scripts/scr delete mode 100644 botfiles/.scripts/showcolors diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9b5622d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "botfiles/.scripts/rofi-keepassxc"] + path = botfiles/.scripts/rofi-keepassxc + url = https://github.com/samedamci/rofi-keepassxc diff --git a/botfiles/.config/sxhkd/sxhkdrc b/botfiles/.config/sxhkd/sxhkdrc index f853257..74e76d1 100644 --- a/botfiles/.config/sxhkd/sxhkdrc +++ b/botfiles/.config/sxhkd/sxhkdrc @@ -32,7 +32,7 @@ XF86Calculator st -e bc # passworder super + p - $HOME/.scripts/passworder.sh + $HOME/.scripts/rofi-keepassxc/rofi-keepassxc #~~~~~~~~~~~~ # WM CONTROL diff --git a/botfiles/.config/sxhkd/sxhkdrc.laptop b/botfiles/.config/sxhkd/sxhkdrc.laptop index 62cd1f3..a78983d 100644 --- a/botfiles/.config/sxhkd/sxhkdrc.laptop +++ b/botfiles/.config/sxhkd/sxhkdrc.laptop @@ -26,7 +26,7 @@ End $HOME/.scripts/screenshot.sh # passworder super + p - $HOME/.scripts/passworder.sh + $HOME/.scripts/rofi-keepassxc/rofi-keepassxc #~~~~~~~~~~~~ # WM CONTROL diff --git a/botfiles/.config/sxhkd/sxhkdrc.pc b/botfiles/.config/sxhkd/sxhkdrc.pc index 5fffcea..55c4c9a 100644 --- a/botfiles/.config/sxhkd/sxhkdrc.pc +++ b/botfiles/.config/sxhkd/sxhkdrc.pc @@ -30,7 +30,9 @@ XF86Mail # bc XF86Calculator st -e bc - +# passworder +super + p + $HOME/.scripts/rofi-keepassxc/rofi-keepassxc #~~~~~~~~~~~~ # WM CONTROL #~~~~~~~~~~~~ diff --git a/botfiles/.scripts/get-local-wificard-ip.sh b/botfiles/.scripts/get-local-wificard-ip.sh deleted file mode 100755 index 4fd3755..0000000 --- a/botfiles/.scripts/get-local-wificard-ip.sh +++ /dev/null @@ -1 +0,0 @@ -ip a show wlp8s0 | grep -Eo '(inet)?*([0-9]*\.){3}[0-9]*' | grep -v '**\.255' diff --git a/botfiles/.scripts/lockscreen.sh b/botfiles/.scripts/lockscreen.sh old mode 100644 new mode 100755 diff --git a/botfiles/.scripts/passworder.sh b/botfiles/.scripts/passworder.sh deleted file mode 100755 index 97fc6ec..0000000 --- a/botfiles/.scripts/passworder.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env zsh - -CACHE=$HOME/.cache/passworder/ -mkdir -p $CACHE -DB="$HOME/Passwords/keepass.kdbx" - -rofi -dmenu -i -p "Enter your database password" -l 0 -password | read DBPASS - -ERROR_MSG='Error while reading the database' -CHECK=$(echo $DBPASS | keepassxc-cli open $DB &> $CACHE/tmp && grep -oh $ERROR_MSG $CACHE/tmp) - -if [ "$CHECK" = "$ERROR_MSG" ]; then - rofi -e "$ERROR_MSG" -else - echo $DBPASS | keepassxc-cli ls $DB | grep -v 'Enter' | grep -v '?*/' | sort | rofi -dmenu -i -p "Entry list" -l 30 | read ENTRY - echo $DBPASS | keepassxc-cli clip $DB $ENTRY -fi diff --git a/botfiles/.scripts/rofi-keepassxc b/botfiles/.scripts/rofi-keepassxc new file mode 160000 index 0000000..164c489 --- /dev/null +++ b/botfiles/.scripts/rofi-keepassxc @@ -0,0 +1 @@ +Subproject commit 164c4891fd7f57b1a7fb444de9d15cb41fb72f8b diff --git a/botfiles/.scripts/scr b/botfiles/.scripts/scr deleted file mode 100644 index 62268d0..0000000 --- a/botfiles/.scripts/scr +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -grep -Eo '#[0-9,A-Z,a-z]**' ~/.Xresources | sort | head -n 1 - -echo -echo -en "\e[$((30 + i))m\u2588\u2588 ${colors[i]} \e[0m"; echo -e "\n" diff --git a/botfiles/.scripts/showcolors b/botfiles/.scripts/showcolors deleted file mode 100644 index 6388464..0000000 --- a/botfiles/.scripts/showcolors +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -grep -Eoq '#[0-9,A-Z,a-z]**' ~/.Xresources | sort - -echo -for i in {0..7}; do echo -en "\e[$((30 + i))m\u2588\u2588 ${colors[i]} \e[0m"; echo "${colors[i]}"; done -echo -for i in {8..15}; do echo -en "\e[1;$((22 + i))m\u2588\u2588 ${colors[i]} \e[0m"; done -echo -e "\n" diff --git a/updot b/updot index a1c7745..460a476 100755 --- a/updot +++ b/updot @@ -2,9 +2,11 @@ echo "Adding configs to dotfiles repo..." cd ~ -cp -r .zshrc .Xresources .aliases .bashrc .scripts .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null -cd .config +cp .zshrc .Xresources .aliases .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null +cd ~/.scripts/ +cp lockscreen.sh powermenu.sh screenshot.sh update-check.sh updater.sh wificheck.sh ~/Dotfiles/botfiles/.scripts/ &>/dev/null +cd ~/.config cp -r autostart bspwm dconf dunst GIMP gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null cd ~/Dotfiles/botfiles/.config/ -rm -rf nvim/bundle zsh/plugins mpd/database zsh/history mpd/mpd.log mpd/pid mpd/state mpd/sticker.sql vis/vis.log ncmpcpp/lyrics +rm -rf nvim/bundle zsh/plugins mpd/database zsh/history mpd/mpd.log mpd/pid mpd/state mpd/sticker.sql vis/vis.log ncmpcpp/lyrics echo "Done."