mirror of
https://gitlab.com/linuxstuff/dotfiles.git
synced 2026-03-25 07:22:54 +01:00
Merge branch 'master' of gitlab.com:linuxstuff/dotfiles
This commit is contained in:
23
.config/autorandr/dual/config
Normal file
23
.config/autorandr/dual/config
Normal file
@@ -0,0 +1,23 @@
|
||||
output DP-0
|
||||
off
|
||||
output DP-1
|
||||
off
|
||||
output DP-2
|
||||
off
|
||||
output DP-3
|
||||
off
|
||||
output DP-5
|
||||
off
|
||||
output DP-4
|
||||
crtc 0
|
||||
mode 1920x1080
|
||||
pos 0x0
|
||||
primary
|
||||
rate 144.00
|
||||
x-prop-non_desktop 0
|
||||
output HDMI-0
|
||||
crtc 1
|
||||
mode 1600x1200
|
||||
pos 1920x0
|
||||
rate 60.00
|
||||
x-prop-non_desktop 0
|
||||
2
.config/autorandr/dual/setup
Normal file
2
.config/autorandr/dual/setup
Normal file
@@ -0,0 +1,2 @@
|
||||
DP-4 00ffffffffffff0009d13f7f4554000026180104a5351e783e57e0a5544f9d26125054a56b80d1c0317c4568457c8168617c953c3168023a801871382d40582c4500132a2100001e000000ff005739453036333339534c300a20000000fd0038901ea021000a202020202020000000fc0042656e5120584c32343330540a01c3020318f14b010203040590111213141f2309070783010000023a801871382d40582c4500132a2100001e866f80a07038404030203500132a2100001a011d007251d01e206e285500132a2100001efe5b80a07038354030203500132a2100001afb7e80887038124018203500132a2100001e000000000000000000000000002b
|
||||
HDMI-0 00ffffffffffff0038a3bc66010101011d140103802b2078eaee95a3544c99260f5054bfef80315945596159714f81598199a9408180483f403062b0324040c01300b0441100001e000000fd0032551f5c11000a202020202020000000fc004c4344323139305558700a2020000000ff00303730303334333055420a202000bf
|
||||
10
.config/autorandr/postswitch
Executable file
10
.config/autorandr/postswitch
Executable file
@@ -0,0 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
sleep 1
|
||||
|
||||
zsh ~/.config/polybar/launch.sh
|
||||
picom -b || true
|
||||
|
||||
sleep 1
|
||||
|
||||
notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
|
||||
19
.config/autorandr/single/config
Normal file
19
.config/autorandr/single/config
Normal file
@@ -0,0 +1,19 @@
|
||||
output DP-0
|
||||
off
|
||||
output DP-1
|
||||
off
|
||||
output DP-2
|
||||
off
|
||||
output DP-3
|
||||
off
|
||||
output DP-5
|
||||
off
|
||||
output HDMI-0
|
||||
off
|
||||
output DP-4
|
||||
crtc 0
|
||||
mode 1920x1080
|
||||
pos 0x0
|
||||
primary
|
||||
rate 60.00
|
||||
x-prop-non_desktop 0
|
||||
2
.config/autorandr/single/setup
Normal file
2
.config/autorandr/single/setup
Normal file
@@ -0,0 +1,2 @@
|
||||
DP-4 00ffffffffffff0009d13f7f4554000026180104a5351e783e57e0a5544f9d26125054a56b80d1c0317c4568457c8168617c953c3168023a801871382d40582c4500132a2100001e000000ff005739453036333339534c300a20000000fd0038901ea021000a202020202020000000fc0042656e5120584c32343330540a01c3020318f14b010203040590111213141f2309070783010000023a801871382d40582c4500132a2100001e866f80a07038404030203500132a2100001a011d007251d01e206e285500132a2100001efe5b80a07038354030203500132a2100001afb7e80887038124018203500132a2100001e000000000000000000000000002b
|
||||
HDMI-0 00ffffffffffff0038a3bc66010101011d140103802b2078eaee95a3544c99260f5054bfef80315945596159714f81598199a9408180483f403062b0324040c01300b0441100001e000000fd0032551f5c11000a202020202020000000fc004c4344323139305558700a2020000000ff00303730303334333055420a202000bf
|
||||
@@ -11,7 +11,7 @@ line-size = 1
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
padding= 2
|
||||
separator =|
|
||||
separator =""
|
||||
override-redirect = true
|
||||
|
||||
[bar/base_border]
|
||||
@@ -31,7 +31,7 @@ offset-y = 8px
|
||||
override-redirect = true
|
||||
tray-detached = true
|
||||
tray-maxsize = 15
|
||||
tray-offset-x= 86
|
||||
tray-offset-x= 136
|
||||
tray-offset-y =0px
|
||||
tray-padding = 3
|
||||
tray-position = left
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
inherit="bar/base_floating"
|
||||
monitor = ${env:MONITOR:DP-4}
|
||||
modules-center = clock playerctl_long
|
||||
modules-left = floating_popup_button pavucontrol_button_sep
|
||||
modules-right = sensors_cpu_pc nvgpu memory
|
||||
modules-left = floating_popup_button sep pavucontrol_button screenlayout_button sep
|
||||
modules-right = sensors_cpu_pc sep nvgpu sep memory
|
||||
|
||||
[bar/floating_cava]
|
||||
inherit = "bar/floating"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[module/separator]
|
||||
type = custom/text
|
||||
content = |
|
||||
content =|
|
||||
|
||||
[module/sep]
|
||||
inherit = "module/separator"
|
||||
@@ -10,11 +10,11 @@ inherit = "module/separator"
|
||||
[module/floating_popup_button]
|
||||
type = custom/script
|
||||
interval = 0.5
|
||||
format = <label>
|
||||
format =<label>
|
||||
label-maxlen = 5
|
||||
exec = ~/.config/polybar/scripts/polypopup.sh
|
||||
click-left = ~/.config/polybar/scripts/polypopup.sh --toggle
|
||||
content =
|
||||
content =
|
||||
|
||||
; Module Date
|
||||
|
||||
@@ -66,10 +66,10 @@ format = <label> |
|
||||
[module/nvgpu]
|
||||
type = custom/script
|
||||
interval = 2
|
||||
format = <label>
|
||||
format = <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $((nvidia-smi -q | grep "Gpu" | awk -F':' '{print $2}' | tr -d ' '; echo ", "; nvidia-smi -q | grep "GPU Current Temp" | awk -F':' '{print $2}' | tr -d ' C' ; echo '°') | cat | tr -d '\n')"
|
||||
exec = "echo $((nvidia-smi -q | grep "Gpu" | awk -F':' '{print $2}' | tr -d ' '; echo ", "; nvidia-smi -q | grep "GPU Current Temp" | awk -F':' '{print $2}' | tr -d ' C' ; echo '°') | cat | tr -d '\\n')"
|
||||
click-left = "setsid alacritty -e sh -c nvtop"
|
||||
|
||||
[module/sensors_cpu_pc]
|
||||
@@ -78,7 +78,7 @@ interval = 2
|
||||
format = <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $((top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk -F '.' '{print 100 - $1}' ; echo '%, ' ; sensors | grep "CPUTIN" | awk -F' ' '{print $2}' | awk -F'.' '{print $1}' | tr -d '+'; echo '°') | tr -d '\n')"
|
||||
exec = "echo $((top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\\([0-9.]*\\)%* id.*/\\1/' | awk -F '.' '{print 100 - $1}' ; echo '%, ' ; sensors | grep "CPUTIN" | awk -F' ' '{print $2}' | awk -F'.' '{print $1}' | tr -d '+'; echo '°') | tr -d '\\n')"
|
||||
click-left = "setsid alacritty -e sh -c htop"
|
||||
|
||||
[module/sensors_cpu_yoga3]
|
||||
@@ -87,7 +87,7 @@ interval = 2
|
||||
format = <label>
|
||||
label-maxlen=15
|
||||
label-ellipsis=true
|
||||
exec = "echo $((top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk -F '.' '{print 100 - $1}' ; echo '%, ' ; sensors | grep "Package id 0:" | awk -F' ' '{print $4}' | awk -F'.' '{print $1}' | tr -d '+'; echo '°') | tr -d '\n')"
|
||||
exec = "echo $((top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\\([0-9.]*\\)%* id.*/\\1/' | awk -F '.' '{print 100 - $1}' ; echo '%, ' ; sensors | grep "Package id 0:" | awk -F' ' '{print $4}' | awk -F'.' '{print $1}' | tr -d '+'; echo '°') | tr -d '\\n')"
|
||||
click-left = "setsid alacritty -e sh -c htop"
|
||||
|
||||
; Module Network Interfaces
|
||||
@@ -191,14 +191,24 @@ menu-0-2-exec = "playerctl next"
|
||||
|
||||
[module/pavucontrol_button]
|
||||
type = custom/text
|
||||
content =
|
||||
content =
|
||||
click-left = "sh ~/.config/rofi/menus/launch.sh defaultsink"
|
||||
click-right = "setsid pavucontrol"
|
||||
click-middle = "bash ~/Userdata/Scripts/Launchers/restart_pulseaudio_1s.sh"
|
||||
|
||||
[module/pavucontrol_button_sep]
|
||||
inherit="module/pavucontrol_button"
|
||||
content = |
|
||||
content = |
|
||||
|
||||
[module/screenlayout_button]
|
||||
type = custom/text
|
||||
content =
|
||||
click-left = "sh ~/.config/rofi/menus/launch.sh screenlayouts"
|
||||
click-right = "setsid arandr"
|
||||
|
||||
[module/screenlayout_button_sep]
|
||||
inherit="module/screenlayout_button"
|
||||
content = |
|
||||
|
||||
[module/cava]
|
||||
type = custom/script
|
||||
|
||||
@@ -20,7 +20,7 @@ while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
######################
|
||||
# Create config
|
||||
bash ~/.config/polybar/config-merge/config-merge.sh ~/.config/polybar/config
|
||||
bash ~/.config/polybar/config-merge/config-merge.sh ~/.config/polybar/config.ini
|
||||
|
||||
######################
|
||||
# Launch polybar(s)
|
||||
|
||||
70
.config/rofi/menus/screenlayouts.py
Executable file
70
.config/rofi/menus/screenlayouts.py
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/python
|
||||
|
||||
# Creates a rofi menu to select the current screen layout
|
||||
#
|
||||
# Dependencies:
|
||||
# System: autorandr (with xrandr)
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import rofi_menu
|
||||
|
||||
class Menu(rofi_menu.Menu):
|
||||
prompt = "Display layout"
|
||||
items = []
|
||||
|
||||
def addEntries(self, entries):
|
||||
for entry in entries:
|
||||
if (entry.isVisible):
|
||||
self.items.append(rofi_menu.ShellItem(
|
||||
str(entry), "autorandr --load " + entry.name))
|
||||
|
||||
class Entry:
|
||||
def __init__(self):
|
||||
self.name = "NULL"
|
||||
self.isDefault = False
|
||||
self.isActive = False
|
||||
self.isVisible = True
|
||||
|
||||
def __repr__(self, showIndex=False):
|
||||
result = ("▸ " if (self.isActive) else " ")
|
||||
if (showIndex):
|
||||
result += str(self.index) + ": "
|
||||
return result + self.name
|
||||
|
||||
def fetchEntries(printEntries=False):
|
||||
entries = []
|
||||
entry = None
|
||||
|
||||
# fetch currently available config(s)
|
||||
detected = subprocess.check_output(["autorandr", "--detected"]).decode('utf-8').split("\n")[:-1]
|
||||
|
||||
for line in detected:
|
||||
# New entry
|
||||
entry = Entry()
|
||||
entries.append(entry)
|
||||
|
||||
entry.IsVisible = True
|
||||
entry.isActive = False
|
||||
entry.name = line
|
||||
|
||||
# fetch currently active config(s)
|
||||
current = subprocess.check_output(["autorandr", "--current"]).decode('utf-8').split("\n")[:-1]
|
||||
|
||||
for line in current:
|
||||
for detectedEntry in entries:
|
||||
if detectedEntry.name == line:
|
||||
detectedEntry.isActive = True
|
||||
|
||||
if (printEntries):
|
||||
print("Entries:")
|
||||
for entry in entries:
|
||||
print(entry)
|
||||
|
||||
return entries
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
menu = Menu()
|
||||
menu.addEntries(fetchEntries())
|
||||
rofi_menu.run(menu, rofi_version="1.6")
|
||||
Reference in New Issue
Block a user