This commit is contained in:
Leon Kowarschick 2020-03-27 09:06:13 +01:00
parent c56463600c
commit 616ca3e9ae
18 changed files with 460 additions and 50 deletions

View file

@ -0,0 +1,312 @@
env:
# if not set, it supposedly check's if a alacritty entry exists and uses xterm-256color otherwise
#TERM: alacritty
TERM: xterm-256color
window:
#dimensions:
# columns: 0
# lines: 0
#position:
# x: 0
# y: 0
padding:
x: 0
y: 0
#Spread additional padding evenly around the terminal content.
dynamic_padding: true
#title: Alacritty
#class:
#instance: Alacritty
#general: Alacritty
gtk_theme_variant: None
scrolling:
history: 10000
multiplier: 3
#selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
# Allow terminal applications to change Alacritty's window title.
dynamic_title: true
cursor:
style: Beam # ▇ Block, _ Underline, | Beam
unfocused_hollow: true
# Live config reload (changes require restart)
live_config_reload: true
shell:
program: /bin/fish
#args:
#- --login
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
hide_when_typing: true
url:
launcher:
program: xdg-open
# args: []
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: None
# Mouse bindings --------------------------------------------- {{{
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings)
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Middle, action: PasteSelection }
# }}}
# Key bindings -------------------------------------------- {{{
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - Copy
# - Paste
# - PasteSelection
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Minimize
# - Quit
# - ToggleFullscreen
# - SpawnNewInstance
# - ClearLogNotice
# - ReceiveChar
# - None
#
# (macOS only):
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
# - `mods`: Key modifiers to filter binding actions
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Alt
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# at once.
#key_bindings:
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Add, mods: Control, action: IncreaseFontSize }
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, chars: "\x0c" }
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
# }}}
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - None
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false
# schemes --------------------------------------------------------- {{{
schemes:
dracula: &dracula
primary:
background: '#282a36'
foreground: '#f8f8f2'
normal:
black: '#000000'
red: '#ff5555'
green: '#50fa7b'
yellow: '#f1fa8c'
blue: '#caa9fa'
magenta: '#ff79c6'
cyan: '#8be9fd'
white: '#bfbfbf'
bright:
black: '#575b70'
red: '#ff6e67'
green: '#5af78e'
yellow: '#f4f99d'
blue: '#caa9fa'
magenta: '#ff92d0'
cyan: '#9aedfe'
white: '#e6e6e6'
gruvbox: &gruvbox
primary:
background: '#282828' # hard contrast: background = '#1d2021'
foreground: '#ebdbb2' # soft contrast: background = '#32302f'
normal:
black: '#282828'
red: '#cc241d'
green: '#98971a'
yellow: '#d79921'
blue: '#458588'
magenta: '#b16286'
cyan: '#689d6a'
white: '#a89984'
bright:
black: '#928374'
red: '#fb4934'
green: '#b8bb26'
yellow: '#fabd2f'
blue: '#83a598'
magenta: '#d3869b'
cyan: '#8ec07c'
white: '#ebdbb2'
onedark: &onedark
primary:
background: '#282c34'
foreground: '#abb2bf'
normal:
black: '#282c34' # NOTE: Use '#131613' for the `black` color if you'd like to see black text on the background.
red: '#e06c75'
green: '#98c379'
yellow: '#d19a66'
blue: '#61afef'
magenta: '#c678dd'
cyan: '#56b6c2'
white: '#abb2bf'
bright:
black: '#5c6370'
red: '#e06c75'
green: '#98c379'
yellow: '#d19a66'
blue: '#61afef'
magenta: '#c678dd'
cyan: '#56b6c2'
white: '#ffffff'
# }}}
# https://github.com/alacritty/alacritty/wiki/Color-schemes
colors: *onedark
background_opacity: 0.95
font:
size: 13
normal: # >>= >=
family: Iosevka
#family: JetBrainsMono Nerd Font
style: Normal

View file

@ -1,4 +1,4 @@
{
"optOut": false,
"lastUpdateCheck": 1585128053440
"lastUpdateCheck": 1585227673282
}

View file

@ -0,0 +1,7 @@
# Path to Oh My Fish install.
set -q XDG_DATA_HOME
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
or set -gx OMF_PATH "$HOME/.local/share/omf"
# Load Oh My Fish configuration.
source $OMF_PATH/init.fish

View file

@ -0,0 +1,9 @@
fish_vi_key_bindings
# fish_default_key_bindings
alias ls=lsd
abbr --add --global vim nvim
abbr --add --global tsh trash
[ (hostname) = "garnix" ] && alias rm='echo "rm is disabled. Please use trash instead."; false'

View file

@ -0,0 +1,34 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3100
SETUVAR _fish_abbr_cxmonad:vim\x20\x7e/\x2exmonad/lib/Config\x2ehs
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:00cff7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:Willkommen\x20zu\x20fish\x2c\x20der\x20freundlichen\x20interaktiven\x20Shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/home/leon/\x2efzf/bin

View file

@ -0,0 +1 @@
/home/leon/.local/share/omf/themes/agnoster/fish_prompt.fish

View file

@ -0,0 +1,3 @@
function fish_user_key_bindings
fzf_key_bindings
end

View file

@ -0,0 +1 @@
/home/leon/.fzf/shell/key-bindings.fish

View file

@ -1,19 +1,27 @@
include ./theme.conf
# font_family VictorMono Nerd Font Semibold
# font_family DejaVuSansMono Nerd
# font_family Iosevka Nerd Font
font_family JetbrainsMono Nerd Font
#include ./theme.conf
include ./onedark.conf
background_opacity 0.95
#font_family VictorMono Nerd Font Semibold
#font_family DejaVuSansMono Nerd
font_family Iosevka Nerd Font
#font_family JetbrainsMono Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
#font_family monospace
font_size 12
font_size 13
enable_audio_bell no
draw_minimal_borders yes
window_padding_width 0
window_margin_width 0
tab_bar_style powerline
hide_window_decorations yes
placement_strategy top-left
map ctrl+shift+plus change_font_size all +2.0
@ -21,8 +29,14 @@ map ctrl+shift+left neighboring_window left
map ctrl+shift+down neighboring_window down
map ctrl+shift+right neighboring_window right
map ctrl+shift+up neighboring_window up
map kitty_mod+t new_tab_with_cmd
map kitty_mod+backspace new_os_window_with_cwd
map kitty_mod+enter new_window_with_cwd
clipboard_control write-clipboard write-primary read-primary read-clipboard
dynamic_background_opacity yes
allow_remote_control yes
sync_to_monitor yes

View file

@ -0,0 +1,21 @@
background #282c34
foreground #c4c8c5
cursor #d0d0d0
selection_background #444444
selection_foreground #161718
color0 #000000
color1 #fc5ef0
color2 #86c38a
color3 #ffd6b1
color4 #85befd
color5 #b9b5fc
color6 #85befd
color7 #dfdfdf
color8 #808080
color9 #fc5ef0
color10 #94f936
color11 #f5ffa7
color12 #95cbfe
color13 #b9b5fc
color14 #85befd
color15 #dfdfdf

View file

@ -9,7 +9,7 @@
OSD="no" # On Screen Display message for KDE if enabled
INC=2 # Increment when lowering/rising the volume
MAX_VOL=130 # Maximum volume
AUTOSYNC="no" # All programs have the same volume if enabled
AUTOSYNC="yes" # All programs have the same volume if enabled
VOLUME_ICONS=("🔈 " "🔉 " "🔊 ")
MUTED_ICON=" " # Muted volume icon
MUTED_COLOR="%{F#6b6b6b}" # Color when the audio is muted

View file

@ -11,7 +11,7 @@ fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "# $updates"
echo "%{F#dd0}🔃%{F-} $updates"
else
echo ""
fi

View file

@ -1,8 +1,8 @@
[options]
font = Iosevka Medium 14
font = Iosevka Nerd Font Medium 12
;font = Victor mono 13
# font = jetbrains mono 13
# font = monospace 13
;font = jetbrains mono Nerd Font 12
;font = monospace 13
[colors]
# hard contrast: background = #1d2021

View file

@ -2,7 +2,7 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-unused-binds #-}
-- Imports -------------------------------------------------------- {{{
module Config (main) where
import qualified Rofi as Rofi
import qualified Rofi
import Data.List (isSuffixOf, isPrefixOf)
import Data.Char (isDigit)
@ -24,7 +24,7 @@ import XMonad.Layout.BinarySpacePartition
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops (ewmh)
import qualified XMonad.Hooks.EwmhDesktops as Ewmh
import XMonad.Hooks.SetWMName (setWMName)
import XMonad.Layout.Gaps
import XMonad.Layout.LayoutCombinators ((|||))
@ -53,7 +53,7 @@ import XMonad.Actions.Commands
myModMask = mod4Mask
myLauncher = Rofi.asCommand def ["-show run"] -- "rofi -show run -theme /home/leon/scripts/rofi-scripts/launcher_grid_full_style.rasi"
myTerminal = "kitty --single-instance"
myTerminal = "kitty --single-instance" -- try alacritty
myBrowser = "google-chrome-stable"
--yBar = "xmobar"
--myXmobarPP= xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
@ -100,7 +100,7 @@ aqua = "#8ec07c"
-- Layout ---------------------------------------- {{{
--layoutHints .
myLayout = BoringWindows.boringWindows . minimize . avoidStruts . smartBorders . toggleLayouts Full $ layouts
myLayout = BoringWindows.boringWindows . minimize . avoidStruts . smartBorders . toggleLayouts Full $ layouts
where
layouts =((rename "Tall" $ onlyGaps $ mouseResizableTile {draggerType = dragger}) -- ResizableTall 1 (3/100) (1/2) []
||| (rename "Horizon" $ onlyGaps $ mouseResizableTileMirrored {draggerType = dragger}) -- Mirror $ ResizableTall 1 (3/100) (3/4) []
@ -115,12 +115,12 @@ myLayout = BoringWindows.boringWindows . minimize . avoidStruts . smartBorders
gap = 7
onlyGaps = gaps [ (dir, (gap*2)) | dir <- [L, R, D, U] ] -- gaps are included in mouseResizableTile
dragger = let x = fromIntegral gap * 2
dragger = let x = fromIntegral gap * 2
in FixedDragger x x
spacingAndGaps = let intGap = fromIntegral gap
spacingBorder = Border intGap intGap intGap intGap
spacingBorder = Border intGap intGap intGap intGap
in onlyGaps . spacingRaw True spacingBorder False spacingBorder True
-- }}}
@ -138,6 +138,7 @@ myStartupHook = do
spawnOnce "picom --config ~/.config/picom.conf --no-fading-openclose"
spawnOnce "pasystray"
spawnOnce "nm-applet"
spawn "xset r rate 300 30" -- make key repeat quicker
spawn "/home/leon/.config/polybar/launch.sh"
setWMName "LG3D" -- Java stuff hack
@ -161,30 +162,22 @@ myKeys = [ ("M-C-k", sendMessage MirrorExpand >> sendMessage ShrinkSlave )
, ("M-C-c", killAllOtherCopies)
, ("M-S-C-q", io $ exitSuccess)
-- Binary space partitioning
, ("M-<Backspace>", sendMessage $ Swap)
, ("M-M1-<Backspace>", sendMessage $ Rotate)
-- programs
, ("M-p", spawn myLauncher)
, ("M-b", spawn myBrowser)
, ("M-S-p", Rofi.showCombi def [ "drun", "window", "ssh" ])
, ("M-S-e", Rofi.showNormal def "emoji" )
, ("M-s", spawn $ scriptFile "rofi-search.sh")
, ("M-S-s", spawn $ "cat " ++ scriptFile "bookmarks" ++ " | " ++ Rofi.asCommand def ["-dmenu", "-p open"] ++ " | bash")
, ("M-S-s", spawn $ scriptFile "rofi-open.sh")
, ("M-n", scratchpadSubmap )
, ("M-m", mediaSubmap )
, ("M-e", Rofi.promptRunCommand def specialCommands)
, ("M-C-e", Rofi.promptRunCommand def =<< defaultCommands )
-- BSP
, ("M-M1-h", sendMessage $ ExpandTowards L)
, ("M-M1-l", sendMessage $ ExpandTowards R)
, ("M-M1-k", sendMessage $ ExpandTowards U)
, ("M-M1-j", sendMessage $ ExpandTowards D)
, ("M-<Backspace>", sendMessage $ Swap)
, ("M-M1-<Backspace>", sendMessage $ Rotate)
, ("M-S-M1-h", Nav2d.windowGo L False)
, ("M-S-M1-l", Nav2d.windowGo R False)
, ("M-S-M1-k", Nav2d.windowGo U False)
, ("M-S-M1-j", Nav2d.windowGo D False)
-- Minimization
, ("M-k", BoringWindows.focusUp)
, ("M-j", BoringWindows.focusDown)
@ -192,16 +185,26 @@ myKeys = [ ("M-C-k", sendMessage MirrorExpand >> sendMessage ShrinkSlave )
, ("M-S-ü", withLastMinimized maximizeWindow)
, ("M-C-ü", promptRestoreWindow)
, ("M1-<Tab>", cycleMinimizedWindow)
] ++ concat generatedMappings
] ++ generatedMappings
where
generatedMappings :: [[(String, X ())]]
generatedMappings =
[ [("M-C-" ++ wsp, windows $ copy wsp) | wsp <- map show [1..9]] -- Copy to workspace
]
--where hjklDirPairs = [("h", L), ("j", D), ("k", U), ("l", R) ]
generatedMappings :: [(String, X ())]
generatedMappings = copyToWorkspaceMappings ++ bspMappings
where
copyToWorkspaceMappings =
[ ("M-C-" ++ wsp, windows $ copy wsp)
| wsp <- map show [1..9 :: Int]
]
bspMappings = concat
[ [ ("M-M1-" ++ key, sendMessage $ ExpandTowards dir)
, ("M-S-M1-" ++ key, Nav2d.windowGo dir False)
, ("M-C-M1-" ++ key, Nav2d.windowSwap dir False)
]
| (key, dir) <- [("h", L), ("j", D), ("k", U), ("l", R) ]
]
cycleMinimizedWindow :: X ()
cycleMinimizedWindow = withLastMinimized $ \window -> do
cycleMinimizedWindow = withLastMinimized $ \window -> do
withFocused minimizeWindow
maximizeWindowAndFocus window
@ -275,8 +278,8 @@ main = do
[D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
-- $ ewmh (kills IntelliJ)
xmonad
$ ewmh
xmonad
$ Ewmh.ewmh
$ Nav2d.withNavigation2DConfig def { Nav2d.defaultTiledNavigation = Nav2d.sideNavigation }
$ myConfig dbus
@ -289,6 +292,7 @@ myConfig dbus = desktopConfig
, startupHook = myStartupHook <+> startupHook def <+> return () >> checkKeymap (myConfig dbus ) myKeys
, manageHook = myManageHook <+> manageHook def
-- , handleEventHook = minimizeEventHook <+> handleEventHook def -- fullscreenEventHook
--, handleEventHook = handleEventHook def <+> Ewmh.fullscreenEventHook
, focusedBorderColor = aqua
, normalBorderColor = "#282828"
} `removeKeysP` removedKeys `additionalKeysP` myKeys
@ -297,8 +301,6 @@ myConfig dbus = desktopConfig
-- }}}
-- POLYBAR Kram -------------------------------------- {{{
@ -339,7 +341,6 @@ dbusOutput dbus str = do
-- }}}
-- Utilities --------------------------------------------------- {{{
promptDzenWhileRunning :: String -> [String] -> X () -> X ()
promptDzenWhileRunning promptTitle options action = do

Binary file not shown.

View file

@ -1,6 +1,7 @@
google-chrome-stable ilias.hs-heilbronn.de
google-chrome-stable youtube.de
google-chrome-stable jira-student.it.hs-heilbronn.de/secure/RapidBoard.jspa?projectKey=RUNDUM
google-chrome-stable https://confluence-student.it.hs-heilbronn.de/display/AIB/AIB_LabSWP_2020_SS_Rundum_Studium+Home
google-chrome-stable https://bitbucket-student.it.hs-heilbronn.de/projects/LABAIB
xfce4-terminal --command "ssh -p 8888 docker@srv-fin.xware-gmbh.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"
youtube google-chrome-stable youtube.de
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
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"

6
files/scripts/rofi-open.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
selection=$( cat ~/scripts/bookmarks | sed -r 's/^([^ ]*) .*$/\1/' | rofi -p open -dmenu -no-custom )
[ -z "$selection" ] && exit 1
cat ~/scripts/bookmarks | sed -n -r "s/^$selection (.*)$/\1/p" | bash