Add files via upload

This commit is contained in:
Sankalp Tharu authored and GitHub committed 2023-02-21 14:33:17 +05:45
1 parent 326c2d8820
commit 19741e568a
26 files changed
+1213

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
@theme "/dev/null"
* {
bg: #0C0F09;
fg: #05E289;
bgAlt: #1B1E25;
background-color: @bg;
text-color: @fg;
}
@import "../Themes/style.rasi"
window {
transparency: "real";
width: 100px;
height: 260px;
location: east;
x-offset: -10px;
}
mainbox { children: [ listview ]; }
listview {
cycle: true;
dynamic: true;
layout: vertical;
padding: 10px;
}
element {
padding: 0px 0px 0px 0px;
border-radius: 8px;
}
element-text {
margin: 8px 8px 10px 12px;
padding: 5px 5px 5px 5px;
font: "FiraCode Nerd Font 30";
background-color: inherit;
text-color: inherit;
}
element selected {
background-color: @fg;
text-color: @bgAlt;
}
+56
View File
@@ -0,0 +1,56 @@
#!/bin/sh
# ┌─┐┌─┐┬─┐┌─┐┌─┐┌┐┌┌─┐┬ ┬┌─┐┌┬┐
# └─┐│ ├┬┘├┤ ├┤ │││└─┐├─┤│ │ │
# └─┘└─┘┴└─└─┘└─┘┘└┘└─┘┴ ┴└─┘ ┴
# author Sankalp
# github S4NKALP
# ┬─┐┌─┐┌─┐┬
# ├┬┘│ │├┤ │
# ┴└─└─┘└ ┴
# icon for notification
icon=~/.config/rofi/screen/screen.png
# rofi config
roficonfig=~/.config/rofi/screen/config.rasi
screen1=$(xrandr -q | grep "connected" | awk '/ connected/ {print $1}' | head -n 1)
screen2=$(xrandr -q | grep "connected" | awk '/ connected/ {print $1}' | tail -n 1)
Laptop=""
Monitor=""
Dualscreen=""
rofiopt="$Laptop\n$Monitor\n$Dualscreen"
rofi=$(printf "$rofiopt" | rofi -config $roficonfig -dmenu -i )
[ "$screen1" = "$screen2" ] && notify-send -i "$icon" "Sceond Screen is not connected" && exit
[ -z "$rofi" ] && exit
reload() {
# add script to reset wallpaper and bar.
# assuming you're setting those with wm, reloading works too.
[ -n $(pgrep bspwm) ] && bspc wm -r
[ -n $(pgrep awesome) ] && echo 'awesome.restart()' | awesome-client
}
case $rofi in
$Laptop)
xrandr --output $screen1 --auto
xrandr --output $screen2 --off
reload
;;
$Monitor)
xrandr --output $screen2 --auto
xrandr --output $screen1 --off
reload
;;
$Dualscreen)
xrandr --output $screen1 --auto
xrandr --output $screen2 --right-of $screen1 --auto
reload
esac
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB