mirror of
https://git.davidovski.xyz/dot.git
synced 2024-08-15 00:43:28 +00:00
Add desktop background
This commit is contained in:
parent
051ed527f6
commit
02a4a3a4c1
21 changed files with 65 additions and 47 deletions
|
@ -378,7 +378,7 @@ o(^_-)O Boxer
|
||||||
{{|└(>o< )┘|}} Up In Arms
|
{{|└(>o< )┘|}} Up In Arms
|
||||||
(^^)// Applause (2)
|
(^^)// Applause (2)
|
||||||
( `_)?(_' ) Dueling
|
( `_)?(_' ) Dueling
|
||||||
(´~`) Weary
|
(´~`) WearY
|
||||||
v(^_^)v Victory (3)
|
v(^_^)v Victory (3)
|
||||||
(ノ_ _)ノ Surrender
|
(ノ_ _)ノ Surrender
|
||||||
<( ・ェ-)<} Bow and Arrow
|
<( ・ェ-)<} Bow and Arrow
|
||||||
|
|
|
@ -4,20 +4,17 @@ setup=0
|
||||||
COLOR_BACKGROUND="#282a2e"
|
COLOR_BACKGROUND="#282a2e"
|
||||||
COLOR_PRIMARY="#fefefe"
|
COLOR_PRIMARY="#fefefe"
|
||||||
COLOR_SECONDARY="#707880"
|
COLOR_SECONDARY="#707880"
|
||||||
BORDER=2
|
BORDER=3
|
||||||
|
|
||||||
hsetroot -solid $COLOR_BACKGROUND &
|
hsetroot -solid $COLOR_BACKGROUND &
|
||||||
xsetroot -cursor_name left_ptr &
|
xsetroot -cursor_name left_ptr &
|
||||||
xrdb ~/.config/Xdefaults
|
xrdb ~/.config/Xdefaults
|
||||||
|
|
||||||
pgrep -x pipewire > /dev/null || pipewire &
|
|
||||||
pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
|
|
||||||
pgrep -x wireplumber > /dev/null || wireplumber &
|
|
||||||
|
|
||||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||||
#pgrep -x picom > /dev/null || picom &
|
#pgrep -x picom > /dev/null || picom &
|
||||||
pgrep -x xss-lock > /dev/null || xss-lock slock &
|
pgrep -x xss-lock > /dev/null || xss-lock slock &
|
||||||
#pgrep -x bg.sh > /dev/null || $HOME/.scripts/bg.sh > /dev/null &
|
pgrep -x bg.sh > /dev/null || $HOME/.scripts/bg.sh > /dev/null &
|
||||||
|
pgrep -x xcompmgr > /dev/null || xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
|
||||||
|
|
||||||
[ -f "$HOME/.config/xrandr.sh" ] && . $HOME/.config/xrandr.sh
|
[ -f "$HOME/.config/xrandr.sh" ] && . $HOME/.config/xrandr.sh
|
||||||
|
|
||||||
|
@ -33,7 +30,6 @@ for m in $(bspc query -M --names); do
|
||||||
bspc monitor $m -d ${m}1 ${m}2 ${m}3 ${m}4 ${m}5 ${m}6 ${m}7 ${m}8 ${m}9
|
bspc monitor $m -d ${m}1 ${m}2 ${m}3 ${m}4 ${m}5 ${m}6 ${m}7 ${m}8 ${m}9
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
$HOME/.config/polybar/launch.sh &
|
$HOME/.config/polybar/launch.sh &
|
||||||
|
|
||||||
bspc config border_width $BORDER
|
bspc config border_width $BORDER
|
||||||
|
@ -51,4 +47,10 @@ bspc config active_border_color "$COLOR_SECONDARY"
|
||||||
bspc config focused_border_color "$COLOR_PRIMARY"
|
bspc config focused_border_color "$COLOR_PRIMARY"
|
||||||
wmname bspwm
|
wmname bspwm
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
pgrep -x pipewire > /dev/null || pipewire &
|
||||||
|
pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
|
||||||
|
pgrep -x wireplumber > /dev/null || wireplumber &
|
||||||
|
|
||||||
$HOME/.scripts/start-mpd
|
$HOME/.scripts/start-mpd
|
||||||
|
|
|
@ -56,10 +56,10 @@
|
||||||
# For alsa 'source' will be the capture device.
|
# For alsa 'source' will be the capture device.
|
||||||
# For fifo 'source' will be the path to fifo-file.
|
# For fifo 'source' will be the path to fifo-file.
|
||||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
||||||
; source = auto
|
source = auto
|
||||||
|
|
||||||
method = alsa
|
; method = alsa
|
||||||
source = hw:Loopback,1
|
; source = hw:Loopback,1
|
||||||
|
|
||||||
; method = fifo
|
; method = fifo
|
||||||
; source = /tmp/mpd.fifo
|
; source = /tmp/mpd.fifo
|
||||||
|
|
|
@ -15,14 +15,24 @@ audio_output {
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "pulse"
|
type "pulse"
|
||||||
name "mpd"
|
name "mpd pulse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#audio_output {
|
||||||
|
# type "jack"
|
||||||
|
# name "MPD jack"
|
||||||
|
#}
|
||||||
|
|
||||||
|
#audio_output {
|
||||||
|
#type "pipewire"
|
||||||
|
#name "MPD pipewire"
|
||||||
|
#}
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "fifo"
|
type "fifo"
|
||||||
name "Visualizer feed"
|
name "Visualizer feed"
|
||||||
path "/tmp/mpd.fifo"
|
path "/tmp/mpd.fifo"
|
||||||
format "44100:16:2"
|
format "22050:16:2"
|
||||||
}
|
}
|
||||||
|
|
||||||
db_file "~/.config/mpd/database"
|
db_file "~/.config/mpd/database"
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
#vo=gpu
|
vo=x11
|
||||||
hwdec=auto
|
|
||||||
screenshot-directory=~/pics/screenshot
|
|
||||||
glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN.glsl:~~/shaders/Anime4K_Restore_CNN_Moderate_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"
|
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ opacity-rule = [
|
||||||
# Bad in performance, with driver-dependent behavior.
|
# Bad in performance, with driver-dependent behavior.
|
||||||
# The name of the switch may change without prior notifications.
|
# The name of the switch may change without prior notifications.
|
||||||
#
|
#
|
||||||
blur-background = true;
|
blur-background = false;
|
||||||
|
|
||||||
# Blur background of windows when the window frame is not opaque.
|
# Blur background of windows when the window frame is not opaque.
|
||||||
# Implies:
|
# Implies:
|
||||||
|
@ -237,7 +237,7 @@ daemon = true
|
||||||
# `xrender` is the default one.
|
# `xrender` is the default one.
|
||||||
#
|
#
|
||||||
experimental-backends = true;
|
experimental-backends = true;
|
||||||
backend = "glx";
|
backend = "xrender";
|
||||||
|
|
||||||
vsync = true
|
vsync = true
|
||||||
|
|
||||||
|
@ -439,8 +439,8 @@ log-level = "info";
|
||||||
#
|
#
|
||||||
wintypes:
|
wintypes:
|
||||||
{
|
{
|
||||||
normal = { fade = true; shadow = true;}
|
normal = { fade = false; shadow = true;}
|
||||||
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
tooltip = { fade = false; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||||
dock = { full-shadow = true; }
|
dock = { full-shadow = true; }
|
||||||
dnd = { shadow = true; }
|
dnd = { shadow = true; }
|
||||||
popup_menu = { shadow = true; }
|
popup_menu = { shadow = true; }
|
||||||
|
|
|
@ -140,7 +140,7 @@ label-muted = "%{T3} %{T-}--%"
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo ""
|
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo ""
|
||||||
interval = 1
|
interval = 1
|
||||||
click-left = pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 2 false || pactl set-source-mute 2 true
|
click-left = $HOME/.scripts/toggle-mute.sh
|
||||||
|
|
||||||
[module/vpn]
|
[module/vpn]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
setxkbmap -option caps:backspace
|
xrdb ~/.config/Xdefaults
|
||||||
xmodmap -e "clear Lock"
|
setxkbmap -option caps:none
|
||||||
exec bspwm
|
exec bspwm
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# mic
|
# mic
|
||||||
super + BackSpace
|
super + BackSpace
|
||||||
pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 2 false || pactl set-source-mute 2 true
|
$HOME/.scripts/toggle-mute.sh
|
||||||
|
|
||||||
super + ctrl + alt + f
|
super + ctrl + alt + f
|
||||||
pactl list sources | grep -qi 'Active Port: analog-input-rear-mic' && pactl set-source-port 2 analog-input-front-mic || pactl set-source-port 2 analog-input-rear-mic
|
pactl list sources | grep -qi 'Active Port: analog-input-rear-mic' && pactl set-source-port 2 analog-input-front-mic || pactl set-source-port 2 analog-input-rear-mic
|
||||||
|
@ -144,24 +144,24 @@ super + alt + t
|
||||||
|
|
||||||
# record screen
|
# record screen
|
||||||
super + alt + s
|
super + alt + s
|
||||||
.scripts/screenrecord
|
$HOME/.scripts/screenrecord
|
||||||
|
|
||||||
#bring up calculator
|
#bring up calculator
|
||||||
super + period
|
super + period
|
||||||
.scripts/calculator
|
$HOME/.scripts/calculator
|
||||||
|
|
||||||
# file search and open
|
# file search and open
|
||||||
super + slash
|
super + slash
|
||||||
websearch
|
websearch
|
||||||
shift + super + slash
|
shift + super + slash
|
||||||
bspc rule -a \* -o state=floating && $TERMINAL -e ~/.scripts/fzf_menu.sh
|
bspc rule -a \* -o state=floating && $TERMINAL -e $HOME/.scripts/fzf_menu.sh
|
||||||
|
|
||||||
# Calendar
|
# Calendar
|
||||||
super + c
|
super + c
|
||||||
bspc rule -a \* -o state=floating && $TERMINAL -e calcurse
|
$HOME/.scripts/calendar
|
||||||
|
|
||||||
super + comma
|
super + comma
|
||||||
.scripts/notepad
|
$HOME/.scripts/notepad
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# mpd server #
|
# mpd server #
|
||||||
|
@ -188,7 +188,7 @@ super + alt + ctrl + backslash
|
||||||
|
|
||||||
# chooser
|
# chooser
|
||||||
super + alt + ctrl + slash
|
super + alt + ctrl + slash
|
||||||
.scripts/mpc_picker
|
$HOME/.scripts/mpc_picker
|
||||||
# volume
|
# volume
|
||||||
super + alt + ctrl + Next
|
super + alt + ctrl + Next
|
||||||
mpc volume -10
|
mpc volume -10
|
||||||
|
|
|
@ -30,5 +30,3 @@ set selection-clipboard clipboard
|
||||||
set guioptions none
|
set guioptions none
|
||||||
|
|
||||||
set recolor true
|
set recolor true
|
||||||
|
|
||||||
set first-page-column 1:1
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
feh --bg-fill ~/.config/bg.png
|
||||||
|
exit
|
||||||
|
|
||||||
setbg="feh --force-aliasing --bg-tile "
|
setbg="feh --force-aliasing --bg-tile "
|
||||||
|
|
||||||
image=~/.config/bg.gif
|
image=~/.config/bg.gif
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
bspc rule -a \* -o state=floating && $TERMINAL -e bc -liq
|
bspc rule -a \* -o state=floating && $TERMINAL -e bc -l
|
||||||
|
|
2
scripts/calendar
Executable file
2
scripts/calendar
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
bspc rule -a \* -o state=floating && $TERMINAL -e sh -c "cal $(date +%Y); read"
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
MAIN_DP=DP-1;
|
MAIN_DP=$($HOME/.scripts/primary-display.sh);
|
||||||
v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done
|
v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done
|
||||||
|
|
|
@ -15,5 +15,5 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ddcutil --bus=13 setvcp 60 ${OUT[0]} &
|
ddcutil --bus=12 setvcp 60 ${OUT[0]} &
|
||||||
wait
|
wait
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
MAIN_DP=eDP1;
|
MAIN_DP=$($HOME/.scripts/primary-display.sh);
|
||||||
|
|
||||||
v=$1
|
v=$1
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
xrandr --output $MAIN_DP --gamma $(paste -d" " <(xrandr | grep " connected" | cut -f1 -d " ") <(xrandr --current --verbose | grep "Gamma" | cut -f7 -d" " | cut -f1 -d":" | xargs -I % echo "1/%") | grep $MAIN_DP | cut -d" " -f2 | xargs -I % echo "%*$v" | bc -l)
|
xrandr --output $MAIN_DP --gamma $(paste -d" " <(xrandr | grep " connected" | cut -f1 -d " ") <(xrandr --current --verbose | grep "Gamma" | cut -f7 -d" " | cut -f1 -d":" | xargs -I % echo "1/%") | grep $MAIN_DP | cut -d" " -f2 | xargs -I % echo "%*$v" | bc -l)
|
||||||
else
|
else
|
||||||
xrandr --output $MAIN_DP --gamma 1
|
xrandr --output $MAIN_DP --gamma 1.1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
printf "%s\n" "pm-suspend" "pm-hibernate" "reboot" "poweroff" | rofi -dmenu -p "power" | xargs -r
|
printf "pm-suspend reboot poweroff" | rofi -dmenu -p "power" | xargs -r
|
||||||
|
|
3
scripts/primary-display.sh
Executable file
3
scripts/primary-display.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
xrandr | awk '/ primary / {print $1}'
|
||||||
|
|
|
@ -9,13 +9,11 @@ width=$(cat $info | grep Width | cut -d' ' -f4)
|
||||||
height=$(cat $info | grep Height | cut -d' ' -f4)
|
height=$(cat $info | grep Height | cut -d' ' -f4)
|
||||||
|
|
||||||
size="${width}x${height}"
|
size="${width}x${height}"
|
||||||
x=$(cat $info | grep "Absolute upper-left X" | cut -d' ' -f7)
|
position=+$(echo $geom | cut -d'+' -f2- | sed "s/+/,/g")
|
||||||
y=$(cat $info | grep "Absolute upper-left Y" | cut -d' ' -f7)
|
|
||||||
position="+$x,$y"
|
|
||||||
|
|
||||||
filename=$(date +"%F_%T.mp4")
|
filename=$(date +"$HOME/pics/screenshot/%F_%T.mp4")
|
||||||
|
|
||||||
echo $size and $position
|
echo $size and $position
|
||||||
ffmpeg -y -f x11grab -video_size $size -i "$position" $filename
|
ffmpeg -y -f x11grab -video_size $size -i $position $filename
|
||||||
|
|
||||||
rm $info
|
rm $info
|
||||||
|
|
|
@ -22,11 +22,12 @@ tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if
|
||||||
|
|
||||||
screens = [
|
screens = [
|
||||||
(0, 0, 1920, 1080),
|
(0, 0, 1920, 1080),
|
||||||
|
(1920, 0, 2560, 1440),
|
||||||
]
|
]
|
||||||
|
|
||||||
#TODO find this with xrandr
|
#TODO find this with xrandr
|
||||||
|
|
||||||
target = screens[0]
|
target = screens[1]
|
||||||
|
|
||||||
#Physical offset of the selected screen
|
#Physical offset of the selected screen
|
||||||
offsetx = target[0]
|
offsetx = target[0]
|
||||||
|
@ -34,7 +35,7 @@ offsety = target[1]
|
||||||
|
|
||||||
#Size of the full screen areas
|
#Size of the full screen areas
|
||||||
sh = 1080
|
sh = 1080
|
||||||
sw = 1920
|
sw = 1920 + 2560
|
||||||
#TODO calculate using list of screens
|
#TODO calculate using list of screens
|
||||||
|
|
||||||
#Aspect ratio of the tablet, to avoid weird scaling problems
|
#Aspect ratio of the tablet, to avoid weird scaling problems
|
||||||
|
|
4
scripts/toggle-mute.sh
Executable file
4
scripts/toggle-mute.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 0 false || pactl set-source-mute 0 true
|
||||||
|
|
Loading…
Reference in a new issue