mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 00:38:20 -05:00
Update Dotfiles
This commit is contained in:
parent
84cd263e69
commit
bf8a5465e3
@ -4,3 +4,7 @@
|
||||
|
||||
2021/12/29 (23:54:53) | ===> btop++ v.1.1.4
|
||||
2021/12/29 (23:54:53) | ERROR: Failed to get size of terminal!
|
||||
|
||||
2022/10/27 (18:48:11) | ===> btop++ v.1.2.12
|
||||
2022/10/27 (18:48:11) | ERROR: No tty detected!
|
||||
btop++ needs an interactive shell to run.
|
||||
|
@ -197,7 +197,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\Keys\y=#ffffff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\Keys\z=#ffffff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Modified=8b3db8cd
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Modified=7ee207ee
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Name=Rainbow
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Performance\DPI\0=@Point(400 400)
|
||||
@ -425,7 +425,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\Keys\y=#ff0000
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\Keys\z=#ff0000
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Modified=385fd283
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Modified=7cc8e678
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Name=Breathing
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Performance\DPI\0=@Point(400 400)
|
||||
@ -675,7 +675,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\Keys\y=#aa00ff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\Keys\z=#aa00ff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Modified=cb6f570a
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Modified=f352df61
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Name=Trippy
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Performance\DPI\0=@Point(400 400)
|
||||
@ -733,7 +733,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\CurrentMode={51EB6E3A-27A0-4AD6-A35C-6B67E0329A3D}
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\HwModified=7ffd
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\ModeCount=3
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Modified=252e7d07
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Modified=75652788
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Name=Multi
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Binding\KeyMap=K68 GB
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Binding\UseRealNames=true
|
||||
@ -929,7 +929,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\Keys\y=#ffffff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\Keys\z=#ffffff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Modified=32e7e68a
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Modified=9dfcf7ed
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Name=Rainbow
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Performance\DPI\0=@Point(400 400)
|
||||
@ -1157,7 +1157,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\Keys\y=#ff0000
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\Keys\z=#ff0000
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Modified=769b9093
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Modified=642b445b
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Name=Breathing
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Performance\DPI\0=@Point(400 400)
|
||||
@ -1407,7 +1407,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\Keys\y=#aa00ff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\Keys\z=#aa00ff
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\UseRealNames=true
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Modified=80af7eb7
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Modified=1ec35511
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Name=Trippy
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Performance\AngleSnap=false
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Performance\DPI\0=@Point(400 400)
|
||||
@ -1465,7 +1465,7 @@
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\CurrentMode={11C11AE3-3195-4DFC-B8AC-2FEA703414E5}
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\HwModified=40b6f054
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\ModeCount=3
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Modified=be5b972d
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Modified=5633b121
|
||||
0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Name=Demo
|
||||
|
||||
[Popups]
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
# greeting for fish shell
|
||||
|
||||
function fish_greeting
|
||||
shellfetch
|
||||
# shellfetch
|
||||
end
|
@ -865,17 +865,29 @@ $super_b+minus \
|
||||
scratchpad show
|
||||
|
||||
#######################################################################
|
||||
################# active scratchpad #################
|
||||
############### active dropdown scratchpad ###############
|
||||
#######################################################################
|
||||
$exe $TerminalEmulator --title "dropdown-terminal" --class "dropdown-terminal","dropdown-terminal"
|
||||
for_window [class="(?i)dropdown-terminal"] floating enable
|
||||
for_window [class="(?i)dropdown-terminal"] resize set 1100 800
|
||||
for_window [class="(?i)dropdown-terminal"] move scratchpad
|
||||
$exe dropdown_btop start
|
||||
$exe dropdown_terminal start
|
||||
$exe dropdown_pavucontrol start
|
||||
|
||||
## Category: Scratchpad;
|
||||
# Description: Toggle $TerminalEmulator;
|
||||
## Category: Dropdowns;
|
||||
# Description: Toggle process dropdown;
|
||||
$control_b+b \
|
||||
$exe dropdown_btop toggle
|
||||
|
||||
## Category: Dropdowns;
|
||||
# Description: Toggle terminal dropdown;
|
||||
$control_b+Return \
|
||||
[class="(?i)dropdown-terminal"] scratchpad show, move position center
|
||||
$exe dropdown_terminal toggle
|
||||
|
||||
$control_b+t \
|
||||
$exe dropdown_terminal toggle
|
||||
|
||||
## Category: Dropdowns;
|
||||
# Description: Toggle auido dropdown;
|
||||
$control_b+a \
|
||||
$exe dropdown_pavucontrol toggle
|
||||
|
||||
# }}} Scratchpad
|
||||
|
||||
|
98
localbin/.local/bin/dropdown_btop
Executable file
98
localbin/.local/bin/dropdown_btop
Executable file
@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
#-*-coding:utf-8 -*-
|
||||
#Auto updated?
|
||||
# Yes
|
||||
#File:
|
||||
# dropdown_btop
|
||||
#Author:
|
||||
# The-Repo-Club [wayne6324@gmail.com]
|
||||
#Github:
|
||||
# https://github.com/The-Repo-Club/
|
||||
#
|
||||
#Created:
|
||||
# Thu 27 October 2022, 06:11:40 PM [GMT+1]
|
||||
#Modified:
|
||||
# Thu 27 October 2022, 06:49:49 PM [GMT+1]
|
||||
#
|
||||
#Description:
|
||||
# <Todo>
|
||||
#
|
||||
#Dependencies:
|
||||
# alacritty
|
||||
#
|
||||
# shellcheck disable=all
|
||||
|
||||
# Controls a dropdown btop for use in i3wm
|
||||
|
||||
DISPLAY_WIDTH=1920
|
||||
TERMINAL_WIDTH=1200
|
||||
TERMINAL_HEIGHT=500
|
||||
|
||||
TERMINAL=alacritty # Change this to whatever btop emulator you want
|
||||
|
||||
# Temporary file to record the btop state
|
||||
TERMINAL_STATE=/tmp/dropdown_pavucontrol_state
|
||||
|
||||
# Adjust the sleep time and step size as necessary to make the animation smooth
|
||||
STEP_SIZE=50
|
||||
SLEEP_TIME=0.02
|
||||
|
||||
usage() {
|
||||
echo "Open/closes a dropdown btop"
|
||||
echo "Usage: dropdown_btop <start|open|close|toggle>"
|
||||
}
|
||||
|
||||
term_launch() {
|
||||
$TERMINAL --class=dropdown-terminal -e btop &
|
||||
local term_pid=$!
|
||||
# Wait for btop to open
|
||||
xdotool search --sync --pid $term_pid >/dev/null
|
||||
i3-msg -q mark dropdown_btop # Mark the btop so we can identify it
|
||||
i3-msg -q [con_mark=dropdown_btop] move scratchpad
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
}
|
||||
|
||||
term_open() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "closed" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_btop] scratchpad show
|
||||
i3-msg -q resize set $TERMINAL_WIDTH $TERMINAL_HEIGHT
|
||||
i3-msg -q move absolute position $(((DISPLAY_WIDTH - TERMINAL_WIDTH) / 2)) 30
|
||||
i3-msg -q move up $((TERMINAL_HEIGHT - 1))
|
||||
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_btop] move down $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
echo "open" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_close() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "open" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_btop] focus
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_btop] move up $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
i3-msg -q [con_mark=dropdown_btop] scratchpad show
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_toggle() {
|
||||
case "$(cat $TERMINAL_STATE)" in
|
||||
open) term_close ;;
|
||||
closed) term_open ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start) term_launch ;;
|
||||
open) term_open ;;
|
||||
close) term_close ;;
|
||||
toggle) term_toggle ;;
|
||||
*) usage ;;
|
||||
esac
|
98
localbin/.local/bin/dropdown_pavucontrol
Executable file
98
localbin/.local/bin/dropdown_pavucontrol
Executable file
@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
#-*-coding:utf-8 -*-
|
||||
#Auto updated?
|
||||
# Yes
|
||||
#File:
|
||||
# dropdown_pavucontrol
|
||||
#Author:
|
||||
# The-Repo-Club [wayne6324@gmail.com]
|
||||
#Github:
|
||||
# https://github.com/The-Repo-Club/
|
||||
#
|
||||
#Created:
|
||||
# Thu 27 October 2022, 06:11:40 PM [GMT+1]
|
||||
#Modified:
|
||||
# Thu 27 October 2022, 06:44:32 PM [GMT+1]
|
||||
#
|
||||
#Description:
|
||||
# <Todo>
|
||||
#
|
||||
#Dependencies:
|
||||
# alacritty
|
||||
#
|
||||
# shellcheck disable=all
|
||||
|
||||
# Controls a dropdown pavucontrol for use in i3wm
|
||||
|
||||
DISPLAY_WIDTH=1920
|
||||
TERMINAL_WIDTH=1200
|
||||
TERMINAL_HEIGHT=500
|
||||
|
||||
TERMINAL=pavucontrol # Change this to whatever pavucontrol emulator you want
|
||||
|
||||
# Temporary file to record the pavucontrol state
|
||||
TERMINAL_STATE=/tmp/dropdown_pavucontrol_state
|
||||
|
||||
# Adjust the sleep time and step size as necessary to make the animation smooth
|
||||
STEP_SIZE=50
|
||||
SLEEP_TIME=0.02
|
||||
|
||||
usage() {
|
||||
echo "Open/closes a dropdown pavucontrol"
|
||||
echo "Usage: dropdown_pavucontrol <start|open|close|toggle>"
|
||||
}
|
||||
|
||||
term_launch() {
|
||||
$TERMINAL &
|
||||
local term_pid=$!
|
||||
# Wait for pavucontrol to open
|
||||
xdotool search --sync --pid $term_pid >/dev/null
|
||||
i3-msg -q mark dropdown_pavucontrol # Mark the pavucontrol so we can identify it
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] move scratchpad
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
}
|
||||
|
||||
term_open() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "closed" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] scratchpad show
|
||||
i3-msg -q resize set $TERMINAL_WIDTH $TERMINAL_HEIGHT
|
||||
i3-msg -q move absolute position $(((DISPLAY_WIDTH - TERMINAL_WIDTH) / 2)) 30
|
||||
i3-msg -q move up $((TERMINAL_HEIGHT - 1))
|
||||
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] move down $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
echo "open" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_close() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "open" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] focus
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] move up $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
i3-msg -q [con_mark=dropdown_pavucontrol] scratchpad show
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_toggle() {
|
||||
case "$(cat $TERMINAL_STATE)" in
|
||||
open) term_close ;;
|
||||
closed) term_open ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start) term_launch ;;
|
||||
open) term_open ;;
|
||||
close) term_close ;;
|
||||
toggle) term_toggle ;;
|
||||
*) usage ;;
|
||||
esac
|
98
localbin/.local/bin/dropdown_terminal
Executable file
98
localbin/.local/bin/dropdown_terminal
Executable file
@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
#-*-coding:utf-8 -*-
|
||||
#Auto updated?
|
||||
# Yes
|
||||
#File:
|
||||
# dropdown_terminal
|
||||
#Author:
|
||||
# The-Repo-Club [wayne6324@gmail.com]
|
||||
#Github:
|
||||
# https://github.com/The-Repo-Club/
|
||||
#
|
||||
#Created:
|
||||
# Thu 27 October 2022, 06:11:40 PM [GMT+1]
|
||||
#Modified:
|
||||
# Thu 27 October 2022, 06:43:01 PM [GMT+1]
|
||||
#
|
||||
#Description:
|
||||
# <Todo>
|
||||
#
|
||||
#Dependencies:
|
||||
# alacritty
|
||||
#
|
||||
# shellcheck disable=all
|
||||
|
||||
# Controls a dropdown terminal for use in i3wm
|
||||
|
||||
DISPLAY_WIDTH=1920
|
||||
TERMINAL_WIDTH=1200
|
||||
TERMINAL_HEIGHT=500
|
||||
|
||||
TERMINAL=alacritty # Change this to whatever terminal emulator you want
|
||||
|
||||
# Temporary file to record the terminal state
|
||||
TERMINAL_STATE=/tmp/dropdown_terminal_state
|
||||
|
||||
# Adjust the sleep time and step size as necessary to make the animation smooth
|
||||
STEP_SIZE=50
|
||||
SLEEP_TIME=0.02
|
||||
|
||||
usage() {
|
||||
echo "Open/closes a dropdown terminal"
|
||||
echo "Usage: dropdown_terminal <start|open|close|toggle>"
|
||||
}
|
||||
|
||||
term_launch() {
|
||||
$TERMINAL --class=dropdown-terminal &
|
||||
local term_pid=$!
|
||||
# Wait for terminal to open
|
||||
xdotool search --sync --pid $term_pid >/dev/null
|
||||
i3-msg -q mark dropdown_terminal # Mark the terminal so we can identify it
|
||||
i3-msg -q [con_mark=dropdown_terminal] move scratchpad
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
}
|
||||
|
||||
term_open() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "closed" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_terminal] scratchpad show
|
||||
i3-msg -q resize set $TERMINAL_WIDTH $TERMINAL_HEIGHT
|
||||
i3-msg -q move absolute position $(((DISPLAY_WIDTH - TERMINAL_WIDTH) / 2)) 30
|
||||
i3-msg -q move up $((TERMINAL_HEIGHT - 1))
|
||||
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_terminal] move down $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
echo "open" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_close() {
|
||||
if [ "$(cat $TERMINAL_STATE)" == "open" ]; then
|
||||
echo "animating" >$TERMINAL_STATE
|
||||
i3-msg -q [con_mark=dropdown_terminal] focus
|
||||
for i in $(seq 1 $STEP_SIZE $TERMINAL_HEIGHT); do
|
||||
i3-msg -q [con_mark=dropdown_terminal] move up $STEP_SIZE
|
||||
sleep $SLEEP_TIME
|
||||
done
|
||||
i3-msg -q [con_mark=dropdown_terminal] scratchpad show
|
||||
echo "closed" >$TERMINAL_STATE
|
||||
fi
|
||||
}
|
||||
|
||||
term_toggle() {
|
||||
case "$(cat $TERMINAL_STATE)" in
|
||||
open) term_close ;;
|
||||
closed) term_open ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start) term_launch ;;
|
||||
open) term_open ;;
|
||||
close) term_close ;;
|
||||
toggle) term_toggle ;;
|
||||
*) usage ;;
|
||||
esac
|
@ -31,6 +31,7 @@ gotop
|
||||
humanity-icon-theme
|
||||
husky-hooks
|
||||
husky-packagemanager
|
||||
i3-autolayout
|
||||
i3-cheat
|
||||
i3-gaps
|
||||
i3-session
|
||||
|
@ -769,6 +769,8 @@ label-urgent-padding = 2
|
||||
label-occupied-padding = 2
|
||||
label-empty-padding = 2
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
|
||||
|
@ -138,7 +138,7 @@ module-margin-right = 0
|
||||
|
||||
font-0 = "Source Code Pro:antialias=true:size=10;2"
|
||||
font-1 = "Wuncon Siji:pixelsize=8:size=10;2"
|
||||
font-2 = "Hack:antialias=true:size=12;2"
|
||||
font-2 = "Hack:weight=bold:antialias=true:size=12;2"
|
||||
font-3 = "MaterialIcons:antialias=true:size=10;2"
|
||||
font-4 = "xos4 Terminus:antialias=true:size=12;2"
|
||||
font-5 = "Noto Sans CJK JP:antialias=true:size=10;2"
|
||||
@ -164,9 +164,9 @@ font-5 = "Noto Sans CJK JP:antialias=true:size=10;2"
|
||||
;cpu_bar memory_bar filesystem_bar mpd_bar
|
||||
;volume brightness battery_bar
|
||||
|
||||
modules-left = launcher_i RightArrow3_top launcher RightArrow2_top RightArrow3_top i3 RightArrow2_top power_i RightArrow1_top RightStripe_top RightArrow1_top tray
|
||||
modules-left = launcher_i RightArrow3_top launcher RightArrow2_top RightArrow3_top i3 RightArrow2_top power_i RightArrow1_top RightStripe_top RightArrow1_top
|
||||
modules-center =
|
||||
modules-right = LeftArrow1_top LeftStripe_top LeftArrow1_top picom_i LeftArrow2_top picom LeftArrow3_top keyboard_i LeftArrow2_top keyboard LeftArrow3_top updates_i LeftArrow2_top updates LeftArrow3_top pulseaudio_hdmi_i LeftArrow2_top pulseaudio_hdmi LeftArrow3_top pulseaudio_analog_i LeftArrow2_top pulseaudio_analog LeftArrow3_top battery_i LeftArrow2_top battery LeftArrow3_top network_i LeftArrow2_top network LeftArrow3_top date_i LeftArrow2_top date
|
||||
modules-right = LeftArrow1_top LeftStripe_top LeftArrow1_top picom_i LeftArrow2_top picom LeftArrow3_top keyboard_i LeftArrow2_top keyboard LeftArrow3_top updates_i LeftArrow2_top updates LeftArrow3_top pulseaudio_hdmi_i LeftArrow2_top pulseaudio_hdmi LeftArrow3_top pulseaudio_analog_i LeftArrow2_top pulseaudio_analog LeftArrow3_top battery_i LeftArrow2_top battery LeftArrow3_top network_i LeftArrow2_top network LeftArrow3_top date_i LeftArrow2_top date tray
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
@ -207,6 +207,7 @@ tray-maxsize = 16
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.bg}
|
||||
tray-foreground = ${color.bg}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
|
Loading…
Reference in New Issue
Block a user