mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-24 13:22:23 +00:00
asdf
This commit is contained in:
parent
616ca3e9ae
commit
8249503a34
29 changed files with 224 additions and 267 deletions
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"optOut": false,
|
"optOut": false,
|
||||||
"lastUpdateCheck": 1585227673282
|
"lastUpdateCheck": 1585325052615
|
||||||
}
|
}
|
|
@ -4,6 +4,7 @@ fish_vi_key_bindings
|
||||||
alias ls=lsd
|
alias ls=lsd
|
||||||
abbr --add --global vim nvim
|
abbr --add --global vim nvim
|
||||||
abbr --add --global tsh trash
|
abbr --add --global tsh trash
|
||||||
|
abbr --add --global clear "clear && ls"
|
||||||
|
|
||||||
|
|
||||||
[ (hostname) = "garnix" ] && alias rm='echo "rm is disabled. Please use trash instead."; false'
|
[ (hostname) = "garnix" ] && alias rm='echo "rm is disabled. Please use trash instead."; false'
|
||||||
|
|
|
@ -52,11 +52,9 @@ import XMonad.Actions.Commands
|
||||||
-- Values -------------------- {{{
|
-- Values -------------------- {{{
|
||||||
|
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
myLauncher = Rofi.asCommand def ["-show run"] -- "rofi -show run -theme /home/leon/scripts/rofi-scripts/launcher_grid_full_style.rasi"
|
myLauncher = Rofi.asCommand (def { Rofi.theme = Rofi.bigTheme }) ["-show run"]
|
||||||
myTerminal = "kitty --single-instance" -- try alacritty
|
myTerminal = "kitty --single-instance" -- try alacritty
|
||||||
myBrowser = "google-chrome-stable"
|
myBrowser = "google-chrome-stable"
|
||||||
--yBar = "xmobar"
|
|
||||||
--myXmobarPP= xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
|
|
||||||
|
|
||||||
{-| adds the scripts-directory path to the filename of a script |-}
|
{-| adds the scripts-directory path to the filename of a script |-}
|
||||||
scriptFile :: String -> String
|
scriptFile :: String -> String
|
||||||
|
@ -169,8 +167,8 @@ myKeys = [ ("M-C-k", sendMessage MirrorExpand >> sendMessage ShrinkSlave )
|
||||||
-- programs
|
-- programs
|
||||||
, ("M-p", spawn myLauncher)
|
, ("M-p", spawn myLauncher)
|
||||||
, ("M-b", spawn myBrowser)
|
, ("M-b", spawn myBrowser)
|
||||||
, ("M-S-p", Rofi.showCombi def [ "drun", "window", "ssh" ])
|
, ("M-S-p", Rofi.showCombi (def { Rofi.theme = Rofi.bigTheme }) [ "drun", "window", "ssh" ])
|
||||||
, ("M-S-e", Rofi.showNormal def "emoji" )
|
, ("M-S-e", Rofi.showNormal (def { Rofi.theme = Rofi.bigTheme }) "emoji" )
|
||||||
, ("M-s", spawn $ scriptFile "rofi-search.sh")
|
, ("M-s", spawn $ scriptFile "rofi-search.sh")
|
||||||
, ("M-S-s", spawn $ scriptFile "rofi-open.sh")
|
, ("M-S-s", spawn $ scriptFile "rofi-open.sh")
|
||||||
, ("M-n", scratchpadSubmap )
|
, ("M-n", scratchpadSubmap )
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
|
{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
|
||||||
module Rofi (asCommand, promptSimple, promptMap, promptRunCommand, showNormal, showCombi) where
|
module Rofi
|
||||||
|
( asCommand
|
||||||
|
, promptSimple
|
||||||
|
, promptMap
|
||||||
|
, promptRunCommand
|
||||||
|
, showNormal
|
||||||
|
, showCombi
|
||||||
|
, smallTheme
|
||||||
|
, bigTheme
|
||||||
|
, RofiConfig(..)
|
||||||
|
)
|
||||||
|
where
|
||||||
|
|
||||||
import Data.List ( intercalate )
|
import Data.List ( intercalate )
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -15,13 +26,19 @@ data RofiConfig
|
||||||
|
|
||||||
instance Default RofiConfig where
|
instance Default RofiConfig where
|
||||||
def = RofiConfig
|
def = RofiConfig
|
||||||
{ theme = "/home/leon/scripts/rofi-scripts/launcher_grid_full_style.rasi"
|
{ theme = smallTheme
|
||||||
, caseInsensitive = True
|
, caseInsensitive = True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
smallTheme :: String
|
||||||
|
smallTheme = "/home/leon/scripts/rofi-scripts/launcher_grid_style.rasi"
|
||||||
|
|
||||||
|
bigTheme :: String
|
||||||
|
bigTheme = "/home/leon/scripts/rofi-scripts/launcher_grid_full_style.rasi"
|
||||||
|
|
||||||
toArgList :: RofiConfig -> [String]
|
toArgList :: RofiConfig -> [String]
|
||||||
toArgList RofiConfig {..} =
|
toArgList RofiConfig {..} =
|
||||||
["-theme " ++ theme, if caseInsensitive then "-i" else ""]
|
["-theme", theme, if caseInsensitive then "-i" else ""]
|
||||||
|
|
||||||
-- |given an array of arguments, generate a string that would call rofi with the configuration and arguments
|
-- |given an array of arguments, generate a string that would call rofi with the configuration and arguments
|
||||||
asCommand :: RofiConfig -> [String] -> String
|
asCommand :: RofiConfig -> [String] -> String
|
||||||
|
@ -37,7 +54,7 @@ promptMap config = Dmenu.menuMapArgs rofiCmd ("-dmenu" : toArgList config)
|
||||||
|
|
||||||
-- |Display a list of commands, of which the chosen one will be executed. See `Xmonad.Actions.Commands.runCommandConfig`
|
-- |Display a list of commands, of which the chosen one will be executed. See `Xmonad.Actions.Commands.runCommandConfig`
|
||||||
promptRunCommand :: RofiConfig -> [(String, X ())] -> X ()
|
promptRunCommand :: RofiConfig -> [(String, X ())] -> X ()
|
||||||
promptRunCommand config = XCommands.runCommandConfig $ Rofi.promptSimple config
|
promptRunCommand config = XCommands.runCommandConfig (Rofi.promptSimple config)
|
||||||
|
|
||||||
-- |prompt a single rofi mode. ex: `showNormal def "run"`
|
-- |prompt a single rofi mode. ex: `showNormal def "run"`
|
||||||
showNormal :: RofiConfig -> String -> X ()
|
showNormal :: RofiConfig -> String -> X ()
|
||||||
|
|
Binary file not shown.
2
files/scripts/bookmarkr/.gitignore
vendored
2
files/scripts/bookmarkr/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
.stack-work/
|
|
||||||
*~
|
|
|
@ -1,3 +0,0 @@
|
||||||
# Changelog for bookmarkr
|
|
||||||
|
|
||||||
## Unreleased changes
|
|
|
@ -1,30 +0,0 @@
|
||||||
Copyright Author name here (c) 2020
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above
|
|
||||||
copyright notice, this list of conditions and the following
|
|
||||||
disclaimer in the documentation and/or other materials provided
|
|
||||||
with the distribution.
|
|
||||||
|
|
||||||
* Neither the name of Author name here nor the names of other
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
@ -1 +0,0 @@
|
||||||
# bookmarkr
|
|
|
@ -1,2 +0,0 @@
|
||||||
import Distribution.Simple
|
|
||||||
main = defaultMain
|
|
|
@ -1,6 +0,0 @@
|
||||||
module Main where
|
|
||||||
|
|
||||||
import Lib
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = someFunc
|
|
|
@ -1,62 +0,0 @@
|
||||||
cabal-version: 1.12
|
|
||||||
|
|
||||||
-- This file has been generated from package.yaml by hpack version 0.31.2.
|
|
||||||
--
|
|
||||||
-- see: https://github.com/sol/hpack
|
|
||||||
--
|
|
||||||
-- hash: 9bf57b99774591f4bea513e9e9dc9e0107d10cfffd15426effb823a9f4cf9f2c
|
|
||||||
|
|
||||||
name: bookmarkr
|
|
||||||
version: 0.1.0.0
|
|
||||||
description: Please see the README on GitHub at <https://github.com/githubuser/bookmarkr#readme>
|
|
||||||
homepage: https://github.com/githubuser/bookmarkr#readme
|
|
||||||
bug-reports: https://github.com/githubuser/bookmarkr/issues
|
|
||||||
author: Author name here
|
|
||||||
maintainer: example@example.com
|
|
||||||
copyright: 2020 Author name here
|
|
||||||
license: BSD3
|
|
||||||
license-file: LICENSE
|
|
||||||
build-type: Simple
|
|
||||||
extra-source-files:
|
|
||||||
README.md
|
|
||||||
ChangeLog.md
|
|
||||||
|
|
||||||
source-repository head
|
|
||||||
type: git
|
|
||||||
location: https://github.com/githubuser/bookmarkr
|
|
||||||
|
|
||||||
library
|
|
||||||
exposed-modules:
|
|
||||||
Lib
|
|
||||||
other-modules:
|
|
||||||
Paths_bookmarkr
|
|
||||||
hs-source-dirs:
|
|
||||||
src
|
|
||||||
build-depends:
|
|
||||||
base >=4.7 && <5
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
|
||||||
executable bookmarkr-exe
|
|
||||||
main-is: Main.hs
|
|
||||||
other-modules:
|
|
||||||
Paths_bookmarkr
|
|
||||||
hs-source-dirs:
|
|
||||||
app
|
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
|
||||||
build-depends:
|
|
||||||
base >=4.7 && <5
|
|
||||||
, bookmarkr
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
|
||||||
test-suite bookmarkr-test
|
|
||||||
type: exitcode-stdio-1.0
|
|
||||||
main-is: Spec.hs
|
|
||||||
other-modules:
|
|
||||||
Paths_bookmarkr
|
|
||||||
hs-source-dirs:
|
|
||||||
test
|
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
|
||||||
build-depends:
|
|
||||||
base >=4.7 && <5
|
|
||||||
, bookmarkr
|
|
||||||
default-language: Haskell2010
|
|
|
@ -1,48 +0,0 @@
|
||||||
name: bookmarkr
|
|
||||||
version: 0.1.0.0
|
|
||||||
github: "githubuser/bookmarkr"
|
|
||||||
license: BSD3
|
|
||||||
author: "Author name here"
|
|
||||||
maintainer: "example@example.com"
|
|
||||||
copyright: "2020 Author name here"
|
|
||||||
|
|
||||||
extra-source-files:
|
|
||||||
- README.md
|
|
||||||
- ChangeLog.md
|
|
||||||
|
|
||||||
# Metadata used when publishing your package
|
|
||||||
# synopsis: Short description of your package
|
|
||||||
# category: Web
|
|
||||||
|
|
||||||
# To avoid duplicated efforts in documentation and dealing with the
|
|
||||||
# complications of embedding Haddock markup inside cabal files, it is
|
|
||||||
# common to point users to the README.md file.
|
|
||||||
description: Please see the README on GitHub at <https://github.com/githubuser/bookmarkr#readme>
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- base >= 4.7 && < 5
|
|
||||||
|
|
||||||
library:
|
|
||||||
source-dirs: src
|
|
||||||
|
|
||||||
executables:
|
|
||||||
bookmarkr-exe:
|
|
||||||
main: Main.hs
|
|
||||||
source-dirs: app
|
|
||||||
ghc-options:
|
|
||||||
- -threaded
|
|
||||||
- -rtsopts
|
|
||||||
- -with-rtsopts=-N
|
|
||||||
dependencies:
|
|
||||||
- bookmarkr
|
|
||||||
|
|
||||||
tests:
|
|
||||||
bookmarkr-test:
|
|
||||||
main: Spec.hs
|
|
||||||
source-dirs: test
|
|
||||||
ghc-options:
|
|
||||||
- -threaded
|
|
||||||
- -rtsopts
|
|
||||||
- -with-rtsopts=-N
|
|
||||||
dependencies:
|
|
||||||
- bookmarkr
|
|
|
@ -1,6 +0,0 @@
|
||||||
module Lib
|
|
||||||
( someFunc
|
|
||||||
) where
|
|
||||||
|
|
||||||
someFunc :: IO ()
|
|
||||||
someFunc = putStrLn "someFunc"
|
|
|
@ -1,66 +0,0 @@
|
||||||
# This file was automatically generated by 'stack init'
|
|
||||||
#
|
|
||||||
# Some commonly used options have been documented as comments in this file.
|
|
||||||
# For advanced use and comprehensive documentation of the format, please see:
|
|
||||||
# https://docs.haskellstack.org/en/stable/yaml_configuration/
|
|
||||||
|
|
||||||
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
|
|
||||||
# A snapshot resolver dictates the compiler version and the set of packages
|
|
||||||
# to be used for project dependencies. For example:
|
|
||||||
#
|
|
||||||
# resolver: lts-3.5
|
|
||||||
# resolver: nightly-2015-09-21
|
|
||||||
# resolver: ghc-7.10.2
|
|
||||||
#
|
|
||||||
# The location of a snapshot can be provided as a file or url. Stack assumes
|
|
||||||
# a snapshot provided as a file might change, whereas a url resource does not.
|
|
||||||
#
|
|
||||||
# resolver: ./custom-snapshot.yaml
|
|
||||||
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
|
||||||
resolver: lts-15.3
|
|
||||||
|
|
||||||
# User packages to be built.
|
|
||||||
# Various formats can be used as shown in the example below.
|
|
||||||
#
|
|
||||||
# packages:
|
|
||||||
# - some-directory
|
|
||||||
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
|
|
||||||
# subdirs:
|
|
||||||
# - auto-update
|
|
||||||
# - wai
|
|
||||||
packages:
|
|
||||||
- .
|
|
||||||
# Dependency packages to be pulled from upstream that are not in the resolver.
|
|
||||||
# These entries can reference officially published versions as well as
|
|
||||||
# forks / in-progress versions pinned to a git hash. For example:
|
|
||||||
#
|
|
||||||
# extra-deps:
|
|
||||||
# - acme-missiles-0.3
|
|
||||||
# - git: https://github.com/commercialhaskell/stack.git
|
|
||||||
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
|
|
||||||
#
|
|
||||||
# extra-deps: []
|
|
||||||
|
|
||||||
# Override default flag values for local packages and extra-deps
|
|
||||||
# flags: {}
|
|
||||||
|
|
||||||
# Extra package databases containing global packages
|
|
||||||
# extra-package-dbs: []
|
|
||||||
|
|
||||||
# Control whether we use the GHC we find on the path
|
|
||||||
# system-ghc: true
|
|
||||||
#
|
|
||||||
# Require a specific version of stack, using version ranges
|
|
||||||
# require-stack-version: -any # Default
|
|
||||||
# require-stack-version: ">=2.1"
|
|
||||||
#
|
|
||||||
# Override the architecture used by stack, especially useful on Windows
|
|
||||||
# arch: i386
|
|
||||||
# arch: x86_64
|
|
||||||
#
|
|
||||||
# Extra directories used by stack for building
|
|
||||||
# extra-include-dirs: [/path/to/dir]
|
|
||||||
# extra-lib-dirs: [/path/to/dir]
|
|
||||||
#
|
|
||||||
# Allow a newer minor version of GHC than the snapshot specifies
|
|
||||||
# compiler-check: newer-minor
|
|
|
@ -1,12 +0,0 @@
|
||||||
# This file was autogenerated by Stack.
|
|
||||||
# You should not edit this file by hand.
|
|
||||||
# For more information, please see the documentation at:
|
|
||||||
# https://docs.haskellstack.org/en/stable/lock_files
|
|
||||||
|
|
||||||
packages: []
|
|
||||||
snapshots:
|
|
||||||
- completed:
|
|
||||||
size: 491373
|
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/3.yaml
|
|
||||||
sha256: 29e9ff61b8bf4b4fcff55cde3ac106ebb971f0d21331dccac9eee63374fa6ca8
|
|
||||||
original: lts-15.3
|
|
|
@ -1,2 +0,0 @@
|
||||||
main :: IO ()
|
|
||||||
main = putStrLn "Test suite not yet implemented"
|
|
|
@ -1,7 +1,8 @@
|
||||||
ilias google-chrome-stable ilias.hs-heilbronn.de
|
ilias google-chrome-stable ilias.hs-heilbronn.de
|
||||||
splan google-chrome-stable "https://splan.hs-heilbronn.de/splan/?acc=false&og=725&pg=AIB4"
|
splan google-chrome-stable "https://splan.hs-heilbronn.de/splan/?acc=false&og=725&pg=AIB4"
|
||||||
youtube google-chrome-stable youtube.de
|
youtube google-chrome-stable youtube.de
|
||||||
jira google-chrome-stable jira-student.it.hs-heilbronn.de/secure/RapidBoard.jspa?projectKey=RUNDUM
|
jira google-chrome-stable jira-student.it.hs-heilbronn.de/secure/RapidBoard.jspa?projectKey=RUNDUM
|
||||||
confluence google-chrome-stable https://confluence-student.it.hs-heilbronn.de/display/AIB/AIB_LabSWP_2020_SS_Rundum_Studium+Home
|
confluence google-chrome-stable https://confluence-student.it.hs-heilbronn.de/display/AIB/AIB_LabSWP_2020_SS_Rundum_Studium+Home
|
||||||
bitbucket google-chrome-stable https://bitbucket-student.it.hs-heilbronn.de/projects/LABAIB
|
bitbucket google-chrome-stable https://bitbucket-student.it.hs-heilbronn.de/projects/LABAIB
|
||||||
ssh-fin xfce4-terminal --command "ssh -p 8888 docker@srv-fin.xware-gmbh.de"
|
ssh-fin xfce4-terminal --command "ssh -p 8888 docker@srv-fin.xware-gmbh.de"
|
||||||
|
ssh-swlab xfce4-terminal --command "ssh -l docker rundum-studium.it-stud.hs-heilbronn.de"
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
-- |
|
|
||||||
|
|
||||||
module foo where
|
|
||||||
|
|
||||||
main :: Int
|
|
||||||
main = "hi"
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
selection=$( cat ~/scripts/bookmarks | sed -r 's/^([^ ]*) .*$/\1/' | rofi -p open -dmenu -no-custom )
|
selection=$( cat ~/scripts/bookmarks | sed -r 's/^([^ ]*) .*$/\1/' | rofi -p open -theme /home/leon/scripts/rofi-scripts/default_theme.rasi -dmenu -no-custom )
|
||||||
[ -z "$selection" ] && exit 1
|
[ -z "$selection" ] && exit 1
|
||||||
|
|
||||||
cat ~/scripts/bookmarks | sed -n -r "s/^$selection (.*)$/\1/p" | bash
|
cat ~/scripts/bookmarks | sed -n -r "s/^$selection (.*)$/\1/p" | bash
|
||||||
|
|
2
files/scripts/rofi-scripts/colors.rasi
Normal file
2
files/scripts/rofi-scripts/colors.rasi
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/*@import "./colorschemes/gruvbox.rasi"*/
|
||||||
|
@import "./colorschemes/teal.rasi"
|
8
files/scripts/rofi-scripts/colorschemes/arc-dark.rasi
Normal file
8
files/scripts/rofi-scripts/colorschemes/arc-dark.rasi
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
* {
|
||||||
|
accent: #6BA0DE;
|
||||||
|
background: #383C4A;
|
||||||
|
background-light: #404552;
|
||||||
|
foreground: #E4E4E4;
|
||||||
|
on: #44ad4d;
|
||||||
|
off: #e34039;
|
||||||
|
}
|
8
files/scripts/rofi-scripts/colorschemes/teal.rasi
Normal file
8
files/scripts/rofi-scripts/colorschemes/teal.rasi
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
* {
|
||||||
|
accent: #009688;
|
||||||
|
background: #212121bb;
|
||||||
|
background-light: #272727;
|
||||||
|
foreground: #bdbdbd;
|
||||||
|
on: #66bb6a;
|
||||||
|
off: #ef5350;
|
||||||
|
}
|
1
files/scripts/rofi-scripts/default_theme.rasi
Normal file
1
files/scripts/rofi-scripts/default_theme.rasi
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@import "./launcher_grid_style.rasi"
|
|
@ -24,7 +24,7 @@ configuration {
|
||||||
sidebar-mode: false;
|
sidebar-mode: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "./colorschemes/gruvbox.rasi"
|
@import "./colors.rasi"
|
||||||
|
|
||||||
* {
|
* {
|
||||||
text-font: "Iosevka 14";
|
text-font: "Iosevka 14";
|
||||||
|
|
|
@ -25,7 +25,7 @@ configuration {
|
||||||
sidebar-mode: false;
|
sidebar-mode: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "./colorschemes/gruvbox.rasi"
|
@import "./colors.rasi"
|
||||||
|
|
||||||
* {
|
* {
|
||||||
text-font: "Iosevka 12";
|
text-font: "Iosevka 12";
|
||||||
|
|
43
files/scripts/rofi-scripts/menu_powermenu.sh
Normal file
43
files/scripts/rofi-scripts/menu_powermenu.sh
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya (adi1090x)
|
||||||
|
## Mail : adi1090x@gmail.com
|
||||||
|
## Github : @adi1090x
|
||||||
|
## Reddit : @adi1090x
|
||||||
|
|
||||||
|
rofi_command="rofi -theme /home/leon/scripts/rofi-scripts/powermenu.rasi"
|
||||||
|
uptime=$(uptime -p | sed -e 's/up //g')
|
||||||
|
#mem=$( free -h | grep -i mem | awk -F ' ' '{print $3}')
|
||||||
|
cpu=$(sh ~/.config/rofi/bin/usedcpu)
|
||||||
|
memory=$(sh ~/.config/rofi/bin/usedram)
|
||||||
|
|
||||||
|
# Options
|
||||||
|
shutdown="襤"
|
||||||
|
reboot="ﰇ"
|
||||||
|
lock=""
|
||||||
|
suspend="鈴"
|
||||||
|
logout=""
|
||||||
|
|
||||||
|
# Variable passed to rofi
|
||||||
|
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
|
||||||
|
|
||||||
|
chosen="$(echo -e "$options" | $rofi_command -p "祥 $uptime $cpu $memory " -dmenu -selected-row 2)"
|
||||||
|
case $chosen in
|
||||||
|
$shutdown)
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
|
$reboot)
|
||||||
|
systemctl reboot
|
||||||
|
;;
|
||||||
|
$lock)
|
||||||
|
i3lock
|
||||||
|
;;
|
||||||
|
$suspend)
|
||||||
|
mpc -q pause
|
||||||
|
amixer set Master mute
|
||||||
|
systemctl suspend
|
||||||
|
;;
|
||||||
|
$logout)
|
||||||
|
openbox --exit
|
||||||
|
;;
|
||||||
|
esac
|
124
files/scripts/rofi-scripts/powermenu.rasi
Normal file
124
files/scripts/rofi-scripts/powermenu.rasi
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Mail : adi1090x@gmail.com
|
||||||
|
* Github : @adi1090x
|
||||||
|
* Reddit : @adi1090x
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import "colors.rasi"
|
||||||
|
|
||||||
|
/* ########### */
|
||||||
|
|
||||||
|
* {
|
||||||
|
/* General */
|
||||||
|
text-font: "Comfortaa 12";
|
||||||
|
icon-font: "Hurmit Nerd Font Mono 32";
|
||||||
|
icon-font-small: "Hurmit Nerd Font Mono 24";
|
||||||
|
|
||||||
|
option-6-listview-spacing: 10px;
|
||||||
|
|
||||||
|
menu-window-padding: 5px 15px;
|
||||||
|
menu-inputbar-margin: 10px 0px;
|
||||||
|
menu-prompt-padding: 10px 20px 10px 20px;
|
||||||
|
menu-prompt-margin: 0px 0px 0px -2px;
|
||||||
|
menu-element-border: 10px;
|
||||||
|
menu-element-padding: 3px 8px -1px -40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ########### */
|
||||||
|
|
||||||
|
#window {
|
||||||
|
width: 29%;
|
||||||
|
height: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ########### */
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
font: @icon-font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#horibox {
|
||||||
|
children: [ listview ];
|
||||||
|
}
|
||||||
|
#listview {
|
||||||
|
layout: horizontal;
|
||||||
|
}
|
||||||
|
#element {
|
||||||
|
padding: @option-element-padding;
|
||||||
|
background-color: @background-light;
|
||||||
|
}
|
||||||
|
#element.selected {
|
||||||
|
background-color: @accent;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ########### */
|
||||||
|
|
||||||
|
* {
|
||||||
|
font: @text-font;
|
||||||
|
}
|
||||||
|
#window {
|
||||||
|
padding: @menu-window-padding;
|
||||||
|
children: [ inputbar, horibox ];
|
||||||
|
}
|
||||||
|
#inputbar {
|
||||||
|
children: [ textbox-prompt-colon, prompt ];
|
||||||
|
margin: @menu-inputbar-margin;
|
||||||
|
}
|
||||||
|
prompt,
|
||||||
|
textbox-prompt-colon {
|
||||||
|
padding: @menu-prompt-padding;
|
||||||
|
border: 2px;
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
||||||
|
#prompt {
|
||||||
|
margin: @menu-prompt-margin;
|
||||||
|
background-color: @background-light;
|
||||||
|
text-color: @accent;
|
||||||
|
}
|
||||||
|
#textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: "System";
|
||||||
|
background-color: @accent;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
#horibox {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
#listview {
|
||||||
|
spacing: @option-6-listview-spacing;
|
||||||
|
lines: 5;
|
||||||
|
}
|
||||||
|
#element {
|
||||||
|
font: @icon-font;
|
||||||
|
border: @menu-element-border;
|
||||||
|
padding: @menu-element-padding;
|
||||||
|
border-color: @background-light;
|
||||||
|
}
|
||||||
|
#element.selected {
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
||||||
|
element.active,
|
||||||
|
element.selected.urgent {
|
||||||
|
background-color: @on;
|
||||||
|
text-color: @background;
|
||||||
|
border-color: @on;
|
||||||
|
}
|
||||||
|
element.selected.urgent {
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
||||||
|
element.urgent,
|
||||||
|
element.selected.active {
|
||||||
|
background-color: @off;
|
||||||
|
text-color: @background;
|
||||||
|
border-color: @off;
|
||||||
|
}
|
||||||
|
element.selected.active {
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
|
@ -3,7 +3,7 @@ openDetailsAction() {
|
||||||
echo "Details:surf https://hoogle.haskell.org/?hoogle=$1&scope=package:$2"
|
echo "Details:surf https://hoogle.haskell.org/?hoogle=$1&scope=package:$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
query=$( echo "h\ng" | rofi -dmenu )
|
query=$( echo "h\ng" | rofi -i -theme /home/leon/scripts/rofi-scripts/default_theme.rasi -dmenu )
|
||||||
selection=$( echo "$query" | awk '{print $1}' )
|
selection=$( echo "$query" | awk '{print $1}' )
|
||||||
input=$( echo "$query" | awk '{print $2}' )
|
input=$( echo "$query" | awk '{print $2}' )
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ case "$selection" in
|
||||||
package=$( echo "$input" | sed 's/.*p=//g' )
|
package=$( echo "$input" | sed 's/.*p=//g' )
|
||||||
[ "$package" = "$query" ] && package=""
|
[ "$package" = "$query" ] && package=""
|
||||||
|
|
||||||
selection=$( hoogle "$query" | rofi -p "select" -dmenu | sed 's/^\(.*\) :: .*$/\1/' | sed 's/\ /./g' )
|
selection=$( hoogle "$query" | rofi -p "select" -i -theme /home/leon/scripts/rofi-scripts/default_theme.rasi -dmenu | sed 's/^\(.*\) :: .*$/\1/' | sed 's/\ /./g' )
|
||||||
result=$( echo "$selection" | xargs hoogle --info )
|
result=$( echo "$selection" | xargs hoogle --info )
|
||||||
notify-send.sh --icon="dialog-information" --action="$(openDetailsAction "$query" "$package")" "Hoogle" "$result"
|
notify-send.sh --icon="dialog-information" --action="$(openDetailsAction "$query" "$package")" "Hoogle" "$result"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue