From 19d2602a258b21e595c76cabdc58a8203bb4d560 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 3 May 2024 12:29:41 +0700 Subject: [PATCH] vimrc and powermenu shared --- rofi/powermenu/powermenu.sh | 20 +------ rofi/powermenu/shared/colors.rasi | 18 ++++++ rofi/powermenu/shared/confirm.rasi | 93 ++++++++++++++++++++++++++++++ rofi/powermenu/shared/fonts.rasi | 12 ++++ vimrc | 2 + 5 files changed, 128 insertions(+), 17 deletions(-) create mode 100644 rofi/powermenu/shared/colors.rasi create mode 100644 rofi/powermenu/shared/confirm.rasi create mode 100644 rofi/powermenu/shared/fonts.rasi diff --git a/rofi/powermenu/powermenu.sh b/rofi/powermenu/powermenu.sh index b939527..fa02990 100755 --- a/rofi/powermenu/powermenu.sh +++ b/rofi/powermenu/powermenu.sh @@ -65,16 +65,8 @@ run_cmd() { amixer set Master mute systemctl suspend elif [[ $1 == '--logout' ]]; then - if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then - openbox --exit - elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then - bspc quit - elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then - i3-msg exit - elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then - qdbus org.kde.ksmserver /KSMServer logout 0 0 0 - fi - fi + systemctl restart ly + fi else exit 0 fi @@ -90,13 +82,7 @@ case ${chosen} in run_cmd --reboot ;; $lock) - #if [[ -x '/usr/bin/betterlockscreen' ]]; then - # betterlockscreen -l - #elif [[ -x '/usr/bin/i3lock' ]]; then - # i3lock - #elif [[ -x '/usr/bin/swaylock' ]]; then - swaylock - #fi + hyprlock ;; $suspend) run_cmd --suspend diff --git a/rofi/powermenu/shared/colors.rasi b/rofi/powermenu/shared/colors.rasi new file mode 100644 index 0000000..103ad63 --- /dev/null +++ b/rofi/powermenu/shared/colors.rasi @@ -0,0 +1,18 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + * + * Available Colors Schemes + * + * adapta catppuccin everforest navy paper + * arc cyberpunk gruvbox nord solarized + * black dracula lovelace onedark yousai + * + **/ + +/* Import color-scheme from `colors` directory */ + +@import "~/.config/rofi/colors/onedark.rasi" diff --git a/rofi/powermenu/shared/confirm.rasi b/rofi/powermenu/shared/confirm.rasi new file mode 100644 index 0000000..9f74f2a --- /dev/null +++ b/rofi/powermenu/shared/confirm.rasi @@ -0,0 +1,93 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "colors.rasi" +@import "fonts.rasi" + +/*****----- Main Window -----*****/ +window { + location: center; + anchor: center; + fullscreen: false; + width: 500px; + border-radius: 20px; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + spacing: 30px; + padding: 30px; + background-color: transparent; + children: [ "message", "listview" ]; +} + +/*****----- Message -----*****/ +message { + margin: 0px; + padding: 20px; + border-radius: 20px; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; + placeholder-color: @foreground; + blink: true; + markup: true; +} + +/*****----- Listview -----*****/ +listview { + columns: 2; + lines: 1; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 30px; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + padding: 60px 10px; + border-radius: 20px; + background-color: @background-alt; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 48"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/rofi/powermenu/shared/fonts.rasi b/rofi/powermenu/shared/fonts.rasi new file mode 100644 index 0000000..68fd613 --- /dev/null +++ b/rofi/powermenu/shared/fonts.rasi @@ -0,0 +1,12 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Fonts + * + **/ + +* { + font: "JetBrains Mono Nerd Font 12"; +} diff --git a/vimrc b/vimrc index be4da73..9ab0ee5 100644 --- a/vimrc +++ b/vimrc @@ -28,6 +28,8 @@ call plug#begin() Plug 'ghifarit53/tokyonight-vim' Plug 'valloric/youcompleteme' Plug 'Eliot00/git-lens.vim' + Plug 'pangloss/vim-javascript' + Plug 'mxw/vim-jsx' call plug#end() nnoremap :NERDTreeFocus