dots: switch to wayland
I love mesa like you wouldnt believe
This commit is contained in:
parent
6609a8012e
commit
71be463e5c
19 changed files with 21 additions and 397 deletions
|
@ -1,28 +0,0 @@
|
|||
[global]
|
||||
notification_limit = 0
|
||||
follow = mouse
|
||||
shrink= yes
|
||||
frame_width = 1
|
||||
frame_color = "#005577"
|
||||
separator_color = frame
|
||||
font = Monospace 9
|
||||
format = "<b>%s</b>\n%b"
|
||||
alignment = center
|
||||
ellipsize = middle
|
||||
|
||||
[urgency_low]
|
||||
background = "#222222"
|
||||
foreground = "#d3d0c8"
|
||||
timeout = 3
|
||||
|
||||
[urgency_normal]
|
||||
background = "#222222"
|
||||
foreground = "#d3d0c8"
|
||||
timeout = 5
|
||||
|
||||
[urgency_critical]
|
||||
background = "#181a1b"
|
||||
foreground = "#d3d0c8"
|
||||
timeout = 10
|
||||
|
||||
# vim: ft=cfg
|
|
@ -49,7 +49,7 @@ bookmark-autopilot yes
|
|||
|
||||
# Macroses
|
||||
macro y set browser "echo %u | xclip -r -sel c"; open-in-browser; set browser linkhandler
|
||||
macro d set browser "dm-handler %u"; open-in-browser-and-mark-read; set browser linkhandler
|
||||
macro d set browser "wm-handler %u"; open-in-browser-and-mark-read; set browser linkhandler
|
||||
macro c set browser "pipe-viewer --no-interactive --comments=%u | less"; open-in-browser; set browser linkhandler
|
||||
macro i set browser "pipe-viewer --no-interactive --info=%u | less"; open-in-browser; set browser linkhandler
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Binds
|
||||
config.bind('po', 'spawn linkhandler {url}')
|
||||
config.bind('pd', 'spawn dm-handler {url}')
|
||||
config.bind('pd', 'spawn wm-handler {url}')
|
||||
config.bind('yo', 'hint links spawn linkhandler {hint-url}')
|
||||
config.bind('yd', 'hint links spawn dm-handler {hint-url}')
|
||||
config.bind('yd', 'hint links spawn wm-handler {hint-url}')
|
||||
|
||||
# Search engines
|
||||
c.url.searchengines = {'DEFAULT': 'https://paulgo.io/search?q={}',
|
||||
|
@ -28,14 +28,14 @@ c.url.start_pages = ['about:blank']
|
|||
c.url.default_page = 'about:blank'
|
||||
|
||||
# Colors
|
||||
c.colors.completion.odd.bg = "#222222"
|
||||
c.colors.completion.even.bg = "#222222"
|
||||
c.colors.completion.category.bg = "#222222"
|
||||
c.colors.completion.odd.bg = "#1a1a1a"
|
||||
c.colors.completion.even.bg = "#1a1a1a"
|
||||
c.colors.completion.category.bg = "#1a1a1a"
|
||||
c.colors.completion.category.fg = "#ffcc66"
|
||||
c.colors.completion.category.border.top = "#222222"
|
||||
c.colors.completion.category.border.bottom = "#222222"
|
||||
c.colors.statusbar.normal.bg = "#222222"
|
||||
c.colors.statusbar.command.bg = "#222222"
|
||||
c.colors.completion.category.border.top = "#1a1a1a"
|
||||
c.colors.completion.category.border.bottom = "#1a1a1a"
|
||||
c.colors.statusbar.normal.bg = "#1a1a1a"
|
||||
c.colors.statusbar.command.bg = "#1a1a1a"
|
||||
c.colors.statusbar.url.success.https.fg = "white"
|
||||
c.colors.tabs.even.fg = "#888"
|
||||
c.colors.tabs.even.bg = "#002A3B"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. "$XDG_CONFIG_HOME/x11/xprofile"
|
||||
|
||||
ssh-agent dwm
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Keyboard layout
|
||||
setxkbmap -layout us,ru,ua -option grp:ctrl_shift_toggle -variant altgr-intl
|
||||
|
||||
# Start on launch
|
||||
remaps &
|
||||
xrandr --dpi 96
|
||||
gpg-agent --daemon
|
||||
xwallpaper --zoom $XDG_CONFIG_HOME/wall.jpg
|
||||
|
||||
autostart="mpd dunst unclutter-xfixes pipewire"
|
||||
|
||||
for program in $autostart; do
|
||||
pidof -s "$program" || setsid -f "$program"
|
||||
|
||||
done >/dev/null 2>&1
|
|
@ -5,8 +5,12 @@ export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | tr '\n' ':' | sed 's/:*$/
|
|||
|
||||
unsetopt PROMPT_SP
|
||||
|
||||
export QT_QPA_PLATFORM="wayland-egl"
|
||||
export XDG_SESSION_TYPE="wayland"
|
||||
export XCURSOR_SIZE="16"
|
||||
|
||||
export EDITOR="nvim"
|
||||
export TERMINAL="st"
|
||||
export TERMINAL="foot"
|
||||
export FILE="vifm"
|
||||
export BROWSER="qutebrowser"
|
||||
export READER="zathura"
|
||||
|
@ -17,18 +21,13 @@ export XDG_CONFIG_HOME="$HOME/.config"
|
|||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
|
||||
export GOPATH="$XDG_DOCUMENTS_DIR/code/go"
|
||||
export GOBIN="$HOME/.local/bin"
|
||||
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
|
||||
export ELINKS_CONFDIR="$XDG_CONFIG_HOME/elinks"
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
|
||||
export XAUTHORITY="$XDG_CONFIG_HOME/x11/xauthority"
|
||||
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
|
||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
|
||||
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/notmuchrc"
|
||||
export LESS=-R
|
||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||
|
@ -40,4 +39,6 @@ export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
|||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||
export LESSHISTFILE="-"
|
||||
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
|
||||
#[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
|
||||
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s dwl >/dev/null 2>&1 && dbus-run-session -- dwl -s somebar
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Feed this script a link and it will give dmenu
|
||||
# some choice programs to use to open it.
|
||||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
||||
|
||||
case "$(printf "yt-dlp\\nyt-dlp (audio)\\nyt-dlp (music)\\ncurl\\nmpv (audio)\\nmpv (float)\\nmpv (loop)\\nzathura\\nsxiv\\nnvim\\nbrowser" | dmenu -i -p "Handle it with?")" in
|
||||
"yt-dlp") qndl "$feed" >/dev/null 2>&1 ;;
|
||||
"yt-dlp (audio)") qndl "$feed" 'yt-dlp -f bestaudio/best -icx --embed-metadata' >/dev/null 2>&1 ;;
|
||||
"yt-dlp (music)") qndl "$feed" 'yt-dlp -f bestaudio/best -icx --embed-metadata --no-playlist --audio-format mp3 -o $XDG_MUSIC_DIR/%(title)s.%(ext)s' >/dev/null 2>&1 ;;
|
||||
"curl") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;;
|
||||
"mpv (audio)") setsid -f "$TERMINAL" -e mpv --quiet --no-video "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv (float)") setsid -f mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv (loop)") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
|
||||
zathura) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
vim) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f "$TERMINAL" -e "$EDITOR" "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
browser) setsid -f "$BROWSER" "$feed" >/dev/null 2>&1
|
||||
esac
|
|
@ -1,67 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Gives a dmenu prompt to mount unmounted drives and Android phones. 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
|
||||
# shellcheck disable=SC2086
|
||||
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1
|
||||
test -z "$mp" && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | 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 '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$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;;
|
||||
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
|
||||
*) 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?")" || exit 1
|
||||
chosen="$(echo "$chosen" | cut -d : -f 1)"
|
||||
getmount "$HOME -maxdepth 3 -type d"
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
notify-send "Android Mounting" "Android device mounted to $mp."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1
|
||||
case $choice in
|
||||
USB) mountusb ;;
|
||||
Android) mountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$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
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
|
||||
# password prompt if needed.
|
||||
|
||||
dmenu -P -p "$1" <&- && echo
|
|
@ -1,123 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Usage:
|
||||
# `$0`: Ask for recording type via dmenu
|
||||
# `$0 screencast`: Record both audio and screen
|
||||
# `$0 video`: Record only screen
|
||||
# `$0 audio`: Record only audio
|
||||
# `$0 kill`: Kill existing recording
|
||||
#
|
||||
# If there is already a running instance, user will be prompted to end it.
|
||||
|
||||
updateicon() { \
|
||||
echo "$1" > /tmp/recordingicon
|
||||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
|
||||
}
|
||||
|
||||
killrecording() {
|
||||
recpid="$(cat /tmp/recordingpid)"
|
||||
# kill with SIGTERM, allowing finishing touches.
|
||||
kill -15 "$recpid"
|
||||
rm -f /tmp/recordingpid
|
||||
updateicon ""
|
||||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
|
||||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
||||
sleep 3
|
||||
kill -9 "$recpid"
|
||||
exit
|
||||
}
|
||||
|
||||
screencast() { \
|
||||
ffmpeg -y \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-f alsa -i default \
|
||||
-r 30 \
|
||||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \
|
||||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "⏺️🎙️"
|
||||
}
|
||||
|
||||
video() { ffmpeg \
|
||||
-f x11grab \
|
||||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-c:v libx264 -qp 0 -r 30 \
|
||||
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "⏺️"
|
||||
}
|
||||
|
||||
webcamhidef() { ffmpeg \
|
||||
-f v4l2 \
|
||||
-i /dev/video0 \
|
||||
-video_size 1920x1080 \
|
||||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "🎥"
|
||||
}
|
||||
|
||||
webcam() { ffmpeg \
|
||||
-f v4l2 \
|
||||
-i /dev/video0 \
|
||||
-video_size 640x480 \
|
||||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "🎥"
|
||||
}
|
||||
|
||||
|
||||
audio() { \
|
||||
ffmpeg \
|
||||
-f alsa -i default \
|
||||
-c:a flac \
|
||||
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "🎙️"
|
||||
}
|
||||
|
||||
askrecording() { \
|
||||
choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:")
|
||||
case "$choice" in
|
||||
screencast) screencast;;
|
||||
audio) audio;;
|
||||
video) video;;
|
||||
*selected) videoselected;;
|
||||
webcam) webcam;;
|
||||
"webcam (hi-def)") webcamhidef;;
|
||||
esac
|
||||
}
|
||||
|
||||
asktoend() { \
|
||||
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
|
||||
[ "$response" = "Yes" ] && killrecording
|
||||
}
|
||||
|
||||
videoselected()
|
||||
{
|
||||
slop -f "%x %y %w %h" > /tmp/slop
|
||||
read -r X Y W H < /tmp/slop
|
||||
rm /tmp/slop
|
||||
|
||||
ffmpeg \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-video_size "$W"x"$H" \
|
||||
-i :0.0+"$X,$Y" \
|
||||
-c:v libx264 -qp 0 -r 30 \
|
||||
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "⏺️"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
screencast) screencast;;
|
||||
audio) audio;;
|
||||
video) video;;
|
||||
*selected) videoselected;;
|
||||
kill) killrecording;;
|
||||
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
|
||||
esac
|
|
@ -1,44 +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?")" || exit 1
|
||||
chosen="$(echo "$chosen" | 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?")" || exit 1
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount -l "$chosen" && notify-send "Android unmounting" "$chosen unmounted."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1
|
||||
case "$choice" in
|
||||
USB) unmountusb ;;
|
||||
Android) unmountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | awk -F':' '{gsub(/ /,":")}$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}')
|
||||
|
||||
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
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A dmenu binary prompt script.
|
||||
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1" )" = "Yes" ] && $2
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A dmenu wrapper script for system functions.
|
||||
case $1 in
|
||||
shut)
|
||||
prompt "Shutdown computer?" "doas poweroff" ;;
|
||||
reb)
|
||||
prompt "Reboot computer?" "doas reboot" ;;
|
||||
rest)
|
||||
prompt "Leave dwm?" "kill -TERM $(pgrep -u $USER "\bdwm$")" ;;
|
||||
lock)
|
||||
slock & xset dpms force off; mpc pause
|
||||
esac
|
|
@ -12,5 +12,5 @@ case "$1" in
|
|||
*mp3|*flac|*opus|*mp3?source*)
|
||||
qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
|
||||
*)
|
||||
elinks "$1"
|
||||
[ -f "$url" ] && setsid -f "$TERMINAL" "$EDITOR" "$url" >/dev/null 2>&1 || setsid -f "$BROWSER" "$url" >/dev/null 2>&1
|
||||
esac
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is bound to Shift+PrintScreen by default, requires maim. It lets you
|
||||
# choose the kind of screenshot to take, including copying the image or even
|
||||
# highlighting an area to copy. scrotcucks on suicidewatch right now.
|
||||
|
||||
# variables
|
||||
output="$(date '+%y%m%d-%H%M-%S').png"
|
||||
xclip_cmd="xclip -sel clip -t image/png"
|
||||
|
||||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
|
||||
"a selected area") maim -s pic-selected-"${output}" ;;
|
||||
"current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
|
||||
"full screen") maim -q -d 0.2 pic-full-"${output}" ;;
|
||||
"a selected area (copy)") maim -s | ${xclip_cmd} ;;
|
||||
"current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
|
||||
"full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;
|
||||
esac
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is called on startup to remap keys.
|
||||
# Decrease key repeat delay to 300ms and increase key repeat rate to 50 per second.
|
||||
xset r rate 300 50
|
||||
|
||||
# Map the caps lock key to super, and map the menu key to right super.
|
||||
setxkbmap -option caps:super,altwin:menu_win
|
||||
|
||||
# When caps lock is pressed only once, treat it as escape.
|
||||
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
|
||||
|
||||
# Turn off caps lock if on since there is no longer a key for it.
|
||||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null; then
|
||||
url="$1"
|
||||
else
|
||||
url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" |
|
||||
sed -E 's_^.*href="(https?://[^"]+)".*$_\1_')"
|
||||
|
||||
! grep "https*://\S\+\.[A-Za-z]\+\S*" <<<"$url" &&
|
||||
notify-send "That doesn't look like a full URL." && exit 1
|
||||
fi
|
||||
|
||||
RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls"
|
||||
if awk '{print $1}' "$RSSFILE" | grep "^$url$" >/dev/null; then
|
||||
notify-send "You already have this RSS feed."
|
||||
else
|
||||
echo "$url" >> "$RSSFILE" && notify-send "RSS feed added."
|
||||
fi
|
|
@ -13,7 +13,7 @@ case "$1" in
|
|||
prompt "Turn on transmission-daemon?" "transmission-daemon" && notify-send "transmission-daemon enabled."
|
||||
fi ;;
|
||||
open)
|
||||
check ; $TERMINAL -e tremc ;;
|
||||
check ; $TERMINAL tremc ;;
|
||||
add)
|
||||
check ; sleep 1 && transmission-remote -a "$2" && notify-send "Torrent added." ;;
|
||||
*)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pinentry-program /usr/bin/pinentry-gtk-2
|
||||
pinentry-program /usr/bin/pinentry-qt
|
||||
default-cache-ttl 5000
|
||||
max-cache-ttl 7200
|
||||
enable-ssh-support
|
||||
|
|
Loading…
Reference in a new issue