-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0948e1
commit eb66085
Showing
8 changed files
with
199 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/bin/bash | ||
|
||
CMD_CALC="calc: Calculator" | ||
CMD_EMOJI="emoji: Emoticons" | ||
CMD_RUN="run: Run a command" | ||
CMD_DRUN="drun: Run a desktop app" | ||
CMD_CQ="clipboard: Copy from clipboard" | ||
CMD_WM="window: Select a window" | ||
CMD_SS="screenshot: Capture screen" | ||
CMD_MON="monitor: monitor" | ||
CMD_BMK="bookmarks:: Chrome bookmarks" | ||
CMD_KILL="kill: kill a window" | ||
CMD_SCRCPY="scrcpy: mirror mobile screen" | ||
CMD_COLOR="color: color picker" | ||
CMD_DICT="dict: dictionary" | ||
CMD_UC="unicode: unicode symbols" | ||
|
||
if [[ -z "$1" ]]; then | ||
echo $CMD_CALC | ||
echo $CMD_EMOJI | ||
echo $CMD_RUN | ||
echo $CMD_DRUN | ||
echo $CMD_CQ | ||
echo $CMD_WM | ||
echo $CMD_SS | ||
echo $CMD_MON | ||
echo $CMD_BMK | ||
echo $CMD_KILL | ||
echo $CMD_SCRCPY | ||
echo $CMD_COLOR | ||
# translate-shell package | ||
echo $CMD_DICT | ||
echo $CMD_UC | ||
fi | ||
|
||
case $1 in | ||
"$CMD_CALC" ) | ||
kill `pidof rofi` | ||
rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip -selection clipboard" | ||
;; | ||
"$CMD_DRUN" ) | ||
kill `pidof rofi` | ||
rofi -show drun | ||
;; | ||
"$CMD_EMOJI" ) | ||
kill `pidof rofi` | ||
rofi -show emoji | ||
;; | ||
"$CMD_RUN" ) | ||
kill `pidof rofi` | ||
rofi -show run | ||
;; | ||
"$CMD_WM" ) | ||
kill `pidof rofi` | ||
rofi -show window | ||
;; | ||
"$CMD_CQ" ) | ||
kill `pidof rofi` | ||
rofi -show clipboard | ||
;; | ||
"$CMD_MON" ) | ||
kill `pidof rofi` | ||
bash ~/.xmonad/bin/rofi-screen.sh | ||
;; | ||
"$CMD_SS" ) | ||
kill `pidof rofi` | ||
sleep 0.7 | ||
scrot -s --freeze -e 'xclip -selection clipboard -t image/png -i $f' | ||
;; | ||
"$CMD_KILL" ) | ||
kill `pidof rofi` | ||
xkill | ||
;; | ||
"$CMD_SCRCPY" ) | ||
kill `pidof rofi` | ||
scrcpy | ||
;; | ||
"$CMD_COLOR" ) | ||
kill `pidof rofi` | ||
colorpicker --short --one-shot | xclip -selection clipboard -i | ||
;; | ||
"$CMD_BMK" ) | ||
kill `pidof rofi` | ||
~/.local/bin/rofi-browser-bookmarks google-chrome | ||
;; | ||
"$CMD_DICT" ) | ||
kill `pidof rofi` | ||
echo $(trans "$2") | ||
;; | ||
"$CMD_UC" ) | ||
kill `pidof rofi` | ||
echo $(rofi -modi "emoji:rofimoji" -show emoji) | ||
;; | ||
esac |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
eval $(xdotool getmouselocation --shell) | ||
echo $X,$Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cupd=$(checkupdates | wc -l) | ||
echo "$cupd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/usr/bin/env bash | ||
|
||
OPT1="OdysseyG9: 3-screens and bottom" | ||
OPT2="OdysseyG9: full-screen and bottom" | ||
OPT3="OdysseyG9: full-screen and off" | ||
OPT4="Mirror: USB-C FHD" | ||
OPT5="Extend: USB-C FHD" | ||
OPT6="One" | ||
OPT7="Mirror: HDMI" | ||
OPT8="Extend: HDMI" | ||
OPT9="OdysseyG9: One on DP" | ||
|
||
get_options() { | ||
echo "$OPT9" | ||
echo "$OPT3" | ||
echo "$OPT2" | ||
echo "$OPT4" | ||
echo "$OPT1" | ||
echo "$OPT5" | ||
echo "$OPT6" | ||
echo "$OPT7" | ||
echo "$OPT8" | ||
} | ||
|
||
main() { | ||
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "Screenshot" ) | ||
|
||
if [[ -z "${choice// }" ]]; then | ||
exit 1 | ||
fi | ||
|
||
case $choice in | ||
"$OPT1") | ||
xrandr --setmonitor VIRTUAL-LEFT 1280/297x1440/340+0+0 none | ||
xrandr --setmonitor VIRTUAL-CENTER 2560/596x1440/340+1280+0 HDMI-0 | ||
xrandr --setmonitor VIRTUAL-RIGHT 1280/297x1440/340+3840+0 none | ||
xrandr --fb 5120x1440 | ||
# xrandr --setmonitor ODYSSEY~1 1280/2980x1440/3350+0+0 HDMI-0 | ||
# xrandr --setmonitor ODYSSEY~2 2560/5960x1440/3350+1280+0 none | ||
# xrandr --setmonitor ODYSSEY~3 1280/2980x1440/3350+3840+0 none | ||
xrandr --output VIRTUAL-CENTER --mode 2560x1440 --output VIRTUAL-LEFT --mode 1280x1440 --left-of VIRTUAL-CENTER --output VIRTUAL-RIGHT --mode 1280x1440 --right-of VIRTUAL-CENTER | ||
;; | ||
"$OPT2") | ||
xrandr --output HDMI-0 --mode 5120x1440 --output DP-4 --off | ||
xrandr --output DP-4 --mode 1920x1080 --pos 1600x1440 | ||
;; | ||
"$OPT3") | ||
xrandr --output HDMI-0 --mode 5120x1440 --output DP-4 --off | ||
;; | ||
"$OPT4") | ||
xrandr --output DP-4 --auto | ||
xrandr --output DP-0 --same-as DP-4 --auto | ||
;; | ||
"$OPT5") | ||
xrandr --output DP-4 --auto | ||
xrandr --output DP-0 --auto --right-of DP-4 | ||
;; | ||
"$OPT6") | ||
xrandr --output DP-4 --auto | ||
xrandr --output HDMI-0 --off | ||
xrandr --output DP-0 --off | ||
;; | ||
"$OPT7") | ||
xrandr --output HDMI-0 --same-as DP-4 --auto | ||
;; | ||
"$OPT8") | ||
xrandr --output DP-4 --auto | ||
xrandr --output HDMI-0 --auto --right-of DP-4 | ||
;; | ||
"$OPT9") | ||
xrandr --output DP-4 --mode 5120x1440 --output HDMI-0 --off | ||
;; | ||
esac | ||
} | ||
|
||
main "$@" & | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters