This commit is contained in:
Stephan Raabe 2023-06-19 15:04:00 +02:00
parent 11a7b9b1b1
commit ad1ea94623
5 changed files with 47 additions and 30 deletions

43
.bashrc
View File

@ -13,23 +13,13 @@
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ ' PS1='[\u@\h \W]\$ '
# -----------------------------------------------------
# SCREEN RESOLUTINS
# -----------------------------------------------------
alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120'
alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120'
export PATH="/usr/lib/ccache/bin/:$PATH"
# ----------------------------------------------------- # -----------------------------------------------------
# ALIASES # ALIASES
# ----------------------------------------------------- # -----------------------------------------------------
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
alias c='clear'
alias w='~/dotfiles/scripts/updatewal.sh'
alias setkb='setxkbmap de;echo "Keyboard set back to de."'
# APPLICATIONS alias c='clear'
alias nf='neofetch'
alias pf='pfetch'
alias ls='exa -al' alias ls='exa -al'
alias mutt='neomutt' alias mutt='neomutt'
alias m='neomutt' alias m='neomutt'
@ -41,12 +31,11 @@ alias ts='~/dotfiles/scripts/snapshot.sh'
alias matrix='cmatrix' alias matrix='cmatrix'
alias shot='scrot -d 3 -c -z -u' alias shot='scrot -d 3 -c -z -u'
alias shotsel='scrot -s' alias shotsel='scrot -s'
alias nf='neofetch'
alias pf='pfetch'
alias wifi='nmtui' alias wifi='nmtui'
alias od='~/private/onedrive.sh' alias od='~/private/onedrive.sh'
# GIT # GIT
alias gs="git status" alias gs="git status"
alias ga="git add" alias ga="git add"
alias gc="git commit -m" alias gc="git commit -m"
@ -56,25 +45,43 @@ alias gst="git stash"
alias gpf="git stash; git pull" alias gpf="git stash; git pull"
# SCRIPTS # SCRIPTS
alias w='~/dotfiles/scripts/updatewal.sh'
alias gr='python ~/dotfiles/scripts/growthrate.py' alias gr='python ~/dotfiles/scripts/growthrate.py'
alias ChatGPT='python ~/mychatgpt/mychatgpt.py' alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
alias chat='python ~/mychatgpt/mychatgpt.py' alias chat='python ~/mychatgpt/mychatgpt.py'
alias ascii='~/dotfiles/scripts/figlet.sh' alias ascii='~/dotfiles/scripts/figlet.sh'
# VIRTUAL MACHINE # VIRTUAL MACHINE
alias vm='~/private/launchvm.sh' alias vm='~/private/launchvm.sh'
alias lg='~/dotfiles/scripts/looking-glass.sh' alias lg='~/dotfiles/scripts/looking-glass.sh'
alias vmstart='virsh --connect qemu:///system start win11' alias vmstart='virsh --connect qemu:///system start win11'
alias vmstop='virsh --connect qemu:///system destroy win11' alias vmstop='virsh --connect qemu:///system destroy win11'
# EDIT CONFIG FILES # EDIT CONFIG FILES
alias confq='vim ~/dotfiles/qtile/config.py'
alias confp='vim ~/dotfiles/picom/picom.conf' alias confq='nvim ~/dotfiles/qtile/config.py'
alias confb='vim ~/dotfiles/.bashrc' alias confp='nvim ~/dotfiles/picom/picom.conf'
alias confb='nvim ~/dotfiles/.bashrc'
# EDIT NOTES # EDIT NOTES
alias notes='vim ~/notes.txt' alias notes='vim ~/notes.txt'
# SYSTEM
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
alias setkb='setxkbmap de;echo "Keyboard set back to de."'
# -----------------------------------------------------
# SCREEN RESOLUTINS
# -----------------------------------------------------
alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120'
alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120'
export PATH="/usr/lib/ccache/bin/:$PATH"
# ----------------------------------------------------- # -----------------------------------------------------
# START STARSHIP # START STARSHIP
# ----------------------------------------------------- # -----------------------------------------------------

View File

@ -31,7 +31,7 @@ separator = ""
separator-foreground = ${colors.disabled} separator-foreground = ${colors.disabled}
font-0 = "Fira Sans SemiBold:size=11;2" font-0 = "Fira Sans SemiBold:size=11;2"
font-1 = "Font Awesome 6 Free Solid:pixelsize=11;2" font-1 = "Font Awesome 6 Free Solid:pixelsize=11;2"
modules-left = xworkspaces mymenu mychatgpt modules-left = xworkspaces mychatgpt scrcpy mymenu
modules-center = xwindow modules-center = xwindow
modules-right = battery xkeyboard mycalculator mysystem filesystem pulseaudio memory cpu date myexit modules-right = battery xkeyboard mycalculator mysystem filesystem pulseaudio memory cpu date myexit
cursor-click = pointer cursor-click = pointer
@ -51,9 +51,15 @@ content-foreground = ${colors.primary}
content = "" content = ""
click-left = "~/dotfiles/scripts/applauncher.sh" click-left = "~/dotfiles/scripts/applauncher.sh"
[module/scrcpy]
type = custom/text
content-foreground = ${colors.foreground}
content = "Pixel"
click-left = "scrcpy -d"
[module/mychatgpt] [module/mychatgpt]
type = custom/text type = custom/text
content-foreground = ${colors.primary} content-foreground = ${colors.foreground}
content = "ChatGPT" content = "ChatGPT"
click-left = "brave --app=https://chat.openai.com" click-left = "brave --app=https://chat.openai.com"

View File

@ -141,14 +141,16 @@ dgroups_key_binder = simple_key_binder(mod)
groups.append(ScratchPad("6", [ groups.append(ScratchPad("6", [
DropDown("chatgpt", "chromium --app=https://chat.openai.com", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ), DropDown("chatgpt", "chromium --app=https://chat.openai.com", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ),
DropDown("filemanager", "mousepad", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ), DropDown("mousepad", "mousepad", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ),
DropDown("terminal", "alacritty", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ) DropDown("terminal", "alacritty", x=0.3, y=0.1, width=0.40, height=0.4, on_focus_lost_hide=False ),
DropDown("scrcpy", "scrcpy -d", x=0.8, y=0.05, width=0.15, height=0.6, on_focus_lost_hide=False )
])) ]))
keys.extend([ keys.extend([
Key([], 'F10', lazy.group["6"].dropdown_toggle("chatgpt")), Key([mod], 'F10', lazy.group["6"].dropdown_toggle("chatgpt")),
Key([mod], 'F11', lazy.group["6"].dropdown_toggle("filemanager")), Key([mod], 'F11', lazy.group["6"].dropdown_toggle("mousepad")),
Key([mod], 'F12', lazy.group["6"].dropdown_toggle("terminal")) Key([mod], 'F12', lazy.group["6"].dropdown_toggle("terminal")),
Key([mod], 'F9', lazy.group["6"].dropdown_toggle("scrcpy"))
]) ])
# -------------------------------------------------------- # --------------------------------------------------------

View File

@ -1,4 +1,4 @@
yay -Scc yay -Scc
su -c 'pacman -Qtdq | pacman -Rns -' su -c 'pacman -Qtdq | pacman -Rns -'
su /c 'pacman -Qqd | pacman -Rsu -' su -c 'pacman -Qqd | pacman -Rsu -'

View File

@ -17,14 +17,16 @@ from rich.prompt import FloatPrompt
# Show prompts # Show prompts
console = Console() console = Console()
num1 = FloatPrompt.ask("Original value") num1 = FloatPrompt.ask("Old value")
num2 = FloatPrompt.ask("New value") num2 = FloatPrompt.ask("New value")
# printing the sum in float # Calculate the growth rate
gr = ((num2-num1)/num1) gr = ((num2-num1)/num1)
percentage = "{:.2%}".format(gr) percentage = "{:.2%}".format(gr)
# Print result to the console
console.print(percentage, style="bold") console.print(percentage, style="bold")
# copy result into the system clipboard # Copy result into the system clipboard
pyperclip.copy(percentage) pyperclip.copy(percentage)
print("Output has been copied to the clipboard!") print("Result has been copied to the clipboard!")