This commit is contained in:
ayham 2021-06-25 18:50:25 +03:00
parent 7429987c64
commit f370dc81ca
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
14 changed files with 228 additions and 67 deletions

30
.bashrc
View File

@ -1,30 +0,0 @@
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
#(cat ~/.cache/wal/sequences &)
#. ~/.cache/wal/colors.sh
PS1='[\u@\h \W]\$ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
#export PS1="\[\033[38;5;6m\][\[$(tput sgr0)\]\[\033[38;5;83m\]\u\[$(tput sgr0)\]\[\033[38;5;77m\]@\[$(tput sgr0)\]\[\033[38;5;112m\]\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;42m\]\W\[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\[\033[38;5;81m\]\\$\[$(tput sgr0)\] \[$(tput sgr0)\]"
export PS1="[\W] \\$ "
. ~/.local/bin/z.sh
source ~/.config/env

View File

@ -10,7 +10,7 @@ export XDG_BIN_HOME="$HOME/.local/bin"
export EDITOR="nvim"
export VISUAL="nvim"
export TERMINAL="alacritty"
export BROWSER="firefox"
export BROWSER="surf-open"
export PATH="$XDG_DATA_HOME/gem/bin:$PATH"
export PATH="/usr/games/:$PATH"
@ -55,9 +55,11 @@ alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
alias irssi="irssi --config=\"$XDG_CONFIG_HOME\"/irssi/config
--home=\"$XDG_DATA_HOME\"/irssi"
alias lynx="lynx -cfg=$XDG_CONFIG_HOME/lynx/lynx.cfg"
alias monerod="monerod --data-dir \"$XDG_DATA_HOME\"/bitmonero"
# Useful aliases
alias config='/usr/bin/git --git-dir=$HOME/.config/dotfiles --work-tree=$HOME'
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 pman="pacman"
alias cleanup_packages='(set -x; sudo pacman -R $(pacman -Qdtq))'
@ -71,3 +73,4 @@ alias e="$EDITOR"
alias v="$EDITOR"
alias ll="ls -lhA"
alias ..="cd .."

View File

@ -0,0 +1,11 @@
[Filechooser Settings]
LocationMode=path-bar
ShowHidden=false
ShowSizeColumn=true
GeometryX=209
GeometryY=22
GeometryWidth=948
GeometryHeight=724
SortColumn=name
SortOrder=ascending
StartupMode=recent

View File

@ -1,9 +1,9 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "~/.gtkrc-2.0.mine"
gtk-theme-name="Arc-Gruvbox"
gtk-icon-theme-name="Adwaita"
include "/home/sisyphus/.gtkrc-2.0.mine"
gtk-theme-name="oomox-xresources-reverse"
gtk-icon-theme-name="oomox-xresources-reverse"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0

View File

@ -1,6 +1,6 @@
[Settings]
gtk-theme-name=Arc-Gruvbox
gtk-icon-theme-name=Adwaita
gtk-theme-name=oomox-xresources-reverse
gtk-icon-theme-name=oomox-xresources-reverse
gtk-font-name=Sans 10
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_TEXT
@ -13,4 +13,4 @@ gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
gtk-cursor-theme-name=Adwait
gtk-cursor-theme-name=Adwaita

Binary file not shown.

View File

@ -0,0 +1 @@
4

View File

@ -33,10 +33,10 @@ max-downloads 4
player "mp3blaster"
# -- color
#color listfocus white black bold
#color listfocus_unread white black bold
#color info white black bold
#color article white black
color listfocus white black bold
color listfocus_unread white black bold
color info white black bold
color article white black
# -- misc
unbind-key C feedlist

0
.config/newsboat/url Normal file
View File

View File

@ -1,4 +1,6 @@
# Youtube-Tech
"-----------------"
"---- Youtube-Tech"
"-----------------"
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA mental-outlaw
https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA brodie-robertson
https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw the-primeagen
@ -7,42 +9,64 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC0ZTPkdxlAKf-V33tqXwi3Q hac
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
# Youtube-Politics
"-----------------"
"---- Youtube-Politics"
"-----------------"
https://www.youtube.com/feeds/videos.xml?channel_id=UCIveFvW-ARp_B_RckhweNJw steven-crowder right conservative
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
# Youtube-Food
"-----------------"
"---- Youtube-Food"
"-----------------"
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
# Youtube-Finance
"-----------------"
"---- 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
# Fake news
"-----------------"
"---- Youtube-Doomsday-Stuff"
"-----------------"
https://www.youtube.com/feeds/videos.xml?channel_id=UCAL3JXZSzSm8AlZyD3nQdBA primitive-technology
"-----------------"
"---- Fake News"
"-----------------"
https://www.theonion.com/rss theonion fake-news
https://babylonbee.com/feed babylonbee fake-news
# Blogs
"-----------------"
"---- Blogs"
"-----------------"
https://unixsheikh.com/feed.rss unixshekh
https://drewdevault.com/blog/index.xml drewdevault
http://feeds.feedburner.com/LinuxHatersBlog/?format=xml linux-hatred-deserverd-joke-i-love-linux
https://k1sslinux.org/blog/blog.xml KISS-Linux
# Comics
https://xkcd.com/rss.xml webcomic
# Podcasts
"-----------------"
"---- Podcasts"
"-----------------"
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=UCIveFvW-ARp_B_RckhweNJw lowderwithcrowder right commentary
https://www.youtube.com/feeds/videos.xml?channel_id=UCMMCy1le81jHY8rwcaqQrtA thedrip right-center left-center commentary finance
# Luke Smith chad
https://lukesmith.xyz/rss.xml luke-smith blog
https://videos.lukesmith.xyz/feeds/videos.xml luke-smith videos
https://notrelated.xyz/rss luke-smith notrelated
https://based.cooking/rss.xml luke-smith based-cooking
# Pentesting
"-----------------"
"---- Pentesting"
"-----------------"
https://www.darknet.org.uk/feed darknet
"-----------------"
"---- Luke Smith chad"
"-----------------"
https://lukesmith.xyz/rss.xml luke-smith blog
https://notrelated.xyz/rss luke-smith notrelated
https://videos.lukesmith.xyz/feeds/videos.xml luke-smith videos
https://based.cooking/rss.xml luke-smith based-cooking

View File

@ -1,8 +1,3 @@
#!/usr/bin/env sh
#!/bin/bash
# Dmenu for selecting and copying an emoji.
grep -v '#' "$LSHARE/emoji" \
| dmenu -i -l 20 -fn Symbola-16 \
| awk '{printf $1}' \
| xclip -selection clipboard
cat ~/.local/share/demoji/emojidb | dmenu -l 10 -p "Search for your emoji:" | awk '{ print $2 }' | dmenu -l 10 -p "Pick your emoji:" | xclip -sel clip

117
.local/bin/dweb Executable file
View File

@ -0,0 +1,117 @@
#!/bin/bash
# Dmenu for doing everything web related
ScriptName=${0##*/}
Version=1.0.0
#browser='firefox' # firefox
browser='surf-open' # firefox
search_engine='https://duckduckgo.com/?q='
# Set menu options:
SearchWeb='0. Search the web.'
MenuOpen='1. Open a bookmark.'
MenuSave='2. Create new bookmark.'
ChosenMenu=$(printf '%s\n%s\n%s' \
"$SearchWeb" "$MenuOpen" "$MenuSave" \
| dmenu -i -l 10 -p "$ScriptName:")
# Search web
if [ "$ChosenMenu" = "$SearchWeb" ]; then
search=$(echo "" | dmenu -i -p "Search:")
[ "$search" ] && $($browser "$search_engine$(echo $search | sed -r 's/ /+/g')") &
fi
# Open bookmark:
if [ "$ChosenMenu" = "$MenuOpen" ]; then
buku --np -p -f 5 \
| awk -F '\t' '{print $1, "-", $2, "#(" $3 ")"}' \
| dmenu -i -l 30 \
| awk '{print $1}' \
| xargs --no-run-if-empty buku --np -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 '<title>|</title>' '{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 --np -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

8
.local/bin/pywalfox Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pywalfox.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

32
.local/bin/surf-open Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
#
# See the LICENSE file for copyright and license details.
#
xidfile="/tmp/tabbed-surf.xid"
uri=""
if [ "$#" -gt 0 ];
then
uri="$1"
fi
runtabbed() {
tabbed -dn tabbed-surf -r 2 surf -e '' "$uri" >"$xidfile" \
2>/dev/null &
}
if [ ! -r "$xidfile" ];
then
runtabbed
else
xid=$(cat "$xidfile")
xprop -id "$xid" >/dev/null 2>&1
if [ $? -gt 0 ];
then
runtabbed
else
surf -e "$xid" "$uri" >/dev/null 2>&1 &
fi
fi