From a76aa8c932030a64ba277ed9a9cbeadb8dd910d2 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Tue, 14 Sep 2021 11:04:04 +0300 Subject: Trying out vimb as main browser --- dotfiles/.config/sway/config | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'dotfiles/.config/sway/config') diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index 47a2e74..8127c5f 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -6,7 +6,7 @@ set $mod Mod4 set $alt Mod1 set $term foot -set $browser qutebrowser +set $browser `$BROWSER` # set default desktop layout (default is tiling) # workspace_layout tabbed @@ -97,10 +97,6 @@ no_focus [title="mpvfloat"] # Dropdown-like windows -# VK Messenger -for_window [instance="vk" window_role="browser-window"] floating enable, sticky enable -# for_window [class="VK"] move scratchpad - # Telegram Desktop for_window [app_id="telegramdesktop"] floating enable, sticky enable # for_window [class="TelegramDesktop"] move scratchpad @@ -171,8 +167,8 @@ bindsym --to-code { $mod+Ctrl+Shift+space exec "makoctl restore" # Start Applications - $mod+Shift+w exec $browser - $mod+Ctrl+w exec chromium -enable-features=UseOzonePlatform -ozone-platform=wayland + $mod+Shift+w exec menuwebsurf + $mod+Ctrl+w exec menuwebsurf paste $mod+F1 exec menuman $mod+F2 exec menumako $mod+F3 exec menudisplay @@ -184,12 +180,10 @@ bindsym --to-code { $mod+s exec "xway steam" $mod+m exec $term ncmpcpp $mod+n exec $term -T "newsboat" newsboat && killall -42 waybar - $mod+a exec $term -T "aerc" aerc + $mod+a exec $term -T "neomutt" neomutt $mod+o exec notistats $mod+c exec camtoggle $mod+grave exec menuemoji - $mod+Ctrl+grave exec menuwebsurf - $mod+Shift+grave exec menuwebsurf paste $mod+apostrophe exec menupass $mod+Shift+apostrophe exec "menupass -l" $mod+Ctrl+apostrophe exec "menupass -f" -- cgit v1.2.3 From a479092a592bc1f97f849410593f8a06a8688cd1 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Fri, 17 Sep 2021 23:59:38 +0300 Subject: Some changes/improvements * New menuman mode to search with apropos * Dragon drag-and-drop marked images in sxiv * Other changes. --- dotfiles/.config/sway/config | 1 + dotfiles/.config/sxiv/exec/key-handler | 76 +++++++++++++++++++--------------- dotfiles/.config/vimb/config | 2 - dotfiles/.config/zsh/shortcuts | 5 +++ dotfiles/.local/bin/menuman | 60 ++++++++++++++++++++++++--- 5 files changed, 102 insertions(+), 42 deletions(-) (limited to 'dotfiles/.config/sway/config') diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index 8127c5f..dc8eec2 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -170,6 +170,7 @@ bindsym --to-code { $mod+Shift+w exec menuwebsurf $mod+Ctrl+w exec menuwebsurf paste $mod+F1 exec menuman + $mod+Shift+F1 exec menuman -s $mod+F2 exec menumako $mod+F3 exec menudisplay $mod+F4 exec menublk diff --git a/dotfiles/.config/sxiv/exec/key-handler b/dotfiles/.config/sxiv/exec/key-handler index 17abf60..f20a143 100755 --- a/dotfiles/.config/sxiv/exec/key-handler +++ b/dotfiles/.config/sxiv/exec/key-handler @@ -9,39 +9,47 @@ rotate() { esac } +if [ "$1" = "t" ]; then + while read file; do + files="$(printf "%s\n%s" "$files" "$file")" + done + dragon-drag-and-drop -a $files + exit 0 +fi + while read file; do - case "$1" in - "C-a" | "C-1") - setbg "$file" - exit ;; - "C-2") - setbg "$file" "2" - exit ;; - "C-s") - setbglblur "$file" - exit ;; - "C-d") - setbglsimple "$file" - exit ;; - "C-c") - wl-copy < "$file" - exit ;; - "C-f") - wl-copy "$file" - exit ;; - "C-r") - # Move file to 'trash' directory, if the current directory's name is - # JPEG, remove the NEF file as well - dir="$(dirname "$file")" - name="$(basename "$file")" - base="${name%.*}" - mv "$file" ~/.local/trash/ - if [ "JPEG" = "$(basename $dir)" ]; then - mv $(dirname "$dir")/"$base".NEF ~/.local/trash/ - fi - exit ;; - "C-comma") rotate 270 $file ;; - "C-period") rotate 90 $file ;; - "C-slash") rotate 180 $file ;; - esac + case "$1" in + "C-a" | "C-1") + setbg "$file" + exit ;; + "C-2") + setbg "$file" "2" + exit ;; + "C-s") + setbglblur "$file" + exit ;; + "C-d") + setbglsimple "$file" + exit ;; + "C-c") + wl-copy < "$file" + exit ;; + "C-f") + wl-copy "$file" + exit ;; + "C-r") + # Move file to 'trash' directory, if the current directory's name is + # JPEG, remove the NEF file as well + dir="$(dirname "$file")" + name="$(basename "$file")" + base="${name%.*}" + mv "$file" ~/.local/trash/ + if [ "JPEG" = "$(basename $dir)" ]; then + mv $(dirname "$dir")/"$base".NEF ~/.local/trash/ + fi + exit ;; + "C-comma") rotate 270 $file ;; + "C-period") rotate 90 $file ;; + "C-slash") rotate 180 $file ;; + esac done diff --git a/dotfiles/.config/vimb/config b/dotfiles/.config/vimb/config index 1bdce52..29f07e2 100644 --- a/dotfiles/.config/vimb/config +++ b/dotfiles/.config/vimb/config @@ -35,8 +35,6 @@ set x-hint-command=:sh! xdg-open ; set geolocation=never -set prevent-newwindow=true - set cookie-accept=origin # GUI color settings diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index 9ec350c..e203a26 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -68,6 +68,11 @@ alias yta="youtube-dl --add-metadata -xic" # Download only audio alias YT="youtube-viewer" alias starwars="telnet towel.blinkenlights.nl" +# git +gitcc () { + git clone "$(wl-paste --no-newline)" +} + # Audio and Music alias mute="lmc mute" alias vu="lmc up" diff --git a/dotfiles/.local/bin/menuman b/dotfiles/.local/bin/menuman index acad4c4..30a5424 100755 --- a/dotfiles/.local/bin/menuman +++ b/dotfiles/.local/bin/menuman @@ -1,19 +1,67 @@ #!/bin/sh # Search and open man page +# Options: +# -t use in terminal with fzf otherwise launch bemenu. +# -s search with apropos. -list="$(man -k . | awk '{ print $1$2 }')" +# Source settings from .bemenurc +. ~/.config/bemenurc -if [ "$1" = "-t" ]; then - chosen=$(printf "$list" | fzf) +issearch= +isterminal= + +printusage() { + echo "Options:" >2 + echo " -t use in terminal with fzf otherwise launch bemenu." >2 + echo " -s search with apropos." >2 +} + +while getopts "st" curopt "$@"; do + case "$curopt" in + "s") + issearch=1 + continue;; + "t") + isterminal=1 + continue;; + "?") + printusage + exit 1;; + esac +done + +if [ ! -z "$issearch" ]; then + if [ ! -z "$isterminal" ]; then + printf "Enter query:\t" + read query + else + query="$(echo "" | bemenu -p "Enter apropos query:" -i --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")" + fi + if [ -z "$query" ]; then + echo "Empty query" >2 + exit 1 + fi + list="$(apropos "$query")" else - # Source settings from .bemenurc - . ~/.config/bemenurc + list="$(man -k . | awk '{ print $1$2 }')" +fi - chosen=$(printf "$list" | bemenu -p "Select man page:" -i -l 25 --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") +if [ ! -z "$isterminal" ]; then + chosen=$(printf "$list" | fzf) +else + chosen=$(printf "$list" | bemenu -p "Select man page:" -i -l 25 --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") fi if [ -z "$chosen" ]; then exit 0 fi +if [ ! -z "$issearch" ]; then + chosen="$(printf "$chosen" | sed "s/\(.* ([a-zA-Z0-9]*)\)\s*-.*/\1/")" +fi + +if [ ! -z "$isterminal" ]; then + man "$chosen" && exit +fi + $TERMINAL -T "man $chosen" man $chosen -- cgit v1.2.3 From 919a26f95787a163800e9505fc4c8cd0c9098f31 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Sun, 26 Sep 2021 14:41:39 +0300 Subject: Replaced pulseaudio with pipewire Getting rid of poetteringware bit by bit. --- artix.sh | 4 ++-- dotfiles/.config/sway/config | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'dotfiles/.config/sway/config') diff --git a/artix.sh b/artix.sh index 110c0ed..872d01f 100755 --- a/artix.sh +++ b/artix.sh @@ -10,8 +10,8 @@ pacman -Sy zsh zsh-syntax-highlighting wireguard-tools mediainfo highlight \ cronie-runit metalog metalog-runit dnsmasq networkmanager dhcpcd \ networkmanager-runit rsync grim wf-recorder slurp ffmpeg w3m youtube-dl \ newsboat wget curl inkscape gimp darktable gcc make wpa_supplicant \ - fontconfig pkg-config fakeroot papirus-icon-theme alsa-utils pulseaudio \ - pamixer pulseaudio-bluetooth imagemagick ntfs-3g unzip unrar \ + fontconfig pkg-config fakeroot papirus-icon-theme alsa-utils pipewire \ + pipewire-alsa pipewire-pulse pamixer imagemagick ntfs-3g unzip unrar \ gnome-themes-standard telegram-desktop qt5ct r bc udisks2 dash \ perl-term-readline-gnu transmission-cli transmission-remote-gtk \ python-pynvim python-pip python-pillow calcurse acpi acpid gnupg \ diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index dc8eec2..f54e4f3 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -54,7 +54,11 @@ exec_always { ##### Startup scripts and programs ##### # Waybar exec waybar_launch -# music daemon +# Audio +exec pipewire +exec pipewire-media-session +exec pipewire-pulse +# Music daemon exec mpd # Bluetooth adapter applet exec_always blueman-applet -- cgit v1.2.3 From 4213b8745e62801b9926c699edf7ad3ffd94f0b4 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Thu, 7 Oct 2021 14:40:43 +0300 Subject: menuworkspace script --- dotfiles/.config/sway/config | 1 + dotfiles/.config/zsh/shortcuts | 6 +++--- dotfiles/.local/bin/menuworkspace | 12 ++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 dotfiles/.local/bin/menuworkspace (limited to 'dotfiles/.config/sway/config') diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index f54e4f3..f440c0b 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -193,6 +193,7 @@ bindsym --to-code { $mod+Shift+apostrophe exec "menupass -l" $mod+Ctrl+apostrophe exec "menupass -f" $mod+Ctrl+Shift+apostrophe exec "menupass -s" + $mod+backslash exec "menuworkspace" # Network management $mod+Shift+c exec togglevpn diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index aa34603..199faee 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -29,9 +29,9 @@ alias spw="setsid $TERMINAL >/dev/null 2>&1 &" alias testinet="ping -c2 example.com" # Fuzzy finder -alias fzd='cd "$(find . -type d | fzf || echo ".")"' -alias fzv='nvim "$(find . -type f | fzf)"' -alias fzo='op "$(find . -type f | fzf)"' +alias fzd='cd "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type d | fzf || echo ".")"' +alias fzv='nvim "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"' +alias fzo='op "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"' # Function for changing working dir after exiting lf lfcd () { diff --git a/dotfiles/.local/bin/menuworkspace b/dotfiles/.local/bin/menuworkspace new file mode 100755 index 0000000..7d947d0 --- /dev/null +++ b/dotfiles/.local/bin/menuworkspace @@ -0,0 +1,12 @@ +#!/bin/sh + +# Open a "workspace" (see workspace) from a list of dirs under home + +# Source settings from .bemenurc +. ~/.config/bemenurc + +# All dirs under home, except ones under hidden dirs +dirs="$(find $HOME -type d -path "*/\.*" -prune -o -not -name ".*" -type d)" + +workspace "$(echo "$dirs" | + bemenu -i -l 25 -p "Enter link or query:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")" -- cgit v1.2.3