diff --git a/.config/gtk-3.0/gtk.css b/.config/gtk-3.0/gtk.css new file mode 100644 index 0000000..15c8bc7 --- /dev/null +++ b/.config/gtk-3.0/gtk.css @@ -0,0 +1,13 @@ +/* No (default) title bar on wayland */ +headerbar.default-decoration { + /* You may need to tweak these values depending on your GTK theme */ + margin-bottom: 50px; + margin-top: -100px; +} + +/* rm -rf window shadows */ +window.csd, /* gtk4? */ +window.csd decoration { /* gtk3 */ + box-shadow: none; +} + diff --git a/.config/mako/config b/.config/mako/config index bd83565..1e5b627 100644 --- a/.config/mako/config +++ b/.config/mako/config @@ -1,11 +1,11 @@ include=/home/amolinae/.cache/hellwal/mako-colors sort=-time layer=top -width=300 -height=200 +width=250 +height=150 border-size=2 border-radius=0 -padding=20 +padding=16 icons=1 max-icon-size=64 default-timeout=5000 diff --git a/.config/river/init b/.config/river/init index 05b21aa..1958f7f 100755 --- a/.config/river/init +++ b/.config/river/init @@ -31,11 +31,11 @@ riverctl map normal $mod+Shift C spawn camera riverctl map normal $mod L spawn swaylock riverctl map normal $mod+Shift S spawn "aws -r" riverctl map normal None Print spawn "aws -f" -riverctl map normal None Print+Shift spawn "recordscreen" +riverctl map normal None+Shift Print spawn "art" # Super+Q to close the focused view riverctl map normal $mod Q close -riverctl map normal $mod+Shift Q spawn powermenu +riverctl map normal $mod+Shift Q spawn "sysutils" riverctl map normal Super Return zoom @@ -90,6 +90,7 @@ riverctl rule-add -app-id "mpv" -title "webcam" float # Make all views with app-id "bar" and any title use client-side decorations riverctl rule-add -app-id "librewolf" ssd riverctl rule-add -app-id "firefox" ssd +riverctl rule-add -app-id "org.pwmt.zathura" ssd # River will send the process group of the init executable SIGTERM on exit. riverctl default-layout rivercarro diff --git a/.local/bin/art b/.local/bin/art new file mode 100755 index 0000000..1beee50 --- /dev/null +++ b/.local/bin/art @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Show icon in slstatus: +# Video [ REC 󰑊 ] +# Audio [ REC 󰍬 ] +# +# amolinae's recording tool +screencast(){ + case $(printf "%s\n" "󰍬 Mic ON" "󰍭 Mic OFF" | fuzzel -d -l 3) in + "󰍬 Mic ON") + wf-recorder -D -a -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") ;; + "󰍭 Mic OFF") + wf-recorder -D --audio="$(pactl list short sources | grep output | awk '{print $2}')" -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") ;; + esac +} + +video(){ + wf-recorder -D -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") +} + +kill(){ + killall -s SIGINT wf-recorder && \ + notify-send "art" "Recording stopped" || \ + notify-send "art" "No recording process found" +} + +menu(){ + case $(printf "%s\n" "󰻒 Screencast" "󰕧 Video only" "󰕨 Stop recording" | fuzzel -d -l 4) in + "󰻒 Screencast") screencast;; + "󰕧 Video only") video;; + "󰕨 Stop recording") kill;; + *) kill;; + esac +} + +case "$1" in + -h) echo "usage: aws [-h]" >&2; exit 1; ;; + *) menu ;; +esac diff --git a/.local/bin/aws b/.local/bin/aws index 7e3d451..52c94aa 100755 --- a/.local/bin/aws +++ b/.local/bin/aws @@ -1,5 +1,6 @@ #!/bin/sh +# amolinae's wayland screenshotter notify(){ notify-send "aws" "screenshot copied to clipboard" } diff --git a/.local/bin/emojimenu b/.local/bin/emojimenu new file mode 100755 index 0000000..3f96a1c --- /dev/null +++ b/.local/bin/emojimenu @@ -0,0 +1,10 @@ +#!/bin/sh + +# Get user selection via fuzzel from emoji file. +chosen="$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d -l 16 -w 32 | sed "s/ .*//")" + +# Exit if none chosen. +[ -z "$chosen" ] && exit + +printf "%s" "$chosen" | wl-copy +notify-send "emojimenu" "'$chosen' copied to clipboard." & diff --git a/.local/bin/powermenu b/.local/bin/powermenu deleted file mode 100755 index f3cd82d..0000000 --- a/.local/bin/powermenu +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -x - -# tofi powermenu -case $(printf "%s\n" " Lock session" "󰍃 Log out" "󰤄 Suspend" " Reboot" "󰐥 Shut down" | fuzzel -d) in - " Lock session") - swaylock - ;; - "󰍃 Log out") - kill "$(pidof dwl)" - ;; - "󰤄 Suspend") - loginctl suspend - ;; - " Reboot") - loginctl reboot - ;; - "󰐥 Shut down") - loginctl poweroff -esac - diff --git a/.local/bin/recordscreen b/.local/bin/recordscreen deleted file mode 100755 index dc76b9e..0000000 --- a/.local/bin/recordscreen +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -x -# -# Show icon in slstatus: [ 󰕧 + 󱄠 (󰑊) ] -# [ 󰕧 + 󱄠 + 󰍬 (󰑊) ] -# [ 󰕧 (󰑊) ] -# -screencast(){ - case $(printf "%s\n" "󰍬 Mic ON" "󰍭 Mic OFF" | fuzzel -d) in - "󰍬 Mic ON") - wf-recorder -D -a -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") - ;; - "󰍭 Mic OFF") - wf-recorder -D --audio="$(pactl list short sources | grep output | awk '{print $2}')" -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") - ;; - esac -} - -video(){ - wf-recorder -D -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4") -} - -kill(){ - killall -s SIGINT wf-recorder && \ - notify-send "wf-recorder" "recording stopped" || \ - notify-send "ERROR" "No recording process found" -} - -case $(printf "%s\n" "󰻒 Screencast" "󰕧 Video only" "󰕨 Stop recording" | fuzzel -d) in - "󰻒 Screencast") screencast;; - "󰕧 Video only") video;; - "󰕨 Stop recording") kill;; - *) kill;; -esac diff --git a/.local/bin/sysutils b/.local/bin/sysutils new file mode 100755 index 0000000..8d23a41 --- /dev/null +++ b/.local/bin/sysutils @@ -0,0 +1,29 @@ +#!/bin/sh + +case $(printf "%s\n" " Lock session" "󰍃 Log out" "󱂬 Kill process" "󰤄 Suspend" " Reboot" "󰐥 Shut down" | fuzzel -d -l 7) in + " Lock session") + swaylock + ;; + "󰍃 Log out") + if pidof dwl > /dev/null; then + kill "$(pidof dwl)" + elif pidof river > /dev/null; then + kill "$(pidof river)" + fi + ;; + "󱂬 Kill process") + ps -o pid,comm,user | \ + awk -v u="$USER" '$3 == u { print $1, $2 }' | \ + fuzzel -d -l 10 -p "Kill: " | awk '{ print $1 }' | \ + xargs -r kill + ;; + "󰤄 Suspend") + loginctl suspend + ;; + " Reboot") + loginctl reboot + ;; + "󰐥 Shut down") + loginctl poweroff +esac + diff --git a/.local/bin/tofiunicode b/.local/bin/tofiunicode deleted file mode 100755 index 84ff664..0000000 --- a/.local/bin/tofiunicode +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# The famous "get a menu of emojis to copy" script, ported to tofi (wayland). - -# Get user selection via tofi from emoji file. -chosen=$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d | sed "s/ .*//") - -# Exit if none chosen. -[ -z "$chosen" ] && exit - -printf "%s" "$chosen" | wl-copy -notify-send "'$chosen' copied to clipboard." &