From d94ecc18ad89a59b393e89738ab4eb01c54b6f53 Mon Sep 17 00:00:00 2001 From: Leon Kowarschick Date: Mon, 1 Jun 2020 14:10:09 +0200 Subject: [PATCH] Improve translation handling --- files/.config/alacritty/alacritty.yml | 4 ++-- files/.config/polybar/config.ini | 1 - files/.xmonad/.stack-work/stack.sqlite3 | Bin 323584 -> 323584 bytes files/.xmonad/lib/Config.hs | 10 ++++++++-- files/firefoxChrome/chrome/userChrome.css | 16 +++++++++------- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/files/.config/alacritty/alacritty.yml b/files/.config/alacritty/alacritty.yml index 10279ee..98a3722 100644 --- a/files/.config/alacritty/alacritty.yml +++ b/files/.config/alacritty/alacritty.yml @@ -343,7 +343,7 @@ font: #family: JetBrainsMono Nerd Font #family: Iosevka Term #family: cozette - #family: Terminus (TTF) - family: cherry + family: Terminus (TTF) + #family: cherry #family: lucy tewi2a #family: Scientifica diff --git a/files/.config/polybar/config.ini b/files/.config/polybar/config.ini index 55d0807..8b63a12 100644 --- a/files/.config/polybar/config.ini +++ b/files/.config/polybar/config.ini @@ -42,7 +42,6 @@ alert = #bd2c40 [global/wm] margin-bottom = 0 - [bar/main] monitor = ${env:MONITOR:} diff --git a/files/.xmonad/.stack-work/stack.sqlite3 b/files/.xmonad/.stack-work/stack.sqlite3 index 9da3cfa9fbba44ac18703b400aa43d6460365349..9dbc3ddb6e4e407a74720eac6e4ac262469a3454 100644 GIT binary patch delta 31 ncmZp8Al&dkc!D(JjEOSNj58V&S`!#s6PQ{Pn71adEO-w9z!VGe delta 31 ncmZp8Al&dkc!D(Jl!-FVj8hsDS`!#s6PQ{Pn71adEO-w9zjzDk diff --git a/files/.xmonad/lib/Config.hs b/files/.xmonad/lib/Config.hs index 838476f..6affdbb 100644 --- a/files/.xmonad/lib/Config.hs +++ b/files/.xmonad/lib/Config.hs @@ -171,7 +171,7 @@ myLayout = avoidStruts ||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger}) ||| (rename "BSP" $ spacingAndGaps $ borderResize $ emptyBSP) ||| (rename "ThreeCol" $ makeTabbed $ spacingAndGaps $ reflectHoriz $ ThreeColMid 1 (3/100) (1/2)) - ||| (rename "TabbedRow" $ makeTabbed $ spacingAndGaps $ zoomRow)) + ||| (rename "TabbedRow" $ makeTabbed $ spacingAndGaps $ zoomRow)) vertScreenLayouts = ((rename "ThreeCol" $ makeTabbed $ spacingAndGaps $ Mirror $ reflectHoriz $ ThreeColMid 1 (3/100) (1/2)) @@ -399,9 +399,15 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program withSelectionCommands = [ ("Google", XSel.transformPromptSelection ("https://google.com/search?q=" ++) "qutebrowser") , ("Hoogle", XSel.transformPromptSelection ("https://hoogle.haskell.org/?hoogle=" ++) "qutebrowser") - , ("Translate", XSel.transformPromptSelection ("https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=" ++) "qutebrowser") + , ("Translate", XSel.getSelection >>= translateMenu) ] + translateMenu :: String -> X () + translateMenu input = do + selectedLanguage <- Rofi.promptSimple def ["de", "en", "fr"] + translated <- runProcessWithInput "trans" [":" ++ selectedLanguage, input, "--no-ansi"] "" + notify "Translation" translated + specialCommands :: [(String, X ())] specialCommands = diff --git a/files/firefoxChrome/chrome/userChrome.css b/files/firefoxChrome/chrome/userChrome.css index e34d208..87dd44d 100644 --- a/files/firefoxChrome/chrome/userChrome.css +++ b/files/firefoxChrome/chrome/userChrome.css @@ -63,7 +63,7 @@ .tab-background:not[visuallyselected] { background: var(--mff-tab-selected-bg) !important; /*opacity: 0.5 !important;*/ - opacity: 1.0 !important; + opacity: 1 !important; } /* This positions the tabs under the navaigator container */ @@ -119,7 +119,6 @@ hbox.tab-content[pinned="true"] .tab-text { --tab-loading-fill: #033433 !important; } - .tab-label-container:not([textoverflow]) { display: flex; overflow: hidden; @@ -166,6 +165,11 @@ hbox.tab-content[pinned="true"] .tab-text { /* Toolbar {{{ */ +::selection { + background-color: #8ec07c !important; + color: #282828 !important; +} + .urlbar-icon > image { fill: var(--mff-icon-color) !important; color: var(--mff-icon-color) !important; @@ -181,7 +185,8 @@ hbox.tab-content[pinned="true"] .tab-text { .toolbarbutton-1 { filter: brightness(80%) sepia(50%); } -#back-button, #forward-button { +#back-button, +#forward-button { filter: brightness(80%) sepia(100%); transform: scale(0.9); } @@ -226,7 +231,6 @@ hbox.tab-content[pinned="true"] .tab-text { display: none !important; } - #urlbar-input { font-size: var(--mff-urlbar-font-size) !important; color: var(--mff-urlbar-color) !important; @@ -373,9 +377,8 @@ toolbarseparator { display: none; } - /* something */ -.toolbarbutton-icon , +.toolbarbutton-icon, .toolbarbutton-icon::after { fill: #ebdbb2 !important; } @@ -384,5 +387,4 @@ toolbarseparator { color: red; } - /* }}} */