Add GR script

This commit is contained in:
stephan.raabe 2023-02-06 16:11:51 +01:00
parent 51588c133d
commit 819f73fde9
10 changed files with 52 additions and 113 deletions

View File

@ -1,6 +1,11 @@
Screenresolution
xrandr --rate 120
Start VM without sudo
virsh --connect qemu:///system start archlinux
sudo usermod -aG libvirt raabe
Packages:
exa neomutt htop picom xfce-power-manager nitrogen dunst pywal mpv ranger ueberzug
bat grivbox-material-theme-git gruvbox-icon-theme

View File

@ -198,8 +198,7 @@ shadow-exclude = [
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c",
"QTILE_INTERNAL:32c = 1"
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a X geometry that describes the region in which shadow should not
@ -270,14 +269,15 @@ opacity-rule = [
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with `transparent-clipping`.
corner-radius = 15
corner-radius = 10
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"class_g = 'Dunst'",
"class_g = 'Rofi'",
# "class_g = 'Dunst'",
# "class_g = 'Rofi'",
"QTILE_INTERNAL:32c = 1"
];
@ -286,12 +286,12 @@ rounded-corners-exclude = [
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
blur-method = "kernel"
blur-method = "dual_kawase"
blur-size = 12
# blur-deviation = false
# blur-strength = 5
blur-strength = 4
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.

View File

@ -6,6 +6,6 @@ killall -q polybar
# polybar-msg cmd quit
# Launch Polybar, using default config location ~/.config/polybar/config.ini
polybar mybar 2>&1 | tee -a /tmp/polybar.log & disown
polybar example
echo "Polybar launched..."

View File

@ -1,5 +1,7 @@
#!/bin/sh
xrandr --rate 120
picom &
xfce4-power-manager &
dunst &
wal -i ~/wallpaper/

View File

@ -28,7 +28,9 @@ import os
import re
import socket
import subprocess
import random
import psutil
import json
from libqtile import hook
from libqtile import qtile
from typing import List
@ -45,19 +47,6 @@ terminal = guess_terminal("alacritty")
browser = "chromium"
wp = "/home/raabe/wallpaper/"
# CUSTOM FUNCTIONS
def wallpaper():
wallpapers = [
os.path.join(wp, x) for x in os.listdir(wp) if x[-4:] == ".jpg"
]
wallpaper = random.choice(wallpapers)
for screen in qtile.screens:
screen.cmd_set_wallpaper(wallpaper, 'fill')
os.system('wal -n -i ' + wp)
# KEYBINDINGS
keys = [
@ -141,10 +130,27 @@ keys.extend([
# Key(["control"], "2", lazy.gtoup['scratchpad'].dropdown_toggle('dmnotes'))
])
########################
# Define colors ########
########################
#Pywal Colors
colors = os.path.expanduser('~/.cache/wal/colors.json')
colordict = json.load(open(colors))
ColorZ=(colordict['colors']['color0'])
ColorA=(colordict['colors']['color1'])
ColorB=(colordict['colors']['color2'])
ColorC=(colordict['colors']['color3'])
ColorD=(colordict['colors']['color4'])
ColorE=(colordict['colors']['color5'])
ColorF=(colordict['colors']['color6'])
ColorG=(colordict['colors']['color7'])
ColorH=(colordict['colors']['color8'])
ColorI=(colordict['colors']['color9'])
layout_theme = { "border_width": 2,
"margin": 15,
"border_focus": "e1acff",
"border_normal": "1D2330"
"border_focus": ColorC,
"border_normal": ColorZ
}
layouts = [
@ -173,7 +179,6 @@ extension_defaults = widget_defaults.copy()
screens = [
Screen(
# wallpaper_mode="stretch",
top=bar.Bar(
[
# widget.CurrentLayout(),
@ -191,10 +196,6 @@ screens = [
# NB Systray is incompatible with Wayland, consider using StatusNotifier instead
# widget.StatusNotifier(),
widget.Systray(),
widget.TextBox(
text="Change Theme",
mouse_callbacks = {'Button1': lambda: wallpaper()},
),
widget.Volume(fmt='Vol: {}'),
# widget.Clipboard(),
widget.CheckUpdates(
@ -209,7 +210,6 @@ screens = [
24,
opacity=0.7,
border_width=[2, 0, 2, 0], # Draw top and bottom borders
# border_color=["000000", "000000", "ffffff", "000000"] # Borders are magenta
),
),
]
@ -263,5 +263,4 @@ wmname = "LG3D"
def autostart():
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.Popen([home])
wallpaper()

View File

@ -1,81 +0,0 @@
configuration {
display-drun: "Applications:";
display-window: "Windows:";
drun-display-format: "{name}";
font: "JetBrainsMono Nerd Font Medium 10";
modi: "window,run,drun";
}
@theme "/dev/null"
* {
bg: #11121D33;
bg-alt: #444b6a;
fg: #FFFFFF;
fg-alt: #787c99;
background-color: @bg;
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
/* Dark theme. */
@import "~/.cache/wal/colors-rofi-dark"
window {
width: 30%;
}
element {
padding: 8 0;
text-color: @fg-alt;
}
element selected {
text-color: @fg;
}
element-text {
text-color: inherit;
vertical-align: 0.5;
}
element-icon {
size: 14;
padding: 0 10 0 0;
}
entry {
background-color: @bg-alt;
padding: 12;
text-color: @fg;
}
inputbar {
children: [prompt, entry];
}
listview {
padding: 8 12;
background-color: @bg;
columns: 1;
lines: 8;
}
mainbox {
background-color: @bg;
children: [inputbar, listview];
}
prompt {
background-color: @bg-alt;
enabled: true;
padding: 12 0 0 12;
text-color: @fg;
}
/* vim: ft=sass

View File

@ -15,7 +15,7 @@ configuration {
}
#window {
border:1px;
border:0px;
border-color:@foreground;
}

8
scripts/growthrate.py Normal file
View File

@ -0,0 +1,8 @@
# input
num1 = float(input("Start: "))
num2 = float(input("End: "))
# printing the sum in float
gr = ((num2-num1)/num1)
percentage = "{:.2%}".format(gr)
print(percentage)

6
scripts/growthrate.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
read -p 'Start Value: ' startval
read -p 'End Value: ' endval
let growthrate=(($endval-$startval)/$startval)
echo $growthrate