Command input field
This commit is contained in:
parent
0ef723038b
commit
5fd5fc094b
13
eww.css
13
eww.css
@ -145,3 +145,16 @@ tooltip {
|
|||||||
.panel_mini_widg.panel_ico.panel_weather_ico {
|
.panel_mini_widg.panel_ico.panel_weather_ico {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Command prompt widget */
|
||||||
|
.executioner {
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: rgba(128, 128, 128, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cmd_input_field {
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: rgba(128, 128, 128, 0.5);
|
||||||
|
padding: 5px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
3
eww.yuck
3
eww.yuck
@ -2,4 +2,5 @@
|
|||||||
(include "yuck/test/test-window.yuck")
|
(include "yuck/test/test-window.yuck")
|
||||||
(include "yuck/osd/osd_window.yuck")
|
(include "yuck/osd/osd_window.yuck")
|
||||||
(include "yuck/dock/dock_window.yuck")
|
(include "yuck/dock/dock_window.yuck")
|
||||||
(include "yuck/panel/panel_window.yuck")
|
(include "yuck/panel/panel_window.yuck")
|
||||||
|
(include "yuck/exec_cmd/executioner.yuck")
|
14
scss/cmd/_cmd.scss
Normal file
14
scss/cmd/_cmd.scss
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@use "../colors/_glassy.scss" as *;
|
||||||
|
/* Command prompt widget */
|
||||||
|
|
||||||
|
.executioner {
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: $dock_bg_col;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cmd_input_field {
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: $dock_bg_col;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
@use "osd/_osd.scss";
|
@use "osd/_osd.scss";
|
||||||
@use "dock/_dock.scss";
|
@use "dock/_dock.scss";
|
||||||
@use "panel/_panel.scss";
|
@use "panel/_panel.scss";
|
||||||
|
@use "cmd/cmd";
|
||||||
|
|
||||||
|
|
||||||
//@use "colors/_glassy.scss";
|
//@use "colors/_glassy.scss";
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
vol=$(amixer get Master | grep "Mono: Playback" | sed -n 's/.*Mono: Playback [0-9]* \[\([0-9]*\)%\].*\[\(.*\)\]/\1 \2/p')
|
vol=$(amixer get Master | grep "Mono: Playback" | sed -n 's/.*Mono: Playback [0-9]* \[\([0-9]*\)%\].*\[\(.*\)\]/\1 \2/p')
|
||||||
v=${vol%% *} # Volume percentage (18%)
|
v=${vol%% *} # Volume percentage
|
||||||
s=${vol#* } # Mute status (on/off)
|
s=${vol#* } # Volume status (on/off)
|
||||||
|
|
||||||
if [[ $v == '0' ]]; then
|
if [[ $v == '0' ]]; then
|
||||||
s="empty";
|
s="empty";
|
||||||
|
33
yuck/exec_cmd/executioner.yuck
Normal file
33
yuck/exec_cmd/executioner.yuck
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
; Command prompt
|
||||||
|
(defwindow executioner []
|
||||||
|
:geometry (
|
||||||
|
geometry
|
||||||
|
:x "0%"
|
||||||
|
:y "0%"
|
||||||
|
:height "70px"
|
||||||
|
:width "300px"
|
||||||
|
:anchor "center center"
|
||||||
|
)
|
||||||
|
:monitor 0
|
||||||
|
:stacking "fg"
|
||||||
|
:windowtype "dock"
|
||||||
|
:wm-ignore true
|
||||||
|
:active true
|
||||||
|
:focusable true
|
||||||
|
:class "cmd_window"
|
||||||
|
|
||||||
|
(cmd_input)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget cmd_input []
|
||||||
|
(input
|
||||||
|
:class "cmd_input_field"
|
||||||
|
:active true
|
||||||
|
:halign "fill"
|
||||||
|
:height "70px"
|
||||||
|
:width "300px"
|
||||||
|
:value "cmd:"
|
||||||
|
:password false
|
||||||
|
:onaccept "fish {}"
|
||||||
|
)
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user