gianmarco
/
dotfiles
Archived
1
0
Fork 0

Changed the drop down terminal from Yakuake to a custom Alacritty script

master
gianmarco 2022-05-21 00:34:36 +02:00
parent e685824bac
commit 709efa3eac
8 changed files with 94 additions and 9 deletions

View File

@ -40,8 +40,11 @@ bspc rule -a kmag state=floating
bspc rule -a GLava state=floating
bspc rule -a Arandr state=floating
bspc rule -a kid3 state=floating
bspc rule -a Woeusbgui state=floating
bspc rule -a kcalc state=floating
bspc rule -a desktop="Desktop" locked=on
~/Scripts/bspdropterm.sh --init
~/Scripts/autostart.sh
~/.config/polybar/launch.sh --gmg
picom

View File

@ -1,5 +1,5 @@
[Settings]
gtk-application-prefer-dark-theme=true
gtk-theme-name=Materia-dark
gtk-button-images=1
gtk-cursor-theme-name=capitaine-cursors-light
gtk-cursor-theme-size=0

View File

@ -191,7 +191,8 @@ active-opacity = 1.0;
focus-exclude = [
"class_g = 'Cairo-clock'",
"class_g = 'Bar'", # lemonbar
"class_g = 'slop'" # maim
"class_g = 'slop'", # maim
"class_g = 'activate-linux'"
];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
@ -282,7 +283,8 @@ blur-background-exclude = [
"class_g = 'slop'",
"_GTK_FRAME_EXTENTS@:c",
"class_g = 'flameshot'",
"class_g = 'Plank'"
"class_g = 'Plank'",
"class_g = 'activate-linux'"
];

View File

@ -13,7 +13,7 @@ inactive_underline=
separator=" "
show="window_class" # options: window_title, window_class, window_classname
forbidden_classes="Polybar Conky Gmrun"
forbidden_classes="Polybar Conky Gmrun drop-down-term"
empty_desktop_message=""
char_limit=30

View File

@ -50,9 +50,9 @@ super + k
super + j
clementine
# Yakuake
# drop down Alacritty
super + y
yakuake
~/Scripts/bspdropterm.sh --toggle
# KSysGuard
ctrl + {shift + Escape,alt + Delete}

2
.zshrc
View File

@ -1,7 +1,7 @@
# This is Gianmarco's .zshrc.
export HISTFILE=~/.zsh_history
export SAVEHIST=1000
ZSH_THEME="m3-round"
export HISTSIZE=1000
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme

View File

@ -16,7 +16,7 @@ akregator --hide-mainwindow &
kmail &
krfb --nodialog &
ktorrent &
yakuake &
#yakuake &
keepassxc &
syncthingtray --wait &
#stalonetray &
@ -32,4 +32,4 @@ kdeconnect-indicator &
#done
~/Scripts/usbsounds.sh &
~/Scripts/xbk.sh &
~/Scripts/xbk.sh &

80
Scripts/bspdropterm.sh Executable file
View File

@ -0,0 +1,80 @@
#!/bin/sh
# MIT License
# Copyright (c) 2021 Ayan Nath
# bspdropterm - Drop down terminal functionality for bspwm
### Configuration
term="alacritty"
termPosition="1750x700+0+20"
termClassname="drop-down-term"
###
termStatus="/tmp/dropdownterm_status"
termIdFile="/tmp/dropdownterm_id"
termId="$(/usr/bin/cat "$termIdFile")"
spawn_term() {
"$term" --class "$termClassname","$termClassname" > /dev/null 2>&1
}
init_drop_down_term() {
bspc rule -a "$termClassname" state=floating rectangle="$termPosition" hidden=on sticky=on locked=on
spawn_term &
sleep 0.5
printf 0x00%X "$(xdotool search --classname "$termClassname")" > "$termIdFile" &
echo "0" > "$termStatus" &
}
term_toggle() {
currentStatus="$(/usr/bin/cat $termStatus)"
if [ "$currentStatus" = "1" ]; then
bspc node "$termId" -g hidden=on
echo "0" > "$termStatus"
else
bspc node "$termId" -g hidden=off
echo "1" > "$termStatus"
# focus on the window
bspc node "$termId" -f
fi
}
help_text() {
/usr/bin/cat << 'EOF'
bspdropterm - Drop down terminal functionality for bspwm
USAGE:
bspdropterm [OPTION]
OPTIONS:
--init
Initialise drop down terminal.
--toggle
Toggle visibility of drop down terminal.
CONFIG:
Open the script and modify the variables term, termPostition and termClassname as per your needs.
You may need to edit the contents of the function spawn_term if you don't use Alacritty.
term Name of the terminal you use ($TERMINAL by default)
termPosition Position (as per bspwmrc convention) of the drop down terminal
termClassname Classname of the drop down terminal
Copyright (c) 2021 Ayan Nath
EOF
exit 0
}
case "$1" in
"--init")
init_drop_down_term
;;
"--toggle")
term_toggle
;;
*)
help_text
;;
esac