This commit is contained in:
Stephan Raabe 2023-10-02 10:51:16 +02:00
parent 3c6d3eb97b
commit 7ea4e2121d
8 changed files with 275 additions and 11 deletions

View File

@ -177,8 +177,8 @@ ColorI=(colordict['colors']['color9'])
layout_theme = {
"border_width": 3,
"margin": 15,
"border_focus": "FFFFFF",
"border_normal": ColorC,
"border_focus": ColorC,
"border_normal": "FFFFFF",
"single_border_width": 3
}

252
rofi/config-power.rasi Normal file
View File

@ -0,0 +1,252 @@
/*
# ____ __ _
# | _ \ ___ / _(_)
# | |_) / _ \| |_| |
# | _ < (_) | _| |
# |_| \_\___/|_| |_|
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
*/
/* ---- Configuration ---- */
configuration {
modi: "drun,run";
font: "Fira Sans Bold 10";
show-icons: false;
icon-theme: "kora";
display-drun: "APPS";
display-run: "RUN";
display-filebrowser: "FILES";
display-window: "WINDOW";
hover-select: true;
me-select-entry: "";
me-accept-entry: "MousePrimary";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
/* ---- Load pywal colors (custom wal template) ---- */
@import "~/.cache/wal/colors-rofi-pywal"
/* ---- Window ---- */
window {
width: 400px;
x-offset: -15px;
y-offset: 65px;
spacing: 0px;
padding: 0px;
margin: 0px;
color: #FFFFFF;
border: 3px;
border-color: #FFFFFF;
cursor: "default";
transparency: "real";
location: northeast;
anchor: northeast;
fullscreen: false;
enabled: true;
border-radius: 10px;
background-color: transparent;
}
/* ---- Mainbox ---- */
mainbox {
enabled: true;
orientation: horizontal;
spacing: 0px;
margin: 0px;
background-color: @background;
background-image: url("~/.cache/current_wallpaper.jpg", height);
children: ["listbox"];
}
/* ---- Imagebox ---- */
imagebox {
padding: 18px;
background-color: transparent;
orientation: vertical;
children: [ "inputbar", "dummy", "mode-switcher" ];
}
/* ---- Listbox ---- */
listbox {
spacing: 20px;
background-color: transparent;
orientation: vertical;
children: [ "listview" ];
}
/* ---- Dummy ---- */
dummy {
background-color: transparent;
}
/* ---- Inputbar ---- */
inputbar {
enabled: true;
text-color: @foreground;
spacing: 10px;
padding: 15px;
border-radius: 0px;
border-color: @foreground;
background-color: @background;
children: [ "textbox-prompt-colon", "entry" ];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
background-color: transparent;
text-color: inherit;
}
entry {
enabled: true;
background-color: transparent;
text-color: inherit;
cursor: text;
placeholder: "Search";
placeholder-color: inherit;
}
/* ---- Mode Switcher ---- */
mode-switcher{
enabled: true;
spacing: 20px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 10px;
border-radius: 10px;
background-color: @background;
text-color: inherit;
cursor: pointer;
border: 0px;
}
button selected {
background-color: @color11;
text-color: @foreground;
}
/* ---- Listview ---- */
listview {
enabled: true;
columns: 1;
lines: 2;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 0px;
padding: 10px;
margin: 0px;
background-color: @background;
border:0px;
}
/* ---- Element ---- */
element {
enabled: true;
padding: 10px;
margin: 5px;
cursor: pointer;
background-color: @background;
border-radius: 10px;
border: 2px;
}
element normal.normal {
background-color: inherit;
text-color: @foreground;
}
element normal.urgent {
background-color: inherit;
text-color: @foreground;
}
element normal.active {
background-color: inherit;
text-color: @foreground;
}
element selected.normal {
background-color: @color11;
text-color: @foreground;
}
element selected.urgent {
background-color: inherit;
text-color: @foreground;
}
element selected.active {
background-color: inherit;
text-color: @foreground;
}
element alternate.normal {
background-color: inherit;
text-color: @foreground;
}
element alternate.urgent {
background-color: inherit;
text-color: @foreground;
}
element alternate.active {
background-color: inherit;
text-color: @foreground;
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 32px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Message -----*****/
message {
background-color: transparent;
border:0px;
margin:20px 0px 0px 0px;
padding:0px;
spacing:0px;
border-radius: 10px;
}
textbox {
padding: 15px;
margin: 0px;
border-radius: 0px;
background-color: @background;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
}
error-message {
padding: 15px;
border-radius: 20px;
background-color: @background;
text-color: @foreground;
}

View File

@ -18,7 +18,7 @@ options="$option1\n"
options="$options$option2\n"
options="$options$option3\n$option4"
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Powermenu")
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-power.rasi -i -no-show-icons -l 4 -width 30 -p "Powermenu")
case $choice in
$option1)

View File

@ -16,9 +16,9 @@ option1="Selected window (delay 3 sec)"
option2="Selected area"
option3="Fullscreen (delay 3 sec)"
options="$option1\n$option2\n$option3"
options="$option2\n$option3\n$option1"
choice=$(echo -e "$options" | rofi -i -dmenu -lines 4 -width 30 -p "Take Screenshot")
choice=$(echo -e "$options" | rofi -i -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -p "Take Screenshot")
case $choice in
$option1)

View File

@ -31,6 +31,12 @@ qtile cmd-obj -o cmd -f reload_config
# -----------------------------------------------------
source "$HOME/.cache/wal/colors.sh"
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
# -----------------------------------------------------
# Copy selected wallpaper into .cache folder
# -----------------------------------------------------
cp $wallpaper ~/.cache/current_wallpaper.jpg
sleep 1
# -----------------------------------------------------

View File

@ -10,7 +10,7 @@
# -----------------------------------------------------
# Select wallpaper
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -p "Wallpapers")
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -p "Wallpapers")
if [ "$selected" ]; then
@ -28,6 +28,12 @@ if [ "$selected" ]; then
source "$HOME/.cache/wal/colors.sh"
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
# -----------------------------------------------------
# Copy selected wallpaper into .cache folder
# -----------------------------------------------------
cp $wallpaper ~/.cache/current_wallpaper.jpg
sleep 1
# Send notification

View File

@ -45,15 +45,15 @@
// Modules Right
"modules-right": [
"custom/wallpaper",
"custom/cliphist",
"custom/updates",
"pulseaudio",
"bluetooth",
"battery",
"group/hardware",
"custom/exit",
"custom/wallpaper",
"custom/cliphist",
"network",
"custom/exit",
"clock"
],

View File

@ -49,11 +49,11 @@
"pulseaudio",
"bluetooth",
"battery",
"group/hardware",
"custom/wallpaper",
"custom/cliphist",
"group/hardware",
"custom/exit",
"network",
"custom/exit",
"clock"
],