From 37e7943cdc862b561bbe61b1fd63d87705a811b6 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 09:52:31 +0100 Subject: [PATCH 01/17] removing pacclean alias --- .config/aliasrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/aliasrc b/.config/aliasrc index f41122e..5854274 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -45,7 +45,6 @@ alias mv="mv -i" # pacman alias pac="sudo pacman" -alias pacclean="sudo pacman -Rs $(pacman -Qtdq)" # ping alias ping="ping -c 5" From f77edbb6d662db70cbbd65255a355e0fdcef758b Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 11:24:31 +0100 Subject: [PATCH 02/17] removing unneeded alias for cd-ing out --- .config/aliasrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/aliasrc b/.config/aliasrc index 5854274..28c2c1b 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -9,7 +9,6 @@ alias ".."="cd .." alias "..."="cd ../.." alias "...."="cd ../../.." alias "....."="cd ../../../.." -alias "......"="cd ../../../../.." # cp alias cp="cp -i" From 1bd2c4281e5998079ba1c7fe178bcb8bf0120d50 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 15:28:04 +0100 Subject: [PATCH 03/17] PlugInstall when entering vim --- .config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f46eafc..6ed3ada 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,6 +6,9 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) autocmd VimEnter * PlugInstall endif +" PlugInstall when entering vim +autocmd VimEnter * PlugInstall + "set bg=light set go=a set mouse=a From 60c5410d0f166d5231e9879b1e9e8c12e4f866fe Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 17:12:33 +0100 Subject: [PATCH 04/17] no, lets dont do that --- .config/nvim/init.vim | 3 --- 1 file changed, 3 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 6ed3ada..f46eafc 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,9 +6,6 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) autocmd VimEnter * PlugInstall endif -" PlugInstall when entering vim -autocmd VimEnter * PlugInstall - "set bg=light set go=a set mouse=a From ff49aa15a2eec7b13241640d3f0c8e2e61895f48 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 18:10:49 +0100 Subject: [PATCH 05/17] opening html/pdf files from corresponding vim by lukesmith added --- .config/nvim/init.vim | 3 +++ .local/bin/opout | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .local/bin/opout diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f46eafc..43e085d 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -99,6 +99,9 @@ autocmd FileType html inoremap ΓΌ ü " Compiler for languages map c :w! \| !compiler % +" Open corresponding file (pdf/html/...) +map p :!opout % + " Delete trailing whitespaces on save autocmd BufWritePre * %s/\s\+$//e diff --git a/.local/bin/opout b/.local/bin/opout new file mode 100644 index 0000000..28af763 --- /dev/null +++ b/.local/bin/opout @@ -0,0 +1,13 @@ +#!/bin/sh + +# opout: "open output": A general handler for opening a file's intended output, +# usually the pdf of a compiled document. I find this useful especially +# running from vim. + +basename="$(echo "$1" | sed 's/\.[^\/.]*$//')" + +case "$1" in + *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid xdg-open "$basename".pdf >/dev/null 2>&1 & ;; + *.html) setsid "$BROWSER" "$basename".html >/dev/null 2>&1 & ;; + *.sent) setsid sent "$1" >/dev/null 2>&1 & ;; +esac From 81edd7d2039352ad1692943519e80e330642e485 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Wed, 25 Mar 2020 20:58:33 +0100 Subject: [PATCH 06/17] changing media directory --- .config/mpd/mpd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index c20f610..3932686 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -1,7 +1,7 @@ db_file "~/.config/mpd/database" log_file "~/.config/mpd/log" -music_directory "~/media/music" -playlist_directory "~/.config/mpd/playlists" +music_directory "/media/music" +playlist_directory "/media/playlists" pid_file "~/.config/mpd/pid" state_file "~/.config/mpd/state" sticker_file "~/.config/mpd/sticker.sql" From 0f324e25a30ba89d3a1bc07ed95cac1f70cf5207 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Thu, 26 Mar 2020 11:15:49 +0100 Subject: [PATCH 07/17] test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 From 295734bbbba601f8b957056e8ab7c587de8dd38a Mon Sep 17 00:00:00 2001 From: Marten Kante <43725244+TiynGER@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:16:44 +0100 Subject: [PATCH 08/17] Delete test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test diff --git a/test b/test deleted file mode 100644 index e69de29..0000000 From e3f91d2ca46c42f07c55edcd0ab52b6c73bcfbef Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 10:50:29 +0100 Subject: [PATCH 09/17] changing dmenu prompts --- .local/bin/tools/dmenupass | 2 +- .local/bin/tools/dmenuunicode | 2 +- .local/bin/tools/prompt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/tools/dmenupass b/.local/bin/tools/dmenupass index 4fc464f..da524ee 100755 --- a/.local/bin/tools/dmenupass +++ b/.local/bin/tools/dmenupass @@ -1,2 +1,2 @@ #!/bin/sh -dmenu -fn Monospace-18 -sb "#d79921" -sf "#1d2021" -nf "#000000" -nb "#000000" -p "$1" <&- && echo +dmenu -p "$1" <&- && echo diff --git a/.local/bin/tools/dmenuunicode b/.local/bin/tools/dmenuunicode index 429e41e..8791f46 100755 --- a/.local/bin/tools/dmenuunicode +++ b/.local/bin/tools/dmenuunicode @@ -6,7 +6,7 @@ xclip -h >/dev/null || exit if [ -e ~/.config/fontawesome ]; then - chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 -fn Monospace-18) + chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 ) else chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 -fn Monospace-18) fi diff --git a/.local/bin/tools/prompt b/.local/bin/tools/prompt index 25310ce..9154e47 100755 --- a/.local/bin/tools/prompt +++ b/.local/bin/tools/prompt @@ -4,4 +4,4 @@ # For example: # `./prompt "Do you want to shutdown?" "shutdown -h now"` -[ "$(printf "No\\nYes" | dmenu -i -fn Monospace-13 -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2 +[ "$(printf "No\\nYes" | dmenu -i -p "$1" )" = "Yes" ] && $2 From 56e1bab5e78fea556262bf25f54e54ea1dd3b5e8 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 11:45:24 +0100 Subject: [PATCH 10/17] minor changes to dmenu scripts --- .local/bin/tools/dmenupass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/tools/dmenupass b/.local/bin/tools/dmenupass index da524ee..d484b14 100755 --- a/.local/bin/tools/dmenupass +++ b/.local/bin/tools/dmenupass @@ -1,2 +1,2 @@ #!/bin/sh -dmenu -p "$1" <&- && echo +dmenu -P -p "$1" <&- && echo From be29493f83542387caa0e1d105052a1a6c9f9869 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 11:57:52 +0100 Subject: [PATCH 11/17] changing lockscreen to slock --- .config/sxhkd/sxhkdrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 058013c..ceae7a9 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -58,7 +58,7 @@ super + F8 super + F9 $TERMINAL -e sudo -A nmtui super + F10 - prompt 'Lock computer?' "i3lock -c 222222" + prompt 'Lock computer?' "slock" super + F11 prompt "Reboot computer?" "sudo -A shutdown -r now" super + F12 From 5f8cf5d7a6c22b7189157a45c33f567d45aee055 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 15:05:06 +0100 Subject: [PATCH 12/17] minor changes to lock shortcut --- .config/sxhkd/sxhkdrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index ceae7a9..4586018 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -58,7 +58,7 @@ super + F8 super + F9 $TERMINAL -e sudo -A nmtui super + F10 - prompt 'Lock computer?' "slock" + prompt "Lock computer?" "slock" super + F11 prompt "Reboot computer?" "sudo -A shutdown -r now" super + F12 From b1708ce48435afe141d5c825e0abbe4ee41fffbb Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 15:07:19 +0100 Subject: [PATCH 13/17] correct height for dmenuunicode --- .local/bin/tools/dmenuunicode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/tools/dmenuunicode b/.local/bin/tools/dmenuunicode index 8791f46..ac62bd9 100755 --- a/.local/bin/tools/dmenuunicode +++ b/.local/bin/tools/dmenuunicode @@ -8,7 +8,7 @@ xclip -h >/dev/null || exit if [ -e ~/.config/fontawesome ]; then chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 ) else - chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 -fn Monospace-18) + chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 ) fi [ "$chosen" != "" ] || exit From db8c10313dbdeb57a8e1758846ab5e8b610b5148 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 17:31:53 +0100 Subject: [PATCH 14/17] changing back to lukes setbg --- .local/bin/tools/setbg | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.local/bin/tools/setbg b/.local/bin/tools/setbg index 5c5e8a3..be4adfd 100755 --- a/.local/bin/tools/setbg +++ b/.local/bin/tools/setbg @@ -1,5 +1,22 @@ #!/bin/sh -# Sets the background. -wallDir=~/.config/wallpaper/$(date | awk '{print $1}') -currWall=$wallDir/$(ls $wallDir | shuf -n 1) -xwallpaper --zoom $currWall + +# In LARBS, ~/.config/wall.png is the location of the system wallpaper. This +# script, if given an argument, moves it there. This script without an +# argument sets ~/.config/wall.png as the wallpaper, which is required on login +# if you don't want a black screen. +# +# You may also give a directory name to select a random image from that +# directory as a wallpaper. Be careful that the directory only has images. + +[ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." + +[ -d "$1" ] && cp "$(find "$1" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." + +# If pywal is installed, use it. +type wal >/dev/null 2>&1 && { wal -c + wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun + xsetroot -name "fsignal:xrdb" + killall dwmblocks + setsid dwmblocks >/dev/null & } >/dev/null 2>&1 + +xwallpaper --zoom ~/.config/wall.png From 6ad677a3d25ff756db7b56a42b671a23f03f92d3 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 27 Mar 2020 17:37:34 +0100 Subject: [PATCH 15/17] dwm < i3 --- .local/bin/tools/setbg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/tools/setbg b/.local/bin/tools/setbg index be4adfd..745658b 100755 --- a/.local/bin/tools/setbg +++ b/.local/bin/tools/setbg @@ -16,7 +16,7 @@ type wal >/dev/null 2>&1 && { wal -c wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun xsetroot -name "fsignal:xrdb" - killall dwmblocks - setsid dwmblocks >/dev/null & } >/dev/null 2>&1 + killall i3blocks + setsid i3blocks >/dev/null & } >/dev/null 2>&1 xwallpaper --zoom ~/.config/wall.png From 7368ec60b4de3112db6a23b7ce50053ffb36daff Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 28 Mar 2020 12:14:02 +0100 Subject: [PATCH 16/17] switch to dwm --- .config/i3/config | 175 ----------------------- .config/i3blocks/config | 39 ----- .config/sxhkd/sxhkdrc | 101 ------------- .config/xorg/xinitrc | 3 +- .config/xorg/xprofile | 6 +- .local/bin/i3cmds/i3-scratchpad-dmenu.py | 27 ---- .local/bin/i3cmds/i3resize | 27 ---- .local/bin/statusbar/dwmbar | 10 ++ .local/bin/statusbar/refbar | 5 + .local/bin/sxhkd/dmenumount | 59 -------- .local/bin/sxhkd/dmenuumount | 41 ------ .local/bin/sxhkd/startpagesearch | 20 --- .profile | 1 + 13 files changed, 22 insertions(+), 492 deletions(-) delete mode 100644 .config/i3/config delete mode 100644 .config/i3blocks/config delete mode 100644 .config/sxhkd/sxhkdrc delete mode 100644 .local/bin/i3cmds/i3-scratchpad-dmenu.py delete mode 100755 .local/bin/i3cmds/i3resize create mode 100755 .local/bin/statusbar/dwmbar create mode 100755 .local/bin/statusbar/refbar delete mode 100755 .local/bin/sxhkd/dmenumount delete mode 100755 .local/bin/sxhkd/dmenuumount delete mode 100755 .local/bin/sxhkd/startpagesearch diff --git a/.config/i3/config b/.config/i3/config deleted file mode 100644 index ca286b0..0000000 --- a/.config/i3/config +++ /dev/null @@ -1,175 +0,0 @@ -# vim: filetype=i3 -# File originally by Luke Smith - -# This config file will use environmental variables such as $BROWSER and $TERMINAL. -# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below: -# -# export FILE="ranger" -# export TERMINAL="st" - -# #------Auto Start-------# # -exec --no-startup-id owncloud -exec --no-startup-id toggletouchpad - -# #---Basic Definitions---# # -for_window [class="^.*"] border pixel 1 -gaps inner 0 -gaps outer 0 -set $term --no-startup-id $TERMINAL -set $mod Mod4 -font xft:mono 10 - -# #---Dropdown Windows---# # -# General dropdown window traits. The order can matter. -for_window [instance="dropdown_*"] floating enable -for_window [class="de.uol.swp.client.ClientApp"] floating enable -for_window [instance="dropdown_*"] move scratchpad -for_window [instance="dropdown_*"] sticky enable -for_window [instance="dropdown_*"] scratchpad show -for_window [instance="dropdown_tmuxdd"] resize set 625 450 -for_window [instance="dropdown_dropdowncalc"] resize set 800 300 -for_window [instance="dropdown_tmuxdd"] border pixel 3 -for_window [instance="dropdown_dropdowncalc"] border pixel 2 -for_window [instance="dropdown_*"] move position center - - -bar { - font pango:mono 10 - status_command i3blocks - position top - mode dock - modifier None - colors { - background #000000 - statusline #ffffff - separator #333333 - #Bord #Back #Text - focused_workspace #ffa500 #4a4a4a #ffa500 - active_workspace #ffa500 #33333 #ffa500 - inactive_workspace #ffa500 #000000 #ffa500 - urgent_workspace #ffa500 #000000 #900000 - } -} -client.placeholder #242424 #242424 #242424 -client.background #242424 #242424 #242424 -client.focused #4a4a4a #4a4a4a #e5e5e5 #6a6a6a -client.unfocused #4a4a4a #222222 #aaaaaa #222222 -client.focused_inactive #4a4a4a #222222 #a9a9a9 #222222 -client.urgent #4a4a4a #4a4a4a #f7f7f7 #4a4a4a - - -# #---Basic Bindings---# # -bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3-msg exit" - -#bindsym $mod+Return taken by sxhkd - -#bindym $mod+b taken by sxhkd -bindsym $mod+Shift+b bar mode toggle - -#bindsym $mod+c taken by sxhkd - -bindsym $mod+Shift+d floating toggle - -bindsym $mod+Shift+f fullscreen toggle - -bindsym $mod+h focus left -bindsym $mod+Shift+h move left 30 - -#bindsym $mod+i taken by sxhkd -bindsym $mod+Shift+i exec --no-startup-id i3resize up - -bindsym $mod+j focus down -bindsym $mod+Shift+j move down 30 - -bindsym $mod+k focus up -bindsym $mod+Shift+k move up 30 - -bindsym $mod+l focus right -bindsym $mod+Shift+l move right 30 - -#bindsym $mod+m taken by sxhkd -bindsym $mod+Shift+m move scratchpad - -#bindsym $mod+n taken by sxhkd -#bindsym $mod+Shift+n taken by sxhkd - -bindsym $mod+Shift+o exec --no-startup-id i3resize right - -#bindym $mod+p taken by sxhkd - -bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill -bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid` - -#bindsym $mod+r taken by sxhkd -#bindsym $mod+shift+r taken by sxhkd - -#bindsym $mod+s taken by sxhkd - -bindsym $mod+t split toggle - -bindsym $mod+Shift+u exec --no-startup-id i3resize down - -#bindsym $mod+x taken by sxhkd - -bindsym $mod+Shift+z exec --no-startup-id i3resize left - -#bindsym $mod+F5 taken by sxhkd - -#bindsym $mod+F6 taken by sxhkd - -#bindsym $mod+F7 taken by sxhkd - -#bindsym $mod+F8 taken by sxhkd - -#bindsym $mod+F9 taken by sxhkd - -#bindsym $mod+F10 taken by sxhkd - -#bindsym $mod+F11 taken by sxhkd - -#bindsym $mod+F12 taken by sxhkd - - -# #---Workspace Bindings---# # -set $ws1 "1DF" -set $ws2 "2VR" -set $ws3 "3RS" -set $ws4 "4RS" -set $ws5 "5WK" -set $ws6 "6WK" -set $ws7 "7ME" -set $ws8 "8CM" -set $ws9 "9GM" -set $ws0 "0EX" - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws0 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws0 - -for_window [class="Pinentry"] sticky enable -for_window [class="sent"] border pixel 0px -for_window [title="GIMP Startup"] move workspace $ws5 -for_window [class="Gimp"] move workspace $ws5 -for_window [window_role="GtkFileChooserDialog"] resize set 800 600 -for_window [window_role="GtkFileChooserDialog"] move position center -for_window [title="Default - Wine desktop"] floating enable diff --git a/.config/i3blocks/config b/.config/i3blocks/config deleted file mode 100644 index 4af574e..0000000 --- a/.config/i3blocks/config +++ /dev/null @@ -1,39 +0,0 @@ -separator_block_width=15 -markup=pango - -[weather] -command=~/.local/bin/statusbar/weather -interval=1200 -signal=5 - -[memory] -command=~/.local/bin/statusbar/memory -interval=30 -label=🧠 - -[cpu] -command=~/.local/bin/statusbar/cpu -interval=15 -label=πŸ’» - -[volume] -command=~/.local/bin/statusbar/volume -interval=once -signal=10 - -[disk] -interval=180 -command=~/.local/bin/statusbar/disk / - -[battery] -command=~/.local/bin/statusbar/battery BAT0 -interval=180 - -[clock] -command=~/.local/bin/statusbar/clock -label=πŸ“… -interval=30 - -[internet] -command=~/.local/bin/statusbar/internet -interval=10 diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc deleted file mode 100644 index 4586018..0000000 --- a/.config/sxhkd/sxhkdrc +++ /dev/null @@ -1,101 +0,0 @@ -## Basic binds -#super + shift + escape taken by i3 -super + Return - $TERMINAL -super + b - $BROWSER -super + c - code -#super + shift + d taken by i3 -super + f - $TERMINAL -e $FILE -#super + shift + f taken by i3 -#super + h taken by i3 -#super + shift + h taken by i3 -super + i - intellij-idea-ultimate-edition -#super + shift + i taken by i3 -#super + j taken by i3 -#super + shift + j taken by i3 -#super + k taken by i3 -#super + shift + k taken by i3 -#super + l taken by i3 -#super + shift + l taken by i3 -super + m - thunderbird -#super + shift + m taken by i3 -super + n - $TERMINAL -e newsboat -super + shift + n - i3-scratchpad-dmenu.py -#super + shift + o taken by i3 -super + p - $MUSIC -#super + q taken by i3 -#super + shift + q taken by i3 -super + r - $TERMINAL -e rtv -super + s - startpagesearch -super + shift + r - dmenu_run -c -l 20 -#super + t taken by i3 -#super + shift + u taken by i3 -super + x - xournalpp -#super + shift + z taken by i3 - -super + F4 - togglemonitor -super + F5 - toggletouchpad -super + F6 - dmenumount -super + F7 - dmenuumount -super + F8 - sudo -A systemctl restart NetworkManager -super + F9 - $TERMINAL -e sudo -A nmtui -super + F10 - prompt "Lock computer?" "slock" -super + F11 - prompt "Reboot computer?" "sudo -A shutdown -r now" -super + F12 - prompt "Shutdown computer?" "sudo -A shutdown -h now" -#super + 1 taken by i3 -#super + 2 taken by i3 -#super + 3 taken by i3 -#super + 4 taken by i3 -#super + 5 taken by i3 -#super + 6 taken by i3 -#super + 7 taken by i3 -#super + 8 taken by i3 -#super + 9 taken by i3 -#super + 0 taken by i3 -#super + shift + 1 taken by i3 -#super + shift + 2 taken by i3 -#super + shift + 3 taken by i3 -#super + shift + 4 taken by i3 -#super + shift + 5 taken by i3 -#super + shift + 6 taken by i3 -#super + shift + 7 taken by i3 -#super + shift + 8 taken by i3 -#super + shift + 9 taken by i3 -#super + shift + 0 taken by i3 - -## FN combinations -XF86Launch1 - xset dpms force off -XF86AudioMute - lmc m -XF86AudioMicMute - pactl set-source-mute 1 toggle -XF86AudioLowerVolume - lmc down 5 -XF86AudioRaiseVolume - lmc up 5 -XF86MonBrightnessDown - light -U 15 -XF86MonBrightnessUp - light -A 15 diff --git a/.config/xorg/xinitrc b/.config/xorg/xinitrc index fcc6419..40cf8cc 100644 --- a/.config/xorg/xinitrc +++ b/.config/xorg/xinitrc @@ -7,4 +7,5 @@ xterm -geometry 80x24+10+10 -fn 10x20 -exec i3 +setbg +exec dwm diff --git a/.config/xorg/xprofile b/.config/xorg/xprofile index 89e6a25..08d61ec 100644 --- a/.config/xorg/xprofile +++ b/.config/xorg/xprofile @@ -1,10 +1,12 @@ #!/bin/sh -setbg & # Set the background -sxhkd & # Bind keys xset r rate 300 50 & # Speed xrate up unclutter & # Remove mouse when idle xcompmgr & # xcompmgr for transparency dunst & # dunst for notifications redshift & # redshift for saving your eyes mpd & # starts the mpd server for music +toggletouchpad & # deactivates the touchpad +owncloud & +dwmbar & +#sxhkd & diff --git a/.local/bin/i3cmds/i3-scratchpad-dmenu.py b/.local/bin/i3cmds/i3-scratchpad-dmenu.py deleted file mode 100644 index b6c4883..0000000 --- a/.local/bin/i3cmds/i3-scratchpad-dmenu.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 - -import i3ipc -import subprocess -import re - -i3 = i3ipc.Connection() - -def get_scratchpad_windows(): - scratchpad_containers = i3.get_tree().scratchpad().descendants() - return filter(lambda c: c.type == 'con' and c.name, scratchpad_containers) - -def dmenu_choose(options): - """ Show a dmenu to choose a string item from a list of *options*. """ - dmenu_process = subprocess.Popen(["dmenu", "-l", "10"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) - stdoutdata, _ = dmenu_process.communicate("\n".join(options).encode()) - return stdoutdata.decode('utf-8') - -def main(): - scratchpad_windows = get_scratchpad_windows() - window_titles = [w.name for w in scratchpad_windows] - if window_titles: - window_to_restore = re.escape(dmenu_choose(window_titles).strip()) - i3.command('[title="{}"] scratchpad show'.format(window_to_restore)) - -if __name__ == '__main__': - main() diff --git a/.local/bin/i3cmds/i3resize b/.local/bin/i3cmds/i3resize deleted file mode 100755 index 11b0992..0000000 --- a/.local/bin/i3cmds/i3resize +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# This script was made by `goferito` on Github. -# Some cleanup by Luke. - -[ -z "$1" ] && echo "No direction provided" && exit 1 -distanceStr="2 px or 2 ppt" - -moveChoice() { - i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ - i3-msg resize "$3" "$4" "$distanceStr" -} - -case $1 in - up) - moveChoice grow up shrink down - ;; - down) - moveChoice shrink up grow down - ;; - left) - moveChoice shrink right grow left - ;; - right) - moveChoice grow right shrink left - ;; -esac - diff --git a/.local/bin/statusbar/dwmbar b/.local/bin/statusbar/dwmbar new file mode 100755 index 0000000..b273e29 --- /dev/null +++ b/.local/bin/statusbar/dwmbar @@ -0,0 +1,10 @@ +#!/bin/sh +status() { \ + echo "$(volume) | $(internet) | $(clock)" +} +while :; do + xsetroot -name "$(status | tr '\n' ' ')" + + sleep 1m +done + diff --git a/.local/bin/statusbar/refbar b/.local/bin/statusbar/refbar new file mode 100755 index 0000000..84f65a1 --- /dev/null +++ b/.local/bin/statusbar/refbar @@ -0,0 +1,5 @@ +#!/bin/sh + +# Refresh the dwmbar. + +kill "$(pstree -lp | grep -- -dwmbar\([0-9] | sed "s/.*sleep(\([0-9]\+\)).*/\1/")" diff --git a/.local/bin/sxhkd/dmenumount b/.local/bin/sxhkd/dmenumount deleted file mode 100755 index 0de5f0f..0000000 --- a/.local/bin/sxhkd/dmenumount +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Gives a dmenu prompt to mount unmounted drives. -# If they're in /etc/fstab, they'll be mounted automatically. -# Otherwise, you'll be prompted to give a mountpoint from already existsing directories. -# If you input a novel directory, it will prompt you to create that directory. - -getmount() { \ - [ -z "$chosen" ] && exit 1 - mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" - [ "$mp" = "" ] && exit 1 - if [ ! -d "$mp" ]; then - mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") - [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") - fi - } - -mountusb() { \ - chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" - sudo -A mount "$chosen" 2>/dev/null && notify-send "πŸ’» USB mounting" "$chosen mounted." && exit 0 - alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \\( -path *%s -prune \\) \\ \n",$3}') - getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted" - partitiontype="$(lsblk -no "fstype" "$chosen")" - case "$partitiontype" in - "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; - *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; - esac - notify-send "πŸ’» USB mounting" "$chosen mounted to $mp." - } - -mountandroid() { \ - chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) - getmount "$HOME -maxdepth 3 -type d" - simple-mtpfs --device "$chosen" "$mp" - notify-send "πŸ€– Android Mounting" "Android device mounted to $mp." - } - -asktype() { \ - case $(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?") in - USB) mountusb ;; - Android) mountandroid ;; - esac - } - -anddrives=$(simple-mtpfs -l 2>/dev/null) -usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')" - -if [ -z "$usbdrives" ]; then - [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit - echo "Android device(s) detected." - mountandroid -else - if [ -z "$anddrives" ]; then - echo "USB drive(s) detected." - mountusb - else - echo "Mountable USB drive(s) and Android device(s) detected." - asktype - fi -fi diff --git a/.local/bin/sxhkd/dmenuumount b/.local/bin/sxhkd/dmenuumount deleted file mode 100755 index dee53e7..0000000 --- a/.local/bin/sxhkd/dmenuumount +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# A dmenu prompt to unmount drives. -# Provides you with mounted partitions, select one to unmount. -# Drives mounted at /, /boot and /home will not be options to unmount. - -unmountusb() { - [ -z "$drives" ] && exit - chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') - [ -z "$chosen" ] && exit - sudo -A umount "$chosen" && notify-send "πŸ’» USB unmounting" "$chosen unmounted." - } - -unmountandroid() { \ - chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") - [ -z "$chosen" ] && exit - sudo -A umount -l "$chosen" && notify-send "πŸ€– Android unmounting" "$chosen unmounted." - } - -asktype() { \ - case "$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" in - USB) unmountusb ;; - Android) unmountandroid ;; - esac - } - -drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$2=="part"&&$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') - -if ! grep simple-mtpfs /etc/mtab; then - [ -z "$drives" ] && echo "No drives to unmount." && exit - echo "Unmountable USB drive detected." - unmountusb -else - if [ -z "$drives" ] - then - echo "Unmountable Android device detected." - unmountandroid - else - echo "Unmountable USB drive(s) and Android device(s) detected." - asktype - fi -fi diff --git a/.local/bin/sxhkd/startpagesearch b/.local/bin/sxhkd/startpagesearch deleted file mode 100755 index 3498d18..0000000 --- a/.local/bin/sxhkd/startpagesearch +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Gives a dmenu prompt to search Startpage. -# Without input, will open Startpage.com. -# URLs will be directly handed to the browser. -# Anything else, it search it. -browser=${RTVBROWSER:-firefox} - -pgrep -x dmenu && exit - -choice=$(echo "Startpage" | dmenu -i -p "Search Startpage:") || exit 1 - -if [ "$choice" = "Startpage" ]; then - $RTV_BROWSER "https://startpage.com" -else - if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then - $RTV_BROWSER "$choice" - else - $RTV_BROWSER "https://startpage.com/do/search/?q=$choice" - fi -fi diff --git a/.profile b/.profile index 46b0c44..b19a2bf 100644 --- a/.profile +++ b/.profile @@ -42,6 +42,7 @@ export TMUX_TMPDIR="$XDG_RUNTIME_HOME/tmux" export WGETRC="$XDG_CONFIG_HOME/wgetrc" export XAUTHORITY="$XDG_RUNTIME_HOME/Xauthority" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export _JAVA_AWT_WM_NONREPARENTING=1 # less/man colors export LESS=-R From 9de3398af20e12cd67a59c713d3785d0add2f07d Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 28 Mar 2020 12:16:54 +0100 Subject: [PATCH 17/17] moving the scripts --- .local/bin/{ => etc}/opout | 0 .local/bin/tools/sxhkd/dmenumount | 59 ++++++++++++++++++++++++++ .local/bin/tools/sxhkd/dmenuumount | 41 ++++++++++++++++++ .local/bin/tools/sxhkd/startpagesearch | 20 +++++++++ 4 files changed, 120 insertions(+) rename .local/bin/{ => etc}/opout (100%) mode change 100644 => 100755 create mode 100755 .local/bin/tools/sxhkd/dmenumount create mode 100755 .local/bin/tools/sxhkd/dmenuumount create mode 100755 .local/bin/tools/sxhkd/startpagesearch diff --git a/.local/bin/opout b/.local/bin/etc/opout old mode 100644 new mode 100755 similarity index 100% rename from .local/bin/opout rename to .local/bin/etc/opout diff --git a/.local/bin/tools/sxhkd/dmenumount b/.local/bin/tools/sxhkd/dmenumount new file mode 100755 index 0000000..0de5f0f --- /dev/null +++ b/.local/bin/tools/sxhkd/dmenumount @@ -0,0 +1,59 @@ +#!/bin/sh +# Gives a dmenu prompt to mount unmounted drives. +# If they're in /etc/fstab, they'll be mounted automatically. +# Otherwise, you'll be prompted to give a mountpoint from already existsing directories. +# If you input a novel directory, it will prompt you to create that directory. + +getmount() { \ + [ -z "$chosen" ] && exit 1 + mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" + [ "$mp" = "" ] && exit 1 + if [ ! -d "$mp" ]; then + mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") + [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") + fi + } + +mountusb() { \ + chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" + sudo -A mount "$chosen" 2>/dev/null && notify-send "πŸ’» USB mounting" "$chosen mounted." && exit 0 + alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \\( -path *%s -prune \\) \\ \n",$3}') + getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted" + partitiontype="$(lsblk -no "fstype" "$chosen")" + case "$partitiontype" in + "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; + *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; + esac + notify-send "πŸ’» USB mounting" "$chosen mounted to $mp." + } + +mountandroid() { \ + chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) + getmount "$HOME -maxdepth 3 -type d" + simple-mtpfs --device "$chosen" "$mp" + notify-send "πŸ€– Android Mounting" "Android device mounted to $mp." + } + +asktype() { \ + case $(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?") in + USB) mountusb ;; + Android) mountandroid ;; + esac + } + +anddrives=$(simple-mtpfs -l 2>/dev/null) +usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')" + +if [ -z "$usbdrives" ]; then + [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit + echo "Android device(s) detected." + mountandroid +else + if [ -z "$anddrives" ]; then + echo "USB drive(s) detected." + mountusb + else + echo "Mountable USB drive(s) and Android device(s) detected." + asktype + fi +fi diff --git a/.local/bin/tools/sxhkd/dmenuumount b/.local/bin/tools/sxhkd/dmenuumount new file mode 100755 index 0000000..dee53e7 --- /dev/null +++ b/.local/bin/tools/sxhkd/dmenuumount @@ -0,0 +1,41 @@ +#!/bin/sh +# A dmenu prompt to unmount drives. +# Provides you with mounted partitions, select one to unmount. +# Drives mounted at /, /boot and /home will not be options to unmount. + +unmountusb() { + [ -z "$drives" ] && exit + chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') + [ -z "$chosen" ] && exit + sudo -A umount "$chosen" && notify-send "πŸ’» USB unmounting" "$chosen unmounted." + } + +unmountandroid() { \ + chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") + [ -z "$chosen" ] && exit + sudo -A umount -l "$chosen" && notify-send "πŸ€– Android unmounting" "$chosen unmounted." + } + +asktype() { \ + case "$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" in + USB) unmountusb ;; + Android) unmountandroid ;; + esac + } + +drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$2=="part"&&$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') + +if ! grep simple-mtpfs /etc/mtab; then + [ -z "$drives" ] && echo "No drives to unmount." && exit + echo "Unmountable USB drive detected." + unmountusb +else + if [ -z "$drives" ] + then + echo "Unmountable Android device detected." + unmountandroid + else + echo "Unmountable USB drive(s) and Android device(s) detected." + asktype + fi +fi diff --git a/.local/bin/tools/sxhkd/startpagesearch b/.local/bin/tools/sxhkd/startpagesearch new file mode 100755 index 0000000..3498d18 --- /dev/null +++ b/.local/bin/tools/sxhkd/startpagesearch @@ -0,0 +1,20 @@ +#!/bin/sh +# Gives a dmenu prompt to search Startpage. +# Without input, will open Startpage.com. +# URLs will be directly handed to the browser. +# Anything else, it search it. +browser=${RTVBROWSER:-firefox} + +pgrep -x dmenu && exit + +choice=$(echo "Startpage" | dmenu -i -p "Search Startpage:") || exit 1 + +if [ "$choice" = "Startpage" ]; then + $RTV_BROWSER "https://startpage.com" +else + if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then + $RTV_BROWSER "$choice" + else + $RTV_BROWSER "https://startpage.com/do/search/?q=$choice" + fi +fi