diff --git a/.config/X11/dwm-xinit b/.config/X11/dwm-xinit index 6f78798..460a387 100644 --- a/.config/X11/dwm-xinit +++ b/.config/X11/dwm-xinit @@ -19,6 +19,10 @@ if test -f /usr/lib/ssh/x11-ssh-askpass then SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null fi & +exec dstartup & +exec xephyr-helper & +exec xhost +si:localuser:"$USER" & +no-hdmi-port.sh && with-hdmi-port.sh & # relaunch DWM if the binary changes, otherwise bail csum="" new_csum=$(sha1sum $(which dwm)) diff --git a/.config/alacritty.yml b/.config/alacritty.yml index 6f18ee4..30e3d8d 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -329,7 +329,7 @@ cursor: # - ▇ Block # - _ Underline # - | Beam - style: Block + style: Beam # Vi mode cursor style # @@ -359,8 +359,8 @@ cursor: # - (macOS) /bin/bash --login # - (Linux/BSD) user login shell # - (Windows) powershell -#shell: -# program: /bin/bash +shell: + program: /bin/zsh # args: # - --login diff --git a/.config/env b/.config/env index 23a07bb..e5b30ab 100644 --- a/.config/env +++ b/.config/env @@ -24,7 +24,7 @@ export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0" export LESSHISTFILE="-" export GEM_HOME="$XDG_DATA_HOME"/gem export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem -export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" +#export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" export WGETRC="$XDG_CONFIG_HOME/wgetrc" mkdir -p "$XDG_DATA_HOME"/wineprefixes export WINEPREFIX="\"$XDG_DATA_HOME\"/wineprefixes/default\"" @@ -60,7 +60,7 @@ alias monerod="monerod --data-dir \"$XDG_DATA_HOME\"/bitmonero" # Useful aliases alias ls="ls --color=auto" alias config="/usr/bin/git --git-dir=$HOME/.config/dotfiles --work-tree=$HOME" -alias update="sudo mount /dev/sda1 /boot && sudo pacman -Syu" +alias update="sudo mount /dev/sda1 /boot && sudo pacman -Syu" # fix this alias pman="pacman" alias cleanup_packages='(set -x; sudo pacman -R $(pacman -Qdtq))' alias myip="curl ipinfo.io/ip" @@ -73,4 +73,4 @@ alias e="$EDITOR" alias v="$EDITOR" alias ll="ls -lhA" alias ..="cd .." - +alias t="todo.sh" diff --git a/.config/firejail/brave.profile b/.config/firejail/brave.profile deleted file mode 100644 index 6571e99..0000000 --- a/.config/firejail/brave.profile +++ /dev/null @@ -1,34 +0,0 @@ -# Firejail profile for brave -# Description: Web browser that blocks ads and trackers by default. -# This file is overwritten after every install/update -# Persistent local customizations -include brave.local -# Persistent global definitions -include globals.local - -# noexec /tmp is included in chromium-common.profile and breaks Brave -ignore noexec /tmp - -noblacklist ${HOME}/.cache/BraveSoftware -noblacklist ${HOME}/.config/BraveSoftware -noblacklist ${HOME}/.config/brave -noblacklist ${HOME}/.config/brave-flags.conf -# brave uses gpg for built-in password manager -noblacklist ${HOME}/.gnupg -noblacklist ${HOME}/dl - -mkdir ${HOME}/.cache/BraveSoftware -mkdir ${HOME}/.config/BraveSoftware -mkdir ${HOME}/.config/brave -whitelist ${HOME}/.cache/BraveSoftware -whitelist ${HOME}/.config/BraveSoftware -whitelist ${HOME}/.config/brave -whitelist ${HOME}/.config/brave-flags.conf -whitelist ${HOME}/.gnupg -whitelist ${HOME}/dl - -# Brave sandbox needs read access to /proc/config.gz -noblacklist /proc/config.gz - -# Redirect -include chromium-common.profile diff --git a/.config/firejail/discord.profile b/.config/firejail/discord.profile deleted file mode 100644 index 913c593..0000000 --- a/.config/firejail/discord.profile +++ /dev/null @@ -1,23 +0,0 @@ -# Firejail profile for discord -# This file is overwritten after every install/update -# Persistent local customizations -include discord.local -# Persistent global definitions -include globals.local - -noblacklist ${HOME}/.config/discord -noblacklist ${HOME}/pix/keyboards -noblacklist ${HOME}/pix/memes -noblacklist ${HOME}/pix/screengrabs - -mkdir ${HOME}/.config/discord -whitelist ${HOME}/.config/discord -whitelist ${HOME}/pix/memes -whitelist ${HOME}/pix/sreengrabs -whitelist ${HOME}/pix/keyboards - -private-bin discord -private-opt discord - -# Redirect -include discord-common.profile diff --git a/.config/firejail/firefox-common.profile b/.config/firejail/firefox-common.profile deleted file mode 100644 index 760461c..0000000 --- a/.config/firejail/firefox-common.profile +++ /dev/null @@ -1,60 +0,0 @@ -# Firejail profile for firefox-common -# This file is overwritten after every install/update -# Persistent local customizations -include firefox-common.local -# Persistent global definitions -# added by caller profile -#include globals.local - -# noexec ${HOME} breaks DRM binaries. -?BROWSER_ALLOW_DRM: ignore noexec ${HOME} - -# Uncomment the following line (or put it in your firefox-common.local) to allow access to common programs/addons/plugins. -#include firefox-common-addons.inc - -noblacklist ${HOME}/.pki -noblacklist ${HOME}/.local/share/pki - -include disable-common.inc -include disable-devel.inc -include disable-exec.inc -include disable-interpreters.inc -include disable-programs.inc - -mkdir ${HOME}/.pki -mkdir ${HOME}/.local/share/pki -whitelist ${HOME}/dl -whitelist ${HOME}/.pki -whitelist ${HOME}/.local/share/pki -include whitelist-common.inc -include whitelist-var-common.inc - -apparmor -caps.drop all -# machine-id breaks pulse audio; it should work fine in setups where sound is not required. -#machine-id -netfilter -nodvd -nogroups -nonewprivs -# noroot breaks GTK_USE_PORTAL=1 usage, see https://github.com/netblue30/firejail/issues/2506. -noroot -notv -?BROWSER_DISABLE_U2F: nou2f -protocol unix,inet,inet6,netlink -# The below seccomp configuration still permits chroot syscall. See https://github.com/netblue30/firejail/issues/2506 for possible workarounds. -seccomp !chroot -shell none -# Disable tracelog, it breaks or causes major issues with many firefox based browsers, see https://github.com/netblue30/firejail/issues/1930. -#tracelog - -disable-mnt -?BROWSER_DISABLE_U2F: private-dev -# private-etc below works fine on most distributions. There are some problems on CentOS. -#private-etc alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,group,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,mailcap,mime.types,nsswitch.conf,pango,passwd,pki,pulse,resolv.conf,selinux,ssl,X11,xdg -private-tmp - -# breaks various desktop integration features -# among other things global menus, native notifications, Gnome connector, KDE connect and power management on KDE Plasma -dbus-user none -dbus-system none diff --git a/.config/firejail/firefox.profile b/.config/firejail/firefox.profile new file mode 100644 index 0000000..aed7a52 --- /dev/null +++ b/.config/firejail/firefox.profile @@ -0,0 +1,4 @@ + + +# Source the main firefox profile +include /etc/firejail/firefox.profile diff --git a/.config/firejail/kdenlive.profile b/.config/firejail/kdenlive.profile deleted file mode 100644 index be971a5..0000000 --- a/.config/firejail/kdenlive.profile +++ /dev/null @@ -1,43 +0,0 @@ -# Firejail profile for kdenlive -# Description: Non-linear video editor -# This file is overwritten after every install/update -# Persistent local customizations -include kdenlive.local -# Persistent global definitions -include globals.local - -ignore noexec ${HOME} - -noblacklist ${HOME}/.cache/kdenlive -noblacklist ${HOME}/.config/kdenliverc -noblacklist ${HOME}/.local/share/kdenlive -noblacklist ${HOME}/.local/share/kxmlgui5/kdenlive -noblacklist ${HOME}/dox -whitelist ${HOME}/dox - -include disable-common.inc -include disable-devel.inc -include disable-exec.inc -include disable-interpreters.inc -include disable-passwdmgr.inc -include disable-programs.inc - -#apparmor -caps.drop all -# net none -nodvd -nogroups -nonewprivs -noroot -notv -nou2f -protocol unix,netlink -seccomp -shell none - -private-bin dbus-launch,dvdauthor,ffmpeg,ffplay,ffprobe,genisoimage,kdeinit4,kdeinit4_shutdown,kdeinit4_wrapper,kdeinit5,kdeinit5_shutdown,kdeinit5_wrapper,kdenlive,kdenlive_render,kshell4,kshell5,melt,mlt-melt,vlc,xine -private-dev -# private-etc alternatives,fonts,kde4rc,kde5rc,ld.so.cache,machine-id,passwd,pulse,X11,xdg - -# dbus-user none -# dbus-system none diff --git a/.config/firejail/libreoffice.profile b/.config/firejail/libreoffice.profile deleted file mode 100644 index 9177843..0000000 --- a/.config/firejail/libreoffice.profile +++ /dev/null @@ -1,53 +0,0 @@ -# Firejail profile for libreoffice -# Description: Office productivity suite -# This file is overwritten after every install/update -# Persistent local customizations -include libreoffice.local -# Persistent global definitions -include globals.local - -noblacklist /usr/local/sbin -noblacklist ${HOME}/.config/libreoffice -noblacklist ${HOME}/dox -whitelist ${HOME}/dox - -# libreoffice uses java for some certain operations -# comment if you don't care about java functionality -# Allow java (blacklisted by disable-devel.inc) -include allow-java.inc - -include disable-common.inc -include disable-devel.inc -include disable-exec.inc -include disable-passwdmgr.inc -include disable-programs.inc - -include whitelist-var-common.inc - -# ubuntu 18.04 comes with its own apparmor profile, but it is not in enforce mode. -# comment the next line to use the ubuntu profile instead of firejail's apparmor profile -#apparmor -caps.drop all -netfilter -nodvd -nogroups -# comment nonewprivs when using the ubuntu 18.04/debian 10 apparmor profile -#nonewprivs -noroot -notv -nou2f -novideo -# comment the protocol line when using the ubuntu 18.04/debian 10 apparmor profile -protocol unix,inet,inet6 -# comment seccomp when using the ubuntu 18.04/debian 10 apparmor profile -seccomp -shell none -# comment tracelog when using the ubuntu 18.04/debian 10 apparmor profile -tracelog - -private-dev -private-tmp - -dbus-system none - -join-or-start libreoffice diff --git a/.config/firejail/librewolf.profile b/.config/firejail/librewolf.profile deleted file mode 100644 index 591eb19..0000000 --- a/.config/firejail/librewolf.profile +++ /dev/null @@ -1,29 +0,0 @@ -# Firejail profile for Librewolf -# Description: Firefox fork based on privacy -# This file is overwritten after every install/update -# Persistent local customizations -include librewolf.local -# Persistent global definitions -include globals.local - -noblacklist ${HOME}/.cache/librewolf -noblacklist ${HOME}/.librewolf - -mkdir ${HOME}/.cache/librewolf -mkdir ${HOME}/.librewolf -whitelist ${HOME}/.cache/librewolf -whitelist ${HOME}/.librewolf -whitelist ${HOME}/dl - -# Uncomment (or add to librewolf.local) the following lines if you want to -# use the migration wizard. -#noblacklist ${HOME}/.mozilla -#whitelist ${HOME}/.mozilla - -# librewolf requires a shell to launch on Arch. We can possibly remove sh though. -#private-bin bash,dbus-launch,dbus-send,env,librewolf,python*,sh,which -# private-etc must first be enabled in firefox-common.profile -#private-etc librewolf - -# Redirect -include firefox-common.profile diff --git a/.config/firejail/newsboat.profile b/.config/firejail/newsboat.profile index 6dc7aa0..3817621 100644 --- a/.config/firejail/newsboat.profile +++ b/.config/firejail/newsboat.profile @@ -1,35 +1,17 @@ -# Firejail profile for Newsboat -# Description: RSS program - -#include default.profile - +## Firejail profile for Newsboat +## Description: RSS program +## This file is overwritten after every install/update +## Persistent local customizations #include newsboat.local ## Persistent global definitions #include globals.local # +#noblacklist ${HOME}/.config/newsbeuter #noblacklist ${HOME}/.config/newsboat -#noblacklist ${HOME}/.cache/newsboat -#noblacklist ${HOME}/vimwiki/news/ -#whitelist ${HOME}/.config/newsboat -#whitelist ${HOME}/.cache/newsboat -#whitelist ${HOME}/vimwiki/news/ -# -### mpv -##private-bin mpv -##whitelist ${HOME}/.config/mpv -##whitelist ${HOME}/.config/youtube-dl -##whitelist ${HOME}/.netrc -##include whitelist-common.inc -##include whitelist-players.inc -##whitelist /usr/share/lua -##whitelist /usr/share/lua* -##whitelist /usr/share/vulkan -##include whitelist-usr-share-common.inc -##include whitelist-var-common.inc -##private-bin env,mpv,python*,waf,youtube-dl -# -## Lynx private-bin sh,gzip,lynx -##private-etc lynx.cfg,lynx.lss +#noblacklist ${HOME}/.local/share/newsbeuter +#noblacklist ${HOME}/.local/share/newsboat +#noblacklist ${HOME}/.newsbeuter +#noblacklist ${HOME}/.newsboat # #include disable-common.inc #include disable-devel.inc @@ -39,31 +21,40 @@ #include disable-programs.inc #include disable-xdg.inc # -##mkdir ${HOME}/.newsboat +#mkdir ${HOME}/.config/newsboat +#mkdir ${HOME}/.local/share/newsboat +#mkdir ${HOME}/.newsboat +#whitelist ${HOME}/.config/newsbeuter +#whitelist ${HOME}/.config/newsboat +#whitelist ${HOME}/.local/share/newsbeuter +#whitelist ${HOME}/.local/share/newsboat +#whitelist ${HOME}/.newsbeuter #whitelist ${HOME}/.newsboat #include whitelist-common.inc +#include whitelist-runuser-common.inc +#include whitelist-var-common.inc # -#apparmor #caps.drop all #ipc-namespace #netfilter #no3d #nodvd #nogroups +#noinput #nonewprivs #noroot #notv #nou2f #novideo -#protocol unix,inet,inet6,netlink +#protocol inet,inet6 #seccomp #shell none # #disable-mnt -#private-bin newsboat +#private-bin gzip,lynx,newsboat,sh,w3m #private-cache #private-dev -#private-etc alternatives,ca-certificates,crypto-policies,pki,resolv.conf,ssl,terminfo +#private-etc alternatives,ca-certificates,crypto-policies,lynx.cfg,lynx.lss,pki,resolv.conf,ssl,terminfo #private-tmp # #dbus-user none diff --git a/.config/firejail/vlc.profile b/.config/firejail/vlc.profile deleted file mode 100644 index 2d29af4..0000000 --- a/.config/firejail/vlc.profile +++ /dev/null @@ -1,53 +0,0 @@ -# Firejail profile for vlc -# Description: Multimedia player and streamer -# This file is overwritten after every install/update -# Persistent local customizations -include vlc.local -# Persistent global definitions -include globals.local - -noblacklist ${HOME}/.cache/vlc -noblacklist ${HOME}/.config/vlc -noblacklist ${HOME}/.local/share/vlc -noblacklist ${HOME}/vidz - -include disable-common.inc -include disable-devel.inc -include disable-exec.inc -include disable-interpreters.inc -include disable-passwdmgr.inc -include disable-programs.inc - -read-only ${DESKTOP} -mkdir ${HOME}/.cache/vlc -mkdir ${HOME}/.config/vlc -mkdir ${HOME}/.local/share/vlc -whitelist ${HOME}/.cache/vlc -whitelist ${HOME}/.config/vlc -whitelist ${HOME}/.local/share/vlc -whitelist ${HOME}/vidz -include whitelist-common.inc -include whitelist-players.inc -include whitelist-var-common.inc - -#apparmor - on Ubuntu 18.04 it refuses to start without dbus access -caps.drop all -netfilter -nogroups -nonewprivs -noroot -nou2f -protocol unix,inet,inet6,netlink -seccomp -shell none - -private-bin cvlc,nvlc,qvlc,rvlc,svlc,vlc -private-dev -private-tmp - -# dbus needed for MPRIS -# dbus-user none -# dbus-system none - -# mdwe is disabled due to breaking hardware accelerated decoding -#memory-deny-write-execute diff --git a/.config/firejail/zoom.local b/.config/firejail/zoom.local deleted file mode 100644 index 0fdbf0c..0000000 --- a/.config/firejail/zoom.local +++ /dev/null @@ -1 +0,0 @@ -protocol unix,inet,inet6,netlink\nignore seccomp\nseccomp \x21chroot diff --git a/.config/newsboat/urls b/.config/newsboat/urls index 3723d8a..f17b6c7 100644 --- a/.config/newsboat/urls +++ b/.config/newsboat/urls @@ -6,10 +6,21 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA bro https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw the-primeagen https://www.youtube.com/feeds/videos.xml?channel_id=UCd3dNckv1Za2coSaHGHl5aA tj-devries https://www.youtube.com/feeds/videos.xml?channel_id=UC0ZTPkdxlAKf-V33tqXwi3Q hackersploit -https://www.youtube.com/feeds/videos.xml?channel_id=UCDETFHKteb-C_EaXmRKvP4w sisyphus https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg distrotube https://www.youtube.com/feeds/videos.xml?channel_id=UCfp-lNJy4QkIGnaEE6NtDSg Terminalforlife https://www.youtube.com/feeds/videos.xml?channel_id=UCCIHOP7e271SIumQgyl6XBQ oldtechbloke +https://www.youtube.com/feeds/videos.xml?channel_id=UCZEvYxVEr0MMUG2ZCpG8bRA sirsudo +https://www.youtube.com/feeds/videos.xml?channel_id=UCFzGyNKXPAglNq28qWYTDFA kai-hendry +https://www.youtube.com/feeds/videos.xml?channel_id=UCkf4VIqu3Acnfzuk3kRIFwA gotbletu +https://www.youtube.com/feeds/videos.xml?channel_id=UCJLLl6AraX1POemgLfhirwg bits-inside-by-rene-rebe +https://www.youtube.com/feeds/videos.xml?channel_id=UCAD-xOOaUI6N7Uq9laOVbcw more-bits-inside-by-rene-rebe +https://www.youtube.com/feeds/videos.xml?channel_id=UCaTznQhurW5AaiYPbhEA-KA molly-rocket + +"-----------------" +"---- Youtube-Philosphy" +"-----------------" +https://www.youtube.com/feeds/videos.xml?channel_id=UCDETFHKteb-C_EaXmRKvP4w sisyphus +https://www.youtube.com/feeds/videos.xml?channel_id=UCJ-vHE5CrGaL_ITEg-n3OeA theramintrees "-----------------" "---- Youtube-Politics" @@ -18,6 +29,7 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCIveFvW-ARp_B_RckhweNJw ste https://www.youtube.com/feeds/videos.xml?channel_id=UCL_f53ZEJxp8TtlOkHwMV9Q jordan-peterson philosphy enlightment https://www.youtube.com/feeds/videos.xml?channel_id=UCoryWpk4QVYKFCJul9KBdyw switched-to-linux politics conservative https://www.youtube.com/feeds/videos.xml?channel_id=UCwUizOU8pPWXdXNniXypQEQ awakenjp satire far-right +https://www.youtube.com/feeds/videos.xml?channel_id=UCVtkjwwba5AyYyIkq-DSZkw ben-joseph-stewart "-----------------" "---- Youtube-Food" @@ -25,17 +37,21 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCwUizOU8pPWXdXNniXypQEQ awa https://www.youtube.com/feeds/videos.xml?channel_id=UC9_p50tH3WmMslWRWKnM7dQ adam-ragusea https://www.youtube.com/feeds/videos.xml?channel_id=UCuM3xKQ_D0RIMMSUh9AYxNA way-of-ramen https://www.youtube.com/feeds/videos.xml?channel_id=UCj4KP216972cPp2w_BAHy8g wilderness-cooking +https://www.youtube.com/feeds/videos.xml?channel_id=UCIix6MklfJFywa_36iDj8Sw country-life-vlog "-----------------" "---- Youtube-Finance" "-----------------" https://www.youtube.com/feeds/videos.xml?channel_id=UCFQMnBA3CS502aghlcr0_aw coffeezilla https://www.youtube.com/feeds/videos.xml?channel_id=UCFCEuCsyWP0YkP3CZ3Mr01Q the-plain-bagel +https://www.youtube.com/feeds/videos.xml?channel_id=UCASM0cgfkJxQ1ICmRilfHLw patrick-boyle quants "-----------------" -"---- Youtube-Doomsday-Stuff" +"---- Youtube-Creativity" "-----------------" https://www.youtube.com/feeds/videos.xml?channel_id=UCAL3JXZSzSm8AlZyD3nQdBA primitive-technology +https://www.youtube.com/feeds/videos.xml?channel_id=UC2SMpy2oZV6BoyJEYShw9bw ta-outdoors +https://www.youtube.com/feeds/videos.xml?channel_id=UCrI3dm4qgAEV67Jc6797WIA random-hands "-----------------" "---- Fake News" @@ -57,11 +73,13 @@ https://k1sslinux.org/blog/blog.xml KISS-Linux https://anchor.fm/s/149fd51c/podcast/rss TechOverTea https://www.youtube.com/feeds/videos.xml?channel_id=UCLwNTXWEjVd2qIHLcXxQWxA timcast right-center commentary https://www.youtube.com/feeds/videos.xml?channel_id=UCMMCy1le81jHY8rwcaqQrtA thedrip right-center left-center commentary finance +https://chinaunscripted.libsyn.com/rss china-unscripted "-----------------" "---- Pentesting" "-----------------" https://www.darknet.org.uk/feed darknet +https://www.youtube.com/feeds/videos.xml?channel_id=UClcE-kVhqyiHCcjYwcpfj9w liveoverflow "-----------------" "---- Luke Smith chad" diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index fd3a0ee..8100b42 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -35,8 +35,8 @@ lua require("altffour") set t_Co=256 let g:gruvbox_contrast_light="hard" "let g:gruvbox_termcolors=16 -set background=light -colorscheme wal +"set background=light +"colorscheme wal "hi Pmenu ctermbg=gray "hi PmenuSel ctermbg=white "hi PmenuSbar ctermbg=black diff --git a/.config/picom.conf b/.config/picom.conf index ce502e3..2eb7ed5 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -15,7 +15,7 @@ size-transition = true # Corners # ################################# # requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom -corner-radius = 5.0; +corner-radius = 0.0; rounded-corners-exclude = [ #"window_type = 'normal'", "class_g = 'dwm'", @@ -30,7 +30,7 @@ rounded-corners-exclude = [ "class_g = 'Thunderbird'", "class_g = 'keynav'" ]; -round-borders = 1; +round-borders = 0; round-borders-exclude = [ #"class_g = 'TelegramDesktop'", ]; diff --git a/.local/bin/dbuku b/.local/bin/dbuku deleted file mode 100755 index ce07d47..0000000 --- a/.local/bin/dbuku +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env sh - -# Dmenu for saving the currently open website into buku. - -# Instructions for saving: -# Currently works for qutebrowser and chromium based browsers. -# Press TAB to autocomplete the default so you can edit it. -# Press ENTER to accept your changes (if you did nothing it'll be the default). -# Press ESCAPE to go with the default value (in case of tags it'll accept them). -# To cancel out of adding it, just keep spamming ESCAPE until you reach the -# last prompt where you're asked to confirm or deny. - -### Known problems: -### * If using this script with 'shift' as part of the hotkey the shift key -### gets stuck if you let go of it while xdotool is doing its thing. -### Can be solved by not using the shift key in the hotkey. -### * Can't figure out why xdotool fails sometimes. Fixed by sleeping a bit. -### * When you try to open a bookmark the list shows an extra line at the start -### saying "waiting for input" when the script is run with a hotkey (sxhkd). -### Can't figure out why. - -### Should check if the yanked URL is in buku already before continuing. -### Though it'll simply give an error even if you try to add it. - -ScriptName=${0##*/} -Version=1.0.0 - -# Set menu options: -MenuOpen='1. Open a bookmark.' -MenuSave='2. Create new bookmark.' - -ChosenMenu=$(printf '%s\n%s' \ - "$MenuOpen" "$MenuSave" \ - | dmenu -i -l 10 -p "$ScriptName:") - -# Open bookmark: -if [ "$ChosenMenu" = "$MenuOpen" ]; then - buku -p -f 5 \ - | awk -F '\t' '{print $1, "-", $2, "#(" $3 ")"}' \ - | dmenu -i -l 30 \ - | awk '{print $1}' \ - | xargs --no-run-if-empty buku -o - -# Create bookmark: -elif [ "$ChosenMenu" = "$MenuSave" ]; then - # Get the name of the active window: - ActiveWindow=$(ps -p "$(xdotool getwindowfocus getwindowpid)" -o comm=) - - # Set the name if the active window is a chromium based browser: - printf '%s' "$ActiveWindow" | grep -Eq 'chromium|chrome|brave' \ - && ActiveWindow='chromium-based' - ### Haven't actually checked whether Chromium's window name is chromium. - - # Get URL/title based on browser: - if [ "$ActiveWindow" = 'qutebrowser' ]; then - xdotool search --name qutebrowser key --clearmodifiers y P - sleep 0.1 - URL=$(xclip -o) - sleep 0.1 - xdotool search --name qutebrowser key --clearmodifiers y T - sleep 0.1 - Title=$(xclip -o) - elif [ "$ActiveWindow" = 'chromium-based' ]; then - xdotool key --clearmodifiers ctrl+l - sleep 0.1 - xdotool key --clearmodifiers ctrl+c - sleep 0.1 - URL=$(xclip -o) - sleep 0.1 - ### Maybe write it to a file in the background to speed it up. - ### Doesn't work for some generated sites. - Title=$(curl -s "$URL" \ - | awk -F '|' '{for(i=2;i<=NF;i+=2){print $i}}' \ - RS='' \ - | recode html) - fi - - # Prompt user to edit the URL: - EditedURL=$(printf "%s" "$URL" | dmenu -l 1 -p "Edit URL:") - [ "$EditedURL" ] && URL=$EditedURL - - # Prompt user to edit the title: - EditedTitle=$(printf '%s' "$Title" | dmenu -l 1 -p 'Edit title:') - [ "$EditedTitle" ] && Title=$EditedTitle - - # Prompt the user to pick tags for the bookmark: - BukuTags=$(buku -t) - BukuTags=$(printf '%s' "$BukuTags" \ - | grep '[0-9]\..' \ - | awk '{print $2}') - # awk is POSIX, but means you need to avoid spaces in tags. - #| grep -oP '(?<=[0-9]\.\s).+(?=\s\([0-9])') - # grep -oP is non-POSIX, but allows for spaces in tags. - while true; do - SelectedTag=$(printf '%s' "$BukuTags" \ - | dmenu -i -l 30 \ - -p "Add tags. SHIFT+ENTER to create a new tag. $Tags") - [ -z "$SelectedTag" ] && break - Tags="$Tags$SelectedTag," - done - Tags=$(printf '%s' "${Tags%?}") - - # Prompt the user to add a comment/description: - Comment=$(printf '' | dmenu -p 'Input comment:') - - # Prompt the user whether they want the title and description to not update: - Immutability=$(printf 'No\nYes' | dmenu -i -p 'Enable immutability?') - [ "$Immutability" = 'Yes' ] && Immutable='--immutable 1' - [ "$Immutability" = 'No' ] && Immutable='' - - # Create a preview for the user to see their input: - Lock='' - [ "$Immutability" = 'Yes' ] && Lock='(L)' - Confirmation=$(printf '%s\nIDN. %s %s\n > %s\n + %s\n # %s' \ - 'This is a preview. Press ENTER to confirm or ESCAPE to cancel.' \ - "$Title" "$Lock" "$URL" "$Comment" "$Tags" \ - | dmenu -i -l 5) - - # If the user pressed ENTER, create the bookmark: - [ "$Confirmation" ] && \ - buku $(printf '%s %s %s --title %s -c %s %s' \ - '-a' "$URL" "$Tags" "$Title" "$Comment" "$Immutable") -elif [ -z "$ChosenMenu" ]; then - exit 1 -else - printf 'ERROR: invalid selection.\n' - exit 1 -fi diff --git a/.local/bin/dmenu-emoji b/.local/bin/dmenu-emoji deleted file mode 120000 index 749e612..0000000 --- a/.local/bin/dmenu-emoji +++ /dev/null @@ -1 +0,0 @@ -/home/sisyphus/proj/dmenu-emoji/dmenu-emoji.sh \ No newline at end of file diff --git a/.local/bin/dmpv_open b/.local/bin/dmpv_open new file mode 100755 index 0000000..f9d1349 --- /dev/null +++ b/.local/bin/dmpv_open @@ -0,0 +1,4 @@ +#!/bin/bash + +mpv $(xclip -o -sel clip) & +notify-send "Started mpv." diff --git a/.local/bin/dstartup b/.local/bin/dstartup new file mode 100755 index 0000000..b22c429 --- /dev/null +++ b/.local/bin/dstartup @@ -0,0 +1,37 @@ +#!/bin/sh + +ScriptName=${0##*/} + +NormalApps='0. Normal Apps' +DevApps='1. Deveplopment Apps' +MenuExit='2. Do nothing' + +ChosenMenu=$(printf '%s\n%s\n%s' \ + "$NormalApps" "$DevApps" "$MenuExit" \ + | dmenu -i -l 10 -p "$ScriptName:") + +if [ "$ChosenMenu" = "$NormalApps" ]; then + alacritty -t "sys_monitor" -e "bpytop" & + alacritty -t "newsboat" -e "newsboat" & + alacritty -t "music" -e "ncmpcpp" & + alacritty -t "mixer" -e "pulsemixer" & + sleep 5s + wal -i ~/pix/wallpapers/wallpaper + notify-send "Started Normal Apps." +fi + +if [ "$ChosenMenu" = "$DevApps" ]; then + input=$(dmenu -i -p "Working Environment ~/:") + Environment="$HOME/$input" + + alacritty -t "code0" --working-directory $Environment & + alacritty -t "code1" --working-directory $Environment & + alacritty -t "code2" --working-directory $Environment & + alacritty -t "code3" --working-directory $Environment & + alacritty -t "code4" --working-directory $Environment & + alacritty -t "code5" --working-directory $Environment & + alacritty -t "code6" --working-directory $Environment & + sleep 5s + wal -i ~/pix/wallpapers/wallpaper + notify-send "Started Development Apps." +fi diff --git a/.local/bin/dweb b/.local/bin/dweb index 1db60d9..6485f0d 100755 --- a/.local/bin/dweb +++ b/.local/bin/dweb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Dmenu for doing everything web related @@ -13,9 +13,10 @@ search_engine='https://duckduckgo.com/?q=' SearchWeb='0. Search the web.' MenuOpen='1. Open a bookmark.' MenuSave='2. Create new bookmark.' +RunFirefox='3. Run Firejailed Firefox.' -ChosenMenu=$(printf '%s\n%s\n%s' \ - "$SearchWeb" "$MenuOpen" "$MenuSave" \ +ChosenMenu=$(printf '%s\n%s\n%s\n%s' \ + "$SearchWeb" "$MenuOpen" "$MenuSave" "$RunFirefox" \ | dmenu -i -l 10 -p "$ScriptName:") # Search web if [ "$ChosenMenu" = "$SearchWeb" ]; then @@ -23,8 +24,11 @@ if [ "$ChosenMenu" = "$SearchWeb" ]; then [ "$search" ] && $($browser "$search_engine$(echo $search | sed -r 's/ /+/g')") & fi +# run firefox +if [ "$ChosenMenu" = "$RunFirefox" ]; then + gtk-launch Firejail-Firefox # Open bookmark: -if [ "$ChosenMenu" = "$MenuOpen" ]; then +elif [ "$ChosenMenu" = "$MenuOpen" ]; then buku --np -p -f 5 \ | awk -F '\t' '{print $1, "-", $2, "#(" $3 ")"}' \ | dmenu -i -l 30 \ diff --git a/.local/bin/no-hdmi-port.sh b/.local/bin/no-hdmi-port.sh new file mode 100755 index 0000000..cd18bd0 --- /dev/null +++ b/.local/bin/no-hdmi-port.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output HDMI1 --off --output VIRTUAL1 --off diff --git a/.local/bin/play-classical-radio b/.local/bin/play-classical-radio new file mode 100755 index 0000000..207c0c7 --- /dev/null +++ b/.local/bin/play-classical-radio @@ -0,0 +1,4 @@ +#!/bin/sh + +url="https://live.musopen.org:8085/streamvbr0" +pkill -f $url || mpv "$url" & diff --git a/.local/bin/with-hdmi-port.sh b/.local/bin/with-hdmi-port.sh new file mode 100755 index 0000000..5b95790 --- /dev/null +++ b/.local/bin/with-hdmi-port.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output HDMI1 --mode 1024x768 --pos 1366x0 --rotate normal --output VIRTUAL1 --off