Initial Rofi config

Adds Screenshot Applet
This commit is contained in:
fanyx 2022-06-12 19:35:34 +02:00
parent e02c4e1fba
commit ea39007adc
12 changed files with 143 additions and 0 deletions

4
.config/rofi/config.rasi Normal file
View File

@ -0,0 +1,4 @@
configuration {
show-icons: true;
icon-theme: "Papirus";
}

44
.config/rofi/scripts/screenshot Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
DIR="$HOME/.config/rofi"
rofi_command="rofi -theme $DIR/themes/screenshot.rasi"
time=`date +%Y-%m-%d-%H-%M-%S`
dir="$HOME/Pictures/Screenshots"
file="Screenshot_${time}.png"
screenleft="< "
area=""
screenright=" >"
shotscreenleft() {
cd ${dir} && sleep 0.5 && maim -u -f png -g 2560x1440+0+0 | tee "$file" | xclip -selection clipboard -t image/png
}
shotscreenright() {
cd ${dir} && sleep 0.5 && maim -u -f png -g 2560x1440+2560+0 | tee "$file" | xclip -selection clipboard -t image/png
}
shotarea() {
cd ${dir} && sleep 0.5 && maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | tee "$file" | xclip -selection clipboard -t image/png
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
options="$screenleft\n$area\n$screenright"
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)"
case $chosen in
$screenleft)
shotscreenleft
;;
$area)
shotarea
;;
$screenright)
shotscreenright
;;
esac

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -0,0 +1,9 @@
* {
background: #21201E;
foreground: #EAD17F;
selected: #F0C674;
highlight: #8ABEB7;
urgent: #BF616A;
on: #3E2441;
off: #76573A;
}

View File

@ -0,0 +1,86 @@
configuration {
font: "Font Awesome 5 Free 20";
show-icons: false;
disable-history: false;
click-to-exit: true;
}
@import "colors.rasi"
* {
background-color: @background;
text-color: @foreground;
}
window {
transparency: "real";
border-radius: 0px;
location: center;
width: 500px;
x-offset: -15px;
y-offset: -45px;
}
listview {
columns: 3;
lines: 1;
spacing: 12px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ listview ];
spacing: 12px;
margin: 12px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: vertical;
border-radius: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
font: "Font Awesome 5 Free 20";
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 48px 0px 48px 0px;
}
element normal.urgent,
element alternate.urgent {
background-color: @off;
text-color: @background;
border-radius: 0px;
}
element normal.active,
element alternate.active {
background-color: @on;
text-color: @background;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @highlight;
}
element selected.urgent {
background-color: @on;
text-color: @background;
}
element selected.active {
background-color: @off;
color: @background;
}