From: danix Date: Mon, 30 Sep 2019 11:53:09 +0000 (+0200) Subject: Initial commit. I'm fixing the readme RN! X-Git-Url: https://git.danix.xyz/?p=danixland-rofi.git;a=commitdiff_plain;h=6e5a5ccbadffd167fda396efa72ce024f9f0b438 Initial commit. I'm fixing the readme RN! --- 6e5a5ccbadffd167fda396efa72ce024f9f0b438 diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d01edb --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# danixland-rofi + +A set of scripts for my personal Rofi theme. Follow the instructions and it should be pretty much drop and play, but it might need a little editing if your screen size is different or if you don't like the color scheme. + +## Getting Started + +Copy the content of the **scripts** directory wherever you put your personal scripts, I use `~/bin` for my user scripts or `/usr/local/bin` for system wide scripts that can be used by all users on my system. In this case I have everything inside my home. + +Now copy the content of the **theme** directory inside `~/.config/rofi/themename` (change theme name to whatever you want to call it) and change "themename" to whatever you called it inside every single bash script. + +### Prerequisites + +Of course you need [rofi](https://github.com/davatorium/rofi) installed in your system. + +In case you want to modify the theme you might need to have a look at [the wiki on how rasi themes work](https://github.com/davatorium/rofi/blob/1ab3e571eca1768d437246ca6ec09f44432b0e20/doc/rofi-theme.5.markdown), it's a dialect of CSS so it shouldn't be difficult. + +### Does it looks like a bitch??!! + +Here's what the theme looks like: + +![power menu]() + +## Built With + +* [Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used +* [Maven](https://maven.apache.org/) - Dependency Management +* [ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds + +## Contributing + +Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. + +## Versioning + +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). + +## Authors + +* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth) + +See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details + +## Acknowledgments + +* Hat tip to anyone whose code was used +* Inspiration +* etc diff --git a/screenshots/appsmenu.png b/screenshots/appsmenu.png new file mode 100644 index 0000000..c5f450c Binary files /dev/null and b/screenshots/appsmenu.png differ diff --git a/screenshots/powermenu.png b/screenshots/powermenu.png new file mode 100644 index 0000000..edfc8c3 Binary files /dev/null and b/screenshots/powermenu.png differ diff --git a/screenshots/scrotmenu.png b/screenshots/scrotmenu.png new file mode 100644 index 0000000..a2c533e Binary files /dev/null and b/screenshots/scrotmenu.png differ diff --git a/screenshots/sshmenu.png b/screenshots/sshmenu.png new file mode 100644 index 0000000..3ff18e9 Binary files /dev/null and b/screenshots/sshmenu.png differ diff --git a/screenshots/utilsmenu.png b/screenshots/utilsmenu.png new file mode 100644 index 0000000..5dec5d0 Binary files /dev/null and b/screenshots/utilsmenu.png differ diff --git a/screenshots/windowmenu.png b/screenshots/windowmenu.png new file mode 100644 index 0000000..3e24d48 Binary files /dev/null and b/screenshots/windowmenu.png differ diff --git a/scripts/danixland-appsmenu.sh b/scripts/danixland-appsmenu.sh new file mode 100644 index 0000000..b34aac0 --- /dev/null +++ b/scripts/danixland-appsmenu.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +rofi -no-lazy-grab -show drun -theme danixland/appsmenu.rasi + diff --git a/scripts/danixland-powermenu.sh b/scripts/danixland-powermenu.sh new file mode 100644 index 0000000..00fa7cf --- /dev/null +++ b/scripts/danixland-powermenu.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +rofi_command="rofi -theme danixland/powermenu.rasi" + +### Options ### +power_off="" +reboot="" +lock="" +suspend="鈴" +log_out="" +# Variable passed to rofi +options="$power_off\n$reboot\n$lock\n$suspend\n$log_out" + +chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 2)" +case $chosen in + $power_off) + notify-send 'shutting down' 'the system is going to shutdown now' + sleep 1 + sudo /sbin/shutdown -h now + ;; + $reboot) + notify-send 'rebooting the system' 'the system is going to reboot now' + sleep 1 + sudo /sbin/shutdown -r now + ;; + $lock) + sleep 1 + i3lock-wrapper + ;; + $suspend) + sleep 1 + i3suspend + ;; + $log_out) + i3-exit + ;; +esac + diff --git a/scripts/danixland-scrotmenu.sh b/scripts/danixland-scrotmenu.sh new file mode 100644 index 0000000..e35f92a --- /dev/null +++ b/scripts/danixland-scrotmenu.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +rofi_command="rofi -theme danixland/scrotmenu.rasi" + +### Options ### +screen="" +area="" +window="" +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)" +case $chosen in + $screen) + sleep 1; i3-scrot + ;; + $area) + i3-scrot -s + ;; + $window) + sleep 1; i3-scrot -u + ;; +esac + diff --git a/scripts/danixland-sshmenu.sh b/scripts/danixland-sshmenu.sh new file mode 100644 index 0000000..659a36e --- /dev/null +++ b/scripts/danixland-sshmenu.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +rofi -no-lazy-grab -show ssh -theme danixland/appsmenu.rasi + diff --git a/scripts/danixland-utilsmenu.sh b/scripts/danixland-utilsmenu.sh new file mode 100644 index 0000000..46260f1 --- /dev/null +++ b/scripts/danixland-utilsmenu.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +rofi_command="rofi -theme danixland/utilsmenu.rasi" + +### Options ### +wpaper="" +webdevel="" +# Variable passed to rofi +options="$wpaper\n$webdevel" + +chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)" +case $chosen in + $wpaper) + change_wallpaper.sh + ;; + $webdevel) + webdevel + ;; +esac + diff --git a/scripts/danixland-window.sh b/scripts/danixland-window.sh new file mode 100644 index 0000000..28fbfb7 --- /dev/null +++ b/scripts/danixland-window.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +case $1 in + all ) + rofi -no-lazy-grab -show window -theme danixland/appsmenu.rasi + ;; + desktop ) + rofi -no-lazy-grab -show windowcd -theme danixland/appsmenu.rasi + ;; +esac + + diff --git a/theme/appsmenu.rasi b/theme/appsmenu.rasi new file mode 100644 index 0000000..f01483a --- /dev/null +++ b/theme/appsmenu.rasi @@ -0,0 +1,51 @@ +/** + * This theme is intended for a 8x2 items list menu with a headerbar. + */ +@import "shared/settings.rasi" +* { + background-color: @transparent; + text-color: @foreground-list; + font: @text-font; +} +#window { + background-color: @background-trans; + transparency: "background"; + padding: @list-8-window-padding; +} +inputbar, +prompt, +textbox-prompt-colon, +entry { + background-color: @background; +} +#inputbar { + children: [ prompt, textbox-prompt-colon, entry ]; + margin: @inputbar-margin; +} +#prompt { + padding: @prompt-padding; + background-color: @accent; + text-color: @background; +} +#textbox-prompt-colon { + expand: false; + str: " : : "; + padding: @apps-textbox-prompt-colon-padding; +} +#entry { + text-color: @accent; + padding: @entry-padding; +} +#element { + padding: @list-element-padding; + margin: @list-element-margin; + border: @list-element-border; + background-color: @background; + border-color: @background; +} +#element.selected { + background-color: @background-focus; + text-color: @accent; + border-color: @accent; +} + diff --git a/theme/powermenu.rasi b/theme/powermenu.rasi new file mode 100644 index 0000000..dc49261 --- /dev/null +++ b/theme/powermenu.rasi @@ -0,0 +1,13 @@ +/** + * This theme is intended for a 5 items wide menu on a 1920x1080 pixels resolution. + * You may have to tweak values such as the window padding if you have a different resolution. + */ +@import "shared/option-menu.rasi" +#window { + padding: @option-5-window-padding; +} +#listview { + spacing: @option-5-listview-spacing; + lines: 5; +} + diff --git a/theme/scrotmenu.rasi b/theme/scrotmenu.rasi new file mode 100644 index 0000000..eaa4e38 --- /dev/null +++ b/theme/scrotmenu.rasi @@ -0,0 +1,13 @@ +/** + * This theme is intended for a 3 items wide menu on a 1920x1080 pixels resolution. + * You may have to tweak values such as the window padding if you have a different resolution. + */ +@import "shared/option-menu.rasi" +#window { + padding: @option-3-window-padding; +} +#listview { + spacing: @option-3-listview-spacing; + lines: 3; +} + diff --git a/theme/shared/colors/dark-amber.rasi b/theme/shared/colors/dark-amber.rasi new file mode 100644 index 0000000..ef4b960 --- /dev/null +++ b/theme/shared/colors/dark-amber.rasi @@ -0,0 +1,11 @@ +* { + accent: rgba(255,191,0,1); + background: rgba(28,28,28,1); + background-trans: rgba(28,28,28,0.85); + background-focus: rgba(40,40,40,1); + foreground: rgba(136,136,136,1); + foreground-list: rgba(187,187,187,1); + on: rgba(68,173,77,1); + off: rgba(227,64,57,1); + transparent: rgba(255,255,255,0); +} diff --git a/theme/shared/option-menu.rasi b/theme/shared/option-menu.rasi new file mode 100644 index 0000000..a5c5f41 --- /dev/null +++ b/theme/shared/option-menu.rasi @@ -0,0 +1,33 @@ +/** + * Settings used in every rofi option menu: + * - i3layoutmenu + * - mpdmenu + * - powermenu + * - scrotmenu + */ +@import "settings.rasi" +* { + background-color: @transparent; + text-color: @foreground; + font: @icon-font; +} +#window { + children: [ horibox ]; + background-color: @background-trans; + transparency: "background"; +} +#horibox { + children: [ listview ]; +} +#listview { + layout: horizontal; +} +#element { + padding: @option-element-padding; + background-color: @background; +} +#element.selected { + background-color: @accent; + text-color: @background; +} + diff --git a/theme/shared/res/1366x768.rasi b/theme/shared/res/1366x768.rasi new file mode 100644 index 0000000..eeffc1f --- /dev/null +++ b/theme/shared/res/1366x768.rasi @@ -0,0 +1,42 @@ +* { + /* General */ + text-font: "Roboto Mono Nerd Font Regular 14"; + text-font-mono: "Roboto Mono Nerd Font Regular 14"; + icon-font: "Hurmit Nerd Font Mono 50"; + icon-font-small: "Hurmit Nerd Font Mono 24"; + inputbar-margin: 4px 4px; + prompt-padding: 14px 18px; + entry-padding: 16px 14px 14px 0px; + /* list menus: appsmenu, networkmenu and nmvpnmenu */ + list-element-padding: 13px; + list-element-margin: @inputbar-margin; + list-element-border: 0px 0px 0px 8px; + list-8-window-padding: 120px 100px; + /* option menus: i3layoutmenu, mpdmenu, powermenu and scrotmenu */ + /** + * Values bellow are 'no-padding' ones for a size 50 (@icon-font) font, played around using this character: ■ + * We then add add 70 actual padding around the icons. + * -10px 0px -15px -79px */ + option-element-padding: 60px 70px 55px -9px; + option-2-window-padding: 293px 450px; + option-3-window-padding: 263px 221px; + option-2-listview-spacing: 200px; + option-3-listview-spacing: 100px; + option-5-window-padding: 293px 129px; + option-5-listview-spacing: 49px; + option-6-listview-spacing: 30px; + /* appsmenu */ + apps-textbox-prompt-colon-padding: 16px; + /* mpdmenu */ + mpd-window-padding: 257px 64px; + mpd-inputbar-margin: 10px 0px; + mpd-prompt-padding: 14px 20px 10px 20px; + mpd-prompt-margin: 0px 0px 0px -2px; + mpd-element-border: 12px; + /* Every @option-element-padding minus @mpd-element-border */ + mpd-element-padding: 48px 58px 43px -21px; + /* networkmenu */ + network-textbox-prompt-colon-padding: 12px 10px 8px 10px; + /* nmvpnmenu */ + nmvpn-textbox-prompt-colon-padding: @network-textbox-prompt-colon-padding; +} diff --git a/theme/shared/settings.rasi b/theme/shared/settings.rasi new file mode 100644 index 0000000..29e5206 --- /dev/null +++ b/theme/shared/settings.rasi @@ -0,0 +1,11 @@ +/** + * Allows to change the settings of every menu simply by editing this file + */ +@import "colors/dark-amber.rasi" +@import "res/1366x768.rasi" + +#window { + width: 100%; + height: 100%; +} + diff --git a/theme/utilsmenu.rasi b/theme/utilsmenu.rasi new file mode 100644 index 0000000..fe39c8a --- /dev/null +++ b/theme/utilsmenu.rasi @@ -0,0 +1,13 @@ +/** + * This theme is intended for a 3 items wide menu on a 1920x1080 pixels resolution. + * You may have to tweak values such as the window padding if you have a different resolution. + */ +@import "shared/option-menu.rasi" +#window { + padding: @option-2-window-padding; +} +#listview { + spacing: @option-3-listview-spacing; + lines: 3; +} +