diff --git a/.config/i3/config b/.config/i3/config index cce35cc4..31c63ab9 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -437,4 +437,4 @@ bindsym $mod+period exec /usr/lib/virtualbox/VirtualBoxVM --comment 'w7litex86' exec_always --no-startup-id notify-send -i ~/.scripts/pix/larbs.png 'Welcome to LARBS: Press Super+F1 for the manual.' -t 10000 -bindsym $mod+section exec --no-startup-id xkblayout-state set +1 && pkill -RTMIN+17 i3blocks +bindsym $mod+section exec --no-startup-id xkblayout-state set +1 && pkill -RTMIN+18 i3blocks diff --git a/.config/i3blocks/config b/.config/i3blocks/config index ef324158..26764f9b 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -61,7 +61,7 @@ command=disk / [layswitch] interval=once -signal=17 +signal=18 [battery] @@ -81,5 +81,8 @@ interval=30 [internet] interval=10 +[mycloud] +interval=once +signal=17 [help] interval=once diff --git a/.config/ranger/shortcuts.conf b/.config/ranger/shortcuts.conf index e69de29b..2072dd61 100644 --- a/.config/ranger/shortcuts.conf +++ b/.config/ranger/shortcuts.conf @@ -0,0 +1,53 @@ +map gh cd ~/ +map th tab_new ~/ +map mh shell mv -v %s ~/ +map Yh shell cp -rv %s ~/ +map gd cd ~/Documents +map td tab_new ~/Documents +map md shell mv -v %s ~/Documents +map Yd shell cp -rv %s ~/Documents +map gD cd ~/Downloads +map tD tab_new ~/Downloads +map mD shell mv -v %s ~/Downloads +map YD shell cp -rv %s ~/Downloads +map gm cd ~/Music +map tm tab_new ~/Music +map mm shell mv -v %s ~/Music +map Ym shell cp -rv %s ~/Music +map gpp cd ~/Pictures +map tpp tab_new ~/Pictures +map mpp shell mv -v %s ~/Pictures +map Ypp shell cp -rv %s ~/Pictures +map gvv cd ~/Videos +map tvv tab_new ~/Videos +map mvv shell mv -v %s ~/Videos +map Yvv shell cp -rv %s ~/Videos +map gcf cd ~/.config +map tcf tab_new ~/.config +map mcf shell mv -v %s ~/.config +map Ycf shell cp -rv %s ~/.config +map gsc cd ~/.scripts +map tsc tab_new ~/.scripts +map msc shell mv -v %s ~/.scripts +map Ysc shell cp -rv %s ~/.scripts +map gmn cd /mnt +map tmn tab_new /mnt +map mmn shell mv -v %s /mnt +map Ymn shell cp -rv %s /mnt +map bf shell $EDITOR ~/.config/bmfiles +map bd shell $EDITOR ~/.config/bmdirs +map cfb shell $EDITOR ~/.bashrc +map cfa shell $EDITOR ~/.config/aliasrc +map cfz shell $EDITOR ~/.zshrc +map cfv shell $EDITOR ~/.config/nvim/init.vim +map cfr shell $EDITOR ~/.config/ranger/rc.conf +map cfi shell $EDITOR ~/.config/i3/config +map cfm shell $EDITOR ~/.config/mutt/muttrc +map eb shell $EDITOR ~/Documents/LaTeX/uni.bib +map cv shell $EDITOR ~/Documents/LaTeX/cv.tex +map cfd shell $EDITOR ~/.Xdefaults +map cfu shell $EDITOR ~/.config/newsboat/urls +map cfn shell $EDITOR ~/.config/newsboat/config +map cfmb shell $EDITOR ~/.config/ncmpcpp/bindings +map cfmc shell $EDITOR ~/.config/ncmpcpp/config +map er shell $EDITOR ~/Documents/referbib diff --git a/.config/wall.png b/.config/wall.png index 1a1b51a3..f9c934ea 100644 Binary files a/.config/wall.png and b/.config/wall.png differ diff --git a/.scripts/i3cmds/myCloud b/.scripts/i3cmds/myCloud new file mode 100755 index 00000000..6213c783 --- /dev/null +++ b/.scripts/i3cmds/myCloud @@ -0,0 +1,15 @@ +#!/bin/bash +if [ $(mount | grep -c ~/MyCloud) != 1 ] +then + echo "12345" | sshfs root@192.168.1.3:/opt/MyCloud ~/MyCloud -o idmap=user,uid=1000,gid=1000,password_stdin,reconnect,allow_other,default_permissions,cache=yes,kernel_cache,no_readahead,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,compression=no && notify-send "MyCloudDisk was mounted successfuly" || notify-send "MyCloudDisk was not mounted" + +else + fusermount -u ~/MyCloud && notify-send "MyCloudDisk was unmounted successfuly" || notify-send "Unmount Failed" +fi + +if [ $(mount | grep -c ~/MyCloud) == 1 ] +then + echo 😄 +else + echo 😞 +fi diff --git a/.scripts/i3cmds/mycloudoff b/.scripts/i3cmds/mycloudoff new file mode 100755 index 00000000..5f573cbf --- /dev/null +++ b/.scripts/i3cmds/mycloudoff @@ -0,0 +1,10 @@ +#!/bin/sh +ask() { \ + case $(printf "Yes\\nNo" | dmenu -i -p "Are you sure?") in + Yes) sshpass -p 12345 ssh root@192.168.1.3 PowerOff;; + No) echo "!";; + esac + } + +ask + diff --git a/.scripts/i3cmds/umountMyCloud b/.scripts/i3cmds/umountMyCloud new file mode 100755 index 00000000..da9c4406 --- /dev/null +++ b/.scripts/i3cmds/umountMyCloud @@ -0,0 +1,2 @@ +#!/bin/bash +fusermount -u ~/MyCloud && notify-send "MyCloudDisk was unmounted successfuly" || notify-send "Unmount Failed" diff --git a/.scripts/statusbar/battery b/.scripts/statusbar/battery index e5f6ec79..06506ac7 100755 --- a/.scripts/statusbar/battery +++ b/.scripts/statusbar/battery @@ -1,7 +1,10 @@ #!/bin/sh # Give a battery name (e.g. BAT0) as an argument. +battery="$(acpi -i)" + case $BLOCK_BUTTON in + 1) pgrep -x dunst >/dev/null && notify-send "${battery}";; 3) pgrep -x dunst >/dev/null && notify-send "🔋 Battery module: 🔋: discharging 🛑: not charging diff --git a/.scripts/statusbar/brightness b/.scripts/statusbar/brightness new file mode 100755 index 00000000..00ee97d5 --- /dev/null +++ b/.scripts/statusbar/brightness @@ -0,0 +1,10 @@ +#!/bin/sh + +icon="🔆" + +case $BLOCK_BUTTON in + 4) xbacklight -inc 4 ;; + 5) xbacklight -dec 4 ;; +esac + +printf "%s %s%%\\n" "$icon" "$(echo "$(xbacklight -get)*100/100" | bc)" diff --git a/.scripts/statusbar/layswitch b/.scripts/statusbar/layswitch new file mode 100755 index 00000000..1cec6a0b --- /dev/null +++ b/.scripts/statusbar/layswitch @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +case $BLOCK_BUTTON in + 1) xkblayout-state set +1 ;; +esac + +LNG=$(xkblayout-state print %s | awk '{print toupper($0)}') + +case $LNG in + "FI") + #CLR=\#00FF00 ;; # green + LNG=🇫🇮;; + "ARA") + #CLR=\#FF0000 ;; # red + LNG=🇪🇬;; + *) + CLR=\#FFFFFF ;; # all others default-white +esac + +echo "$LNG" +echo "$LNG" +#echo "$CLR" diff --git a/.scripts/statusbar/mycloud b/.scripts/statusbar/mycloud new file mode 100755 index 00000000..2f564bf8 --- /dev/null +++ b/.scripts/statusbar/mycloud @@ -0,0 +1,8 @@ +#!/bin/bash +if [ $(mount | grep -c ~/MyCloud) == 1 ] +then + echo 💾 +else + echo "" +fi +