Improve translation handling

This commit is contained in:
Leon Kowarschick 2020-06-01 14:10:09 +02:00
parent 9433c552c4
commit d94ecc18ad
5 changed files with 19 additions and 12 deletions

View file

@ -343,7 +343,7 @@ font:
#family: JetBrainsMono Nerd Font #family: JetBrainsMono Nerd Font
#family: Iosevka Term #family: Iosevka Term
#family: cozette #family: cozette
#family: Terminus (TTF) family: Terminus (TTF)
family: cherry #family: cherry
#family: lucy tewi2a #family: lucy tewi2a
#family: Scientifica #family: Scientifica

View file

@ -42,7 +42,6 @@ alert = #bd2c40
[global/wm] [global/wm]
margin-bottom = 0 margin-bottom = 0
[bar/main] [bar/main]
monitor = ${env:MONITOR:} monitor = ${env:MONITOR:}

View file

@ -399,9 +399,15 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
withSelectionCommands = withSelectionCommands =
[ ("Google", XSel.transformPromptSelection ("https://google.com/search?q=" ++) "qutebrowser") [ ("Google", XSel.transformPromptSelection ("https://google.com/search?q=" ++) "qutebrowser")
, ("Hoogle", XSel.transformPromptSelection ("https://hoogle.haskell.org/?hoogle=" ++) "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 :: [(String, X ())]
specialCommands = specialCommands =

View file

@ -63,7 +63,7 @@
.tab-background:not[visuallyselected] { .tab-background:not[visuallyselected] {
background: var(--mff-tab-selected-bg) !important; background: var(--mff-tab-selected-bg) !important;
/*opacity: 0.5 !important;*/ /*opacity: 0.5 !important;*/
opacity: 1.0 !important; opacity: 1 !important;
} }
/* This positions the tabs under the navaigator container */ /* 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-loading-fill: #033433 !important;
} }
.tab-label-container:not([textoverflow]) { .tab-label-container:not([textoverflow]) {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
@ -166,6 +165,11 @@ hbox.tab-content[pinned="true"] .tab-text {
/* Toolbar {{{ */ /* Toolbar {{{ */
::selection {
background-color: #8ec07c !important;
color: #282828 !important;
}
.urlbar-icon > image { .urlbar-icon > image {
fill: var(--mff-icon-color) !important; fill: var(--mff-icon-color) !important;
color: var(--mff-icon-color) !important; color: var(--mff-icon-color) !important;
@ -181,7 +185,8 @@ hbox.tab-content[pinned="true"] .tab-text {
.toolbarbutton-1 { .toolbarbutton-1 {
filter: brightness(80%) sepia(50%); filter: brightness(80%) sepia(50%);
} }
#back-button, #forward-button { #back-button,
#forward-button {
filter: brightness(80%) sepia(100%); filter: brightness(80%) sepia(100%);
transform: scale(0.9); transform: scale(0.9);
} }
@ -226,7 +231,6 @@ hbox.tab-content[pinned="true"] .tab-text {
display: none !important; display: none !important;
} }
#urlbar-input { #urlbar-input {
font-size: var(--mff-urlbar-font-size) !important; font-size: var(--mff-urlbar-font-size) !important;
color: var(--mff-urlbar-color) !important; color: var(--mff-urlbar-color) !important;
@ -373,7 +377,6 @@ toolbarseparator {
display: none; display: none;
} }
/* something */ /* something */
.toolbarbutton-icon, .toolbarbutton-icon,
.toolbarbutton-icon::after { .toolbarbutton-icon::after {
@ -384,5 +387,4 @@ toolbarseparator {
color: red; color: red;
} }
/* }}} */ /* }}} */