Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
lidgnulinux / dwl-tags.sh
Last active May 8, 2022 23:03
Yambar-for-dwl
#!/usr/bin/env bash
# Variables
declare output title layout activetags selectedtags
declare -a tags name
readonly fname=/home/ahmad/.cache/dwltags
_cycle() {
tags=( "1" "2" "3" "4" "5" "6" "7" "8" "9" )
@lidgnulinux
lidgnulinux / viwo.sh
Last active May 20, 2022 10:09
Yambar Configuration for vivarium wayland compositor.
#!/usr/bin/env bash
# add this to your yambar configuration, left for example:
# left:
# - script:
# path: /home/ahmad/bin/viwo.sh
# args: []
# content: {string: {text: "{workspace}"}}
declare workspace
# -*- conf -*-
font=monospace:size=10
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# dpi-aware=yes
initial-window-size-pixels=550x400 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
{
"icon_theme" : "Papirus-Dark",
/*"font" and "font_size" are fonts for the taskbar*/
"font" : "Ubuntu Mono derivative Powerline",
"font_size" : 15,
/* "color" and "background_color" must be set with number from 0.0 to 1.0 [red, green, blue]*/
"color" : [0.9 ,0.9 ,1],
"background_color" : [0.1, 0.3, 0.5],
/*"size" of taskbar in pixels. If not set, default size is 49 pixels*/
"size" : 23,
#!/usr/bin/bash
jum=$(lswt | wc -l)
count=$jum
for i in $(seq $count); do
wlrctl toplevel focus state:minimized
done
#!/usr/bin/bash
unminimize () {
jum=$(lswt | wc -l)
count=$jum
for i in $(seq $count); do
wlrctl toplevel focus state:minimized
@lidgnulinux
lidgnulinux / zenpulse.sh
Created September 17, 2022 02:25
zenity set volume.
#!/usr/bin/bash
volstock=$(pulsemixer --get-volume | awk {'print $1'})
value=$(zenity --title "Volume Setter Zenity" --scale --text "Adjust the Volume" --min-value 0 --max-value=100 --step=5 --value $volstock)
pulsemixer --set-volume "$value"
#!/usr/bin/bash
volstock=$(pulsemixer --get-volume | awk {'print $1'})
yadi_sembako () {
yad --scale \
--title "Yad pulse" \
--text " Volume" --min-value 0 \
--max-value=100 \
--step=5 \
#!/usr/bin/bash
bright=$(light -G | cut -b 1-2)
yadi_sembako () {
yad --scale \
--title "Yad Bright" \
--text " Bright" --min-value 0 \
--max-value=100 \
--step=5 \
#!/usr/bin/bash
grim -g "$(wf-info | grep Geome | awk {'print $2,$3'})"