Compare commits

..

5 commits

Author SHA1 Message Date
94cd954df9
sh: Reintegrate clip script
Brought back an old universal clipping script and updated it to work
better - well, at all. Can now decide between wl-copy, xclip and xsel
and will do so in that order.
Can take clipping material from the following arguments (will clip any
and all following arguments) or from stdin. Stdin has precedence.
Not much more to say really, but makes writing other applications a bit
more universal when they rely on this universal little tool.
2022-02-11 21:32:16 +01:00
ff78a1f32f
pass: Update pass-pick pointer 2022-02-11 21:31:06 +01:00
2e5d26b702
wayland: Update README roadmap
I have been using wayland for about three months now and the 'missing
things' roadmap has been shrinking steadily. There are still some
little things that are annoying, most concerning old xwayland or Gnome
applications such as when I have to make use of Zotero or Element -- all
GUI applications that I would prefer not to use anyway.

Otherwise it's a very pleasant experience and *extremely* solid. I don't
remember any crashes, it feels relatively light weight, multi-monitor
works without any hick-ups and I really can't complain.

I will for the foreseeable future stay with wayland, since it works so
well for me. My riverwm setup will still need some tinkering here and
there to make use of some of its nice features and not just pretend to
be using i3 again. Lastly, I will need to peruse my settings and find
left-over x11 things that will inevitably be hiding in this repository.
All doable things and that makes me happy.
2022-02-11 20:39:09 +01:00
f1ec3c05f1
nvim: Add criticmarkup highlighting
Added simple plugin for some highlighting of criticmarkup.
Criticmarkup is a neat way of doing 'track-changes' in markdown. It's a
bit cumbersome to read just the way it is when there's a lot of changes
however and this plugin helps immensely with that.

There is also a github gist out there which helps using pandoc to turn
Microsoft Word tracked changes into criticmarkup formatted markdown.
Amazing to work with through vim instead of the annoying Office suites!
2022-02-11 20:33:38 +01:00
ed37e29a30
Delete unused modules rofi-surfraw and picom
Though the idea is not bad, I've never used rofi-surfraw in any capacity
and it just clutters up the repository.

Picom was necessary for X11 but is not anymore for wayland, so it's out
as well.
2022-01-30 11:42:03 +01:00
11 changed files with 101 additions and 334 deletions

View file

@ -98,6 +98,7 @@ require("packer").startup(function()
-- writing -- writing
use {'vim-pandoc/vim-pandoc-syntax', ft = 'pandoc'} use {'vim-pandoc/vim-pandoc-syntax', ft = 'pandoc'}
use {'vim-pandoc/vim-pandoc', ft = 'pandoc'} use {'vim-pandoc/vim-pandoc', ft = 'pandoc'}
use {'vim-pandoc/vim-criticmarkup', ft = 'pandoc'} -- highlights for criticmarkup
use 'micarmst/vim-spellsync' -- personal dict improvements for git sync use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
use { -- provide distraction free writing use { -- provide distraction free writing
'Pocco81/TrueZen.nvim', 'Pocco81/TrueZen.nvim',

@ -1 +1 @@
Subproject commit 6dc0cd6d16f9c6723b3ee02562dec9f2b6595e67 Subproject commit d3965e903a24beca182c8a6a79e4d2244a20af50

View file

@ -1,239 +0,0 @@
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
# Useful with --glx-swap-method, as well.
# glx-copy-from-front = true;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
use-damage = true
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = false;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = true;
# Dim inactive windows. (0.0 - 1.0)
#inactive-dim = 0.1;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = false;
# Do not let blur radius adjust based on window opacity.
# blur-background-fixed = true;
# blur-background-exclude = [
# "window_type = 'dock'",
# "window_type = 'desktop'"
# ];
blur:
{
method = "gaussian";
size = 10;
deviation = 5.0;
};
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;
# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesnt have the effect of --sw-opti unlike other methods. Experimental.
# (Note some VSync methods may not be enabled at compile time.)
vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
######################
#
# XSync
# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

View file

@ -16,7 +16,9 @@
# see the recent downloads, just press "sd". # see the recent downloads, just press "sd".
# #
# Thorsten Wißmann, 2015 (thorsten` on Libera Chat) # Thorsten Wißmann, 2015 (thorsten` on Libera Chat)
# Marty Oehme, 2021 (@martyo@matrix.org on Matrix), refactored to work with bemenu # Marty Oehme, 2022 (@martyo@matrix.org on Matrix)
# refactored to work with bemenu
# fixed for files with spaces
# Any feedback is welcome! # Any feedback is welcome!
set -e set -e

View file

@ -1,5 +0,0 @@
!aur - surfraw - duckduckgo !aur
!wp - surfraw - wikipedia
!rb - custom - https://www.rebuy.de/kaufen/suchen?q=
!sp - custom - http://www.sputnikmusic.com/search_results.php?genreid=0&search_in=Bands&search_text=
!hn - surfraw - duckduckgo !hackernews

View file

@ -1,2 +0,0 @@
default=duckduckgo
help_color="#0C73C2"

View file

@ -19,66 +19,66 @@ OXO_URL="https://0x0.st"
# use fd if available # use fd if available
if command -v fd >/dev/null 2>&1; then if command -v fd >/dev/null 2>&1; then
sharefile_fd_cmd="fd" sharefile_fd_cmd="fd"
else else
sharefile_fd_cmd="find" sharefile_fd_cmd="find"
fi fi
main() { main() {
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
foldpick=$(picker d "") foldpick=$(picker d "")
exit_check $? exit_check $?
picked=$(picker f "$foldpick") picked=$(picker f "$foldpick")
elif [ "$1" = "-" ]; then elif [ "$1" = "-" ]; then
while read -r file; do while read -r file; do
picked="$file" picked="$file"
done <"/dev/stdin" done <"/dev/stdin"
elif [ -f "$1" ]; then elif [ -f "$1" ]; then
picked="$1" picked="$1"
elif [ -d "$1" ]; then elif [ -d "$1" ]; then
picked=$(picker f "$1") picked=$(picker f "$1")
else else
printf "Please only provide a folder or file as the optional argument to sharefile." >&2 printf "Please only provide a folder or file as the optional argument to sharefile." >&2
exit 1 exit 1
fi fi
exit_check $? exit_check $?
url=$(file_to_oxo "$picked") url=$(file_to_oxo "$picked")
echo "$url" echo "$url"
url_to_clipboard "$url" url_to_clipboard "$url"
if command -v notify-send >/dev/null 2>&1; then if command -v notify-send >/dev/null 2>&1; then
notify-send "Upload finished" "URL: $url" notify-send "Upload finished" "URL: $url"
fi fi
exit exit
} }
picker() { picker() {
if [ "$sharefile_fd_cmd" = "fd" ]; then if [ "$sharefile_fd_cmd" = "fd" ]; then
selected=$(fd "$SHAREFILE_FD_OPTS" --type "${1:-f}" . "${2:-$HOME}" | fzf) selected=$(fd "$SHAREFILE_FD_OPTS" --type "${1:-f}" . "${2:-$HOME}" | fzf)
elif [ "$sharefile_fd_cmd" = "find" ]; then elif [ "$sharefile_fd_cmd" = "find" ]; then
selected=$(find "$SHAREFILE_FD_OPTS" "${2:-$HOME}" -type "$1" | fzf) selected=$(find "$SHAREFILE_FD_OPTS" "${2:-$HOME}" -type "$1" | fzf)
fi fi
[ "$?" -eq 130 ] && exit 130 [ "$?" -eq 130 ] && exit 130
echo "$selected" echo "$selected"
} }
url_to_clipboard() { url_to_clipboard() {
if command -v wl-copy >/dev/null 2>&1; then if command -v wl-copy >/dev/null 2>&1; then
printf "%s" "$@" | wl-copy printf "%s" "$@" | wl-copy
elif command -v xsel >/dev/null 2>&1; then elif command -v xsel >/dev/null 2>&1; then
printf "%s" "$@" | xsel --clipboard printf "%s" "$@" | xsel --clipboard
elif command -v xclip >/dev/null 2>&1; then elif command -v xclip >/dev/null 2>&1; then
printf "%s" "$@" | xclip -selection clipboard >/dev/null 2>&1 printf "%s" "$@" | xclip -selection clipboard >/dev/null 2>&1
fi fi
} }
file_to_oxo() { file_to_oxo() {
curl -F"file=@$1" "$OXO_URL" curl -F"file=@$1" "$OXO_URL"
} }
# exit on escape pressed # exit on escape pressed
exit_check() { exit_check() {
[ "$1" -eq 130 ] && exit 130 [ "$1" -eq 130 ] && exit 130
} }
main "$@" main "$@"

42
sh/.local/bin/clip Executable file
View file

@ -0,0 +1,42 @@
#!/usr/bin/env sh
# clip -- easy copying to clipboard manager with
# wl-copy / xclip / xsel
#
# clips the first argument to the clipboard
# or stdin if stdin is passed
# will copy png/jpg as image files
#
# idea ~~stolen~~ creatively borrowed from
# https://github.com/kyazdani42/dotfiles/blob/master/bin/copy
clip() {
if exist wl-copy; then
printf "%s" "$1" | wl-copy
elif exist xclip; then
echo "$1" | xclip -i -selection clipboard
elif exist xsel; then
echo "$1" | xsel -i --clipboard
else
printf "No working clipboard program found. Install wl-copy/xclip/xsel and try again."
exit 1
fi
}
# if we are in a pipe, read from stdin
if [ ! -t 0 ]; then
clip "$(cat /dev/stdin)"
exit 0
fi
# TODO check if $1 is a file, and if it's png or similar, clip that
if [ $# -lt 1 ]; then
printf "No file argument or stdin passed to clip. Exiting."
exit 1
fi
if [ "$#" -ge 1 ]; then
clip "$*"
exit 0
fi

View file

@ -225,16 +225,17 @@ nnoremap e :!nvim %f<cr>
nnoremap gb :file &<cr>l nnoremap gb :file &<cr>l
" yank current directory path into the clipboard " yank current directory path into the clipboard
nnoremap yd :!echo -n %d | xclip -selection "clipboard" %i<cr> " clip is universal clipper from `sh` module
nnoremap yd :!echo -n %d | clip %i<cr>
" yank current file path into the clipboard " yank current file path into the clipboard
nnoremap yf :!echo -n %c:p | xclip -selection "clipboard" %i<cr> nnoremap yf :!echo -n %c:p | clip %i<cr>
" yank current filename without path into the clipboard " yank current filename without path into the clipboard
nnoremap yt :!echo -n %c | xclip -selection "clipboard" %i<cr> nnoremap yt :!echo -n %c | clip %i<cr>
" yank root of current file's name into the clipboard " yank root of current file's name into the clipboard
nnoremap yr :!echo -n %c:r | xclip -selection "clipboard" %i<cr> nnoremap yr :!echo -n %c:r | clip %i<cr>
" Mappings for faster renaming " Mappings for faster renaming
nnoremap I cw<c-a> nnoremap I cw<c-a>

View file

@ -148,3 +148,4 @@ window#waybar.hidden {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
@import "/home/marty/.local/share/waybar/colorscheme.css";

View file

@ -22,46 +22,6 @@ I have not found a good replacement for `clutter`
which is independent from the window manager. which is independent from the window manager.
I believe `swaywm` would include similar functionality, but `river` does not. I believe `swaywm` would include similar functionality, but `river` does not.
## Missing
not set up:
* [x] lockscreen
* [x] power menu -- rofi on X
* [x] extensive run menu (clipboard, open windows) -- rofi on X
* [x] clipboard manager
* [x] pass frontend dropdown -- clipboard and xdotool
* [x] investigate [wtype](https://github.com/atx/wtype) over ydotool
* [x] file uploading (works but without url clipboard)
* [x] open_download (qutebrowser script)
* [x] gap regulation
* [x] brightnessctl
* [x] waybar and various status modules
* [ ] include waybar in styler settings
* [x] pacman new packages in status
* [x] personal keyboard layout (ae, oe, ue, ..)
* [x] styler
* still works as before, only less programs respect xresources settings
* works even for foot, if I want to switch to it
* [x] need to set it up for waybar
* [ ] dropdown terminal and dropdown todo
* [ ] rofimoji emoji dropdown -- clipboard
* [ ] show current mode
* [-] hide cursor
* [x] dropdown calculator -- rofi on X -- could use `qalc` directly
* [-] modes: media, academia (worth?)
* [x] picture in terminal, a-la ueberzug
* ueberzug is X only
* there is sixel rendering for foot, st, xterm, urxvt
* alacritty does *not* support sixel rendering [yet](https://github.com/alacritty/alacritty/issues/910), see also [existing sixel implementation](https://github.com/betaboon/alacritty/tree/graphics).
* We have sixel support enabled in vifm and foot. It is very wonky, however.
* Switched to kitty terminal for image support instead
### undecided
* [ ] polybar -> waybar / yambar
* [ ] foot / alacritty
## River ## River
@ -118,3 +78,9 @@ Lastly, it allows easy clipboard pasting with the `insert` key.
`swaybg` is used to set the wallpaper from the river configuration file. `swaybg` is used to set the wallpaper from the river configuration file.
## Missing
things not yet set up:
* [-] modes: media, academia (worth?)
* [ ] display current desktop mode in status bar